wjc
2023-03-09 a0b77501012265c4638c9f49ccfd1e6cd0f71a45
2023年03月09日18:43:53

备份一下
1个文件已添加
20个文件已修改
631 ■■■■ 已修改文件
HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Cell.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/HDL-ON_Android.csproj 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Cell.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/Function.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/HDL_ON.projitems 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/HomePage.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/FunctionPage.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/RoomPage.cs 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/Send.cs 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockListPage.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs 235 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Cell.png

HDL-ON_Android/HDL-ON_Android.csproj
@@ -427,7 +427,7 @@
    <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\VideoDoorlockClose.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\VideoDoorLockOpen.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\History.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\cell.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\Cell.png" />
  </ItemGroup>
  <ItemGroup>
    <AndroidResource Include="Resources\values\colors.xml" />
HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Cell.png

HDL_ON/Entity/Function/Function.cs
@@ -1375,7 +1375,7 @@
        /// <summary>
        /// 萤石视频门锁
        /// </summary>
        public const string VideoDoorLock= "萤石视频门锁";
        public const string VideoDoorLock="security.door.ezviz";
        /// <summary>
        /// 萤石视频门锁spk列表
        /// </summary>
HDL_ON/HDL_ON.projitems
@@ -531,6 +531,7 @@
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\VideoDoorLockListPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\VideoDoorLockPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\CommonMethod.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\Send.cs" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" />
HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
@@ -12,7 +12,7 @@
        /// <summary>
        /// 功能控制界面跳转事件
        /// </summary>
        public EventHandler<MouseEventArgs> LoadEvent_SkipFunctionControlPage(Function function, Button btnCollectionIcon, Button btnName, Button btnFromFloor, Comerom comerom
        public EventHandler<MouseEventArgs> LoadEvent_SkipFunctionControlPage(Function function, Button btnCollectionIcon, Button btnName, Button btnFromFloor, Comerom comerom,Action action
            )
        {
            EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
@@ -309,7 +309,7 @@
                        break;
                    case SPK.VideoDoorLock: {
                            //萤石视频门锁
                            var form = new VideoDoorLockPage(function, btnName, btnFromFloor,comerom);
                            var form = new VideoDoorLockPage(function, btnName, btnFromFloor,comerom,action);
                            MainPage.BasePageView.AddChidren(form);
                            MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                            form.Show();
HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -1243,7 +1243,9 @@
                };
                var skipControlPageEvent = new PublicAssmebly().LoadEvent_SkipFunctionControlPage(function, btnCollection, btnName, btnZone,Comerom.collect);
                var skipControlPageEvent = new PublicAssmebly().LoadEvent_SkipFunctionControlPage(function, btnCollection, btnName, btnZone,Comerom.collect,()=> {
                    this.LoadDeviceFunctionControlZone();//删除设备后重新刷新UI
                });
                view.MouseUpEventHandler = skipControlPageEvent;
                btnName.MouseUpEventHandler = skipControlPageEvent;
                btnIcon.MouseUpEventHandler = skipControlPageEvent;
HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
@@ -38,12 +38,18 @@
        /// 是否在调光
        /// </summary>
        bool onDimmerBar;
        /// <summary>
        /// 删除设备后回调给界面刷新
        /// </summary>
        Action action;
        #endregion
        public FunctionControlZone(Function func)
        public FunctionControlZone(Function func,Action action)
        {
            bodyDiv = this;
            bodyDiv.Tag = func.sid;
            function = func;
            this.action = action;
        }
        public override void RemoveFromParent()
HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs
@@ -405,7 +405,7 @@
        /// </summary>
        void LoadEvent_DivSkipEvent()
        {
            var eventHandler = new PublicAssmebly().LoadEvent_SkipFunctionControlPage(function, btnCollectionIcon, btnName, btnFromFloor,Comerom.function);
            var eventHandler = new PublicAssmebly().LoadEvent_SkipFunctionControlPage(function, btnCollectionIcon, btnName, btnFromFloor,Comerom.room,this.action);
            this.MouseUpEventHandler = eventHandler;
            btnName.MouseUpEventHandler = eventHandler;
            btnFromFloor.MouseUpEventHandler = eventHandler;
HDL_ON/UI/UI2/2-Classification/FunctionPage.cs
@@ -255,7 +255,7 @@
                            }
                            if (function.spk == SPK.LightRGBW || function.spk == SPK.LightRGB || function.spk == SPK.LightDimming)
                            {
                                var functionDiv = new FunctionControlZone(function)
                                var functionDiv = new FunctionControlZone(function,null)
                                {
                                    Gravity = Gravity.CenterHorizontal,
                                    Width = Application.GetRealWidth(343),
@@ -271,7 +271,7 @@
                            }
                            else if (function.spk == SPK.IpCam_Imou)
                            {
                                var functionDiv = new FunctionControlZone(function)
                                var functionDiv = new FunctionControlZone(function,null)
                                {
                                    Gravity = Gravity.CenterHorizontal,
                                    Width = Application.GetRealWidth(343),
@@ -288,7 +288,7 @@
                            }
                            else
                            {
                                var functionDiv = new FunctionControlZone(function)
                                var functionDiv = new FunctionControlZone(function,null)
                                {
                                    Gravity = Gravity.CenterHorizontal,
                                    Width = Application.GetRealWidth(343),
HDL_ON/UI/UI2/2-Classification/RoomPage.cs
@@ -53,6 +53,7 @@
            deleteAction = delAction;
            this.modifyImageAction = modifyImageAction;
        }
        /// <summary>
        /// 重载界面
        /// </summary>
@@ -65,22 +66,25 @@
            }
        }
        public void LoadPage()
        {
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            new TopViewDiv(bodyView,room.roomName).LoadTopView_RoomTop(ReloadRoomName, skipEditPageAction);
            new TopViewDiv(bodyView, room.roomName).LoadTopView_RoomTop(ReloadRoomName, skipEditPageAction);
            functionListView = new VerticalScrolViewLayout()
            {
                Y = Application.GetRealHeight(64),
                Height = Application.GetRealHeight(603-12),
                Height = Application.GetRealHeight(603 - 12),
            };
            bodyView.AddChidren(functionListView);
            foreach (var function in room.GetRoomFunctions(false))
            var list = room.GetRoomFunctions(false);
            foreach (var function in list)
            {
                if (MainPage.RoomNotSupportFunctionList.Contains( function.spk))
                if (MainPage.RoomNotSupportFunctionList.Contains(function.spk))
                {
                    continue;
                }
@@ -89,7 +93,7 @@
                if (function.spk == SPK.LightRGB || function.spk == SPK.LightDimming)
                {
                    var functionDiv = new FunctionControlZone(function)
                    var functionDiv = new FunctionControlZone(function, null)
                    {
                        Gravity = Gravity.CenterHorizontal,
                        Width = Application.GetRealWidth(343),
@@ -105,7 +109,10 @@
                }
                else
                {
                    var functionDiv = new FunctionControlZone(function)
                    var functionDiv = new FunctionControlZone(function, () =>
                    {
                        this.ReLoadPage();
                    })
                    {
                        Gravity = Gravity.CenterHorizontal,
                        Width = Application.GetRealWidth(343),
@@ -132,7 +139,7 @@
                    BorderColor = 0x00FFFFFF,
                    BorderWidth = 1,
                    BackgroundColor = CSS_Color.MainBackgroundColor,
                    Tag = "Scene-" +  scene.sid
                    Tag = "Scene-" + scene.sid
                };
                functionListView.AddChidren(sceneRow);
                LoadSceneRow(sceneRow, scene);
@@ -147,7 +154,7 @@
        /// </summary>
        public void LoadSceneRow(FrameLayout bodyDiv, Scene scene)
        {
          var  btnIcon = new Button()
            var btnIcon = new Button()
            {
                X = Application.GetRealWidth(10),
                Y = Application.GetRealHeight(15),
@@ -214,15 +221,15 @@
                btnName.X = Application.GetRealWidth(52 + 16);
            }
            //加载场景控制事件
            LoadEvent_ControlScene(btnName,btnFromFloor,bodyDiv,scene );
            LoadEvent_ControlScene(btnName, btnFromFloor, bodyDiv, scene);
            LoadEvent_FunctionCollection(btnCollectionIcon,scene);
            LoadEvent_FunctionCollection(btnCollectionIcon, scene);
        }
        /// <summary>
        /// 加载功能收藏按钮事件
        /// </summary>
        void LoadEvent_FunctionCollection(Button btnCollectionIcon,Scene scene)
        void LoadEvent_FunctionCollection(Button btnCollectionIcon, Scene scene)
        {
            btnCollectionIcon.MouseUpEventHandler += (sender, e) =>
            {
@@ -233,9 +240,10 @@
        /// <summary>
        /// 加载场景控制事件
        /// </summary>
        void LoadEvent_ControlScene(Button btnName,Button btnFromFloor,FrameLayout bodyDiv, Scene scene)
        void LoadEvent_ControlScene(Button btnName, Button btnFromFloor, FrameLayout bodyDiv, Scene scene)
        {
            EventHandler<MouseEventArgs> upEvent = (sender, e) => {
            EventHandler<MouseEventArgs> upEvent = (sender, e) =>
            {
                DriverLayer.Control.Ins.ControlScene(scene);
                string msg = scene.name + Language.StringByID(StringId.AlreadyOpened);
                new PublicAssmebly().TipMsgAutoClose(msg, false);
@@ -245,5 +253,6 @@
            bodyDiv.MouseUpEventHandler = upEvent;
        }
    }
}
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -618,7 +618,24 @@
                        }
                    }
                    break;
                //萤石视频门锁
                case SPK.VideoDoorLock:
                    {
                        LogicView.FunTypeView view1 = new LogicView.FunTypeView();
                        view1.btnText.Text = "用户人员";// StringId.shipintonghuahujiao;
                        view1.btnText.Name = Language.StringByID(StringId.shipinmensuo);
                        fLayout.AddChidren(view1.FLayoutView());
                        view1.btnClick.MouseUpEventHandler += (sender, e) =>
                        {
                            this.VideoDoorLockAction(this, device, view1.btnState);
                        };
                        if (edit)
                        {
                            this.GetEditState(device, index, view1.btnState,null, null, null);
                        }
                    }
                    break;
            }
            #region  保存
            ///保存View
@@ -1075,6 +1092,52 @@
        }
        /// <summary>
        /// 萤石视频门锁专用(二级界面)
        /// </summary>
        /// <param name="frame">当前界面</param>
        /// <param name="device">当前设备</param>
        /// <param name="btnState">旧状态</param>
        public void VideoDoorLockAction(FrameLayout frame, Entity.Function device, Button btnState)
        {
            selectedState = device.spk + "_";
            Loading loading = new Loading();
            frame.AddChidren(loading);
            loading.Start();
            System.Threading.Tasks.Task.Run(() =>
            {
                try
                {
                    var userList = Send.Current.GetVideoDoorLockUserIdList(device.deviceId, true);
                    List<string> userIdList = new List<string>();
                    for (int i = 0; i < userList.Count; i++)
                    {
                        var user = userList[i];
                        userIdList.Add(user.userName);
                    }
                    Application.RunOnMainThread(() =>
                    {
                        loading.Hide();
                        PublicInterface publicInterface = new PublicInterface();
                        publicInterface.FrameOrVv(this, userIdList, new List<string> { btnState.Text }, device.name, (index) =>
                        {
                            var userId = userIdList[index];
                            //界面显示选中值
                            btnState.Text = userId;
                            //数据封装
                            AddDictionary("open_type", "1", "integer");
                            AddDictionary("user_id", userId, "string");
                        }, false);
                    });
                }
                catch { }
            });
        }
        /// <summary>
        /// 显示编辑之前的设备状态
        /// </summary>
        /// <param name="device">编辑设备</param>
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -406,6 +406,12 @@
                                        }
                                    }
                                    break;
                                case SPK.VideoDoorLock:
                                    {
                                        string value = this.GetValue(dicList);
                                        inputView.btnState.Text = value;
                                    }
                                    break;
                                case SPK.doorgate:
                                    {
                                        if (inputCondition.identifier == "door_call_cloud_event")
@@ -2128,6 +2134,15 @@
                        }
                    }
                    break;
                case SPK.VideoDoorLock:
                    {
                        foreach (var dic in dicList)
                        {
                            string value = dic["value"];
                            button1.Text = value;
                        }
                    }
                    break;
                case SPK.MusicStandard:
                case SPK.AvMusic:
                    {
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -187,7 +187,7 @@
            var list2 = this.GetVideoDeviceList();
            list.AddRange(list1);
            list.AddRange(list2);
            //GetTestDevice(ref list, true);
            GetTestDevice(ref list, true);
            return list;
        }
        /// <summary>
@@ -360,7 +360,8 @@
            {
                return "LogicIcon/sensor.png";
            }
            else if (SPK.DoorLock == device.spk)
            else if (SPK.DoorLock == device.spk
                || SPK.VideoDoorLock == device.spk)
            {
                return "FunctionIcon/DoorLock/DoorLock.png";
            }
@@ -576,7 +577,8 @@
                deviceStrTypeList.Add(Language.StringByID(StringId.Electric));
            }
            ///门锁类
            var doorlock = deviceList.Find((device) => device.spk == SPK.DoorLock);
            var doorlock = deviceList.Find((device) => device.spk == SPK.DoorLock
            || device.spk == SPK.VideoDoorLock);
            if (doorlock != null)
            {
                deviceStrTypeList.Add(Language.StringByID(StringId.DoorLock));
@@ -696,6 +698,7 @@
            else if (deviceType == Language.StringByID(StringId.DoorLock))
            {
                functionTypeList.Add(SPK.DoorLock);
                functionTypeList.Add(SPK.VideoDoorLock);
            }
            ///音乐类
            else if (deviceType == Language.StringByID(StringId.Music))
@@ -773,6 +776,7 @@
                functionTypeList.Add(SPK.MechanicalArm);
                functionTypeList.Add(SPK.IpCam_Imou);
                functionTypeList.Add(SPK.SensorPm10);
                functionTypeList.Add(SPK.VideoDoorLock);
            }
@@ -832,6 +836,7 @@
                        deviceTypeList.Add(SPK.doorgate);
                        deviceTypeList.Add(SPK.IpCam_Imou);
                        deviceTypeList.Add(SPK.SensorPm10);
                        deviceTypeList.Add(SPK.VideoDoorLock);
                    }
                    break;
@@ -1173,9 +1178,9 @@
                 //new Entity.Function { sid = "1234567890", name = "超声波传感器", spk = Entity.SPK.SensorUtrasonic },
                 // new Entity.Function { sid = "1234567891", name = "温度传感器", spk = Entity.SPK.SensorTemperature },
                 //  new Entity.Function { sid = "1234567892", name = "湿度传感器", spk = Entity.SPK.SensorHumidity },
                    new Entity.Function { sid = "12345678933456", name = "调光灯", spk = Entity.SPK.LightDimming },
                      new Entity.Function { sid = "1234567895444", name = "面板", spk = Entity.SPK.PanelSocket },
                      new Entity.Function { sid = "12345678968888", name = "pm10", spk = Entity.SPK.SensorPm10 },
                    new Entity.Function { sid = "12345678933456", name = "门锁", spk = Entity.SPK.DoorLock },
                      new Entity.Function { sid = "1234567895444", name = "视频门锁", spk = Entity.SPK.VideoDoorLock },
                      //new Entity.Function { sid = "12345678968888", name = "pm10", spk = Entity.SPK.SensorPm10 },
                      //  new Entity.Function { sid = "1234567897", name = "毫米波传感器1", spk = Entity.SPK.SenesorMegahealth2 },
                      // new Entity.Function { sid = "1234567899", name = "门磁传感器", spk = Entity.SPK.SensorDoorWindow },
                      //  new Entity.Function { sid = "12345678991234", name = "HDL机械手", spk = Entity.SPK.MechanicalArm },
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
@@ -462,6 +462,38 @@
        }
        /// <summary>
        /// 获取萤石视频门锁用户列表
        /// </summary>
        /// <param name="deviceId">可视对讲设备id</param>
        /// <returns></returns>
        public List<Face> GetVideoDoorLockUserIdList(string deviceId, bool isTip)
        {
            var jObject = new JObject();
            jObject.Add("homeId", LogicMethod.Current.HomeId);
            jObject.Add("deviceId", deviceId);
            var responsePackNew = RequestServerhomeId(jObject, NewAPI.Api_Post_GetListHomeFace, "获取住宅已录入人脸信息");
            //如果是token过期则刷新token
            if (responsePackNew.Code == StateCode.TOKEN_EXPIRED)
            {
                RefreshToken();
                GetListHomeFace(deviceId, isTip);
            }
            if (Check(responsePackNew, isTip) == false)
            {
                return new List<Face>();
            }
            var list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Face>>(responsePackNew.Data.ToString());
            if (list == null)
            {
                list = new List<Face>();
            }
            faceList.Clear();
            faceList.AddRange(list);
            return list;
        }
        /// <summary>
        ///请求服务器(与住宅有关:例如;homeId) 
        /// </summary>
HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
@@ -29,6 +29,18 @@
        /// 位置信息跳转编辑按钮
        /// </summary>
        Button btnLocationInfoRight;
        /// <summary>
        /// 删除设备
        /// </summary>
        Button delTextBtn;
        /// <summary>
        /// 下一级图标
        /// </summary>
        Button delRightBtn;
        /// <summary>
        /// 删除设备行FrameLayout
        /// </summary>
        FrameLayout delView;
        #endregion
@@ -38,13 +50,19 @@
        /// 后退时,刷新之前界面的显示信息
        /// </summary>
        Action actionRefresh;
        /// <summary>
        /// 解绑设备回调
        /// </summary>
        Action actionDel;
        #endregion
        public FunctionBaseInfoSetPage(Function func, Action action)
        public FunctionBaseInfoSetPage(Function func, Action action,Action actionDel=null)
        {
            bodyView = this;
            function = func;
            actionRefresh = action;
            this.actionDel = actionDel;
        }
        public override void RemoveFromParent()
@@ -180,13 +198,13 @@
                #endregion
            }
            #region 共享
            //var sharedView = new FrameLayout()
            //{
            //    Height = Application.GetRealHeight(55),
            //    BackgroundColor = CSS_Color.MainBackgroundColor,
            //};
            //contentView.AddChidren(sharedView);
            //var btnSharedText = new Button()
            //{
            //    X = Application.GetRealWidth(16),
@@ -219,6 +237,50 @@
            //    });
            #endregion
            #region 删除设备行
            delView = new FrameLayout()
            {
                Height = Application.GetRealHeight(55),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            if (this.function.spk == SPK.VideoDoorLock)
            {
                contentView.AddChidren(delView);
            }
            var lineBtn = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                BackgroundColor = CSS_Color.DividingLineColor,
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealHeight(1)
            };
            delView.AddChidren(lineBtn);
             delTextBtn = new Button()
            {
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(160),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextID = StringId.DeleteDevice,
            };
            delView.AddChidren(delTextBtn);
            delRightBtn= new Button()
            {
                X = Application.GetRealWidth(339),
                Gravity = Gravity.CenterVertical,
                Width = Application.GetMinRealAverage(16),
                Height = Application.GetMinRealAverage(16),
                UnSelectedImagePath = "Public/RightIcon.png",
            };
            delView.AddChidren(delRightBtn);
            #endregion
#if stage2
            #region 添加到桌面
            var addToDesktopView = new FrameLayout()
HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs
@@ -12,6 +12,8 @@
        {
            LoadEvent_ChangeFunctionName ();
            SkipChooseRoomPage();
            DelDeviceEvent();
        }
        /// <summary>
@@ -77,5 +79,45 @@
            }
                
        }
        /// <summary>
        /// 解绑设备的事件
        /// </summary>
        void DelDeviceEvent()
        {
            EventHandler<MouseEventArgs> ClickEvent = (sener, e) =>
            {
                new HDL_ON.UI.Music.View.TipView().TipBox(-1, StringId.AreYouSureToDeleteThisDevice, () =>
                {
                    UI2.FuntionControlView.VideoDoorLock.Send.Currnet.DelDevice(this.function, (isBool) =>
                    {
                        Application.RunOnMainThread(() =>
                        {
                            if (!isBool)
                            {
                                new Tip()
                                {
                                    CloseTime = 1,
                                    Text = Language.StringByID(StringId.delFail),
                                    Direction = AMPopTipDirection.None,
                                }.Show(bodyView);
                                return;
                            }
                            //删除本地文件
                            FunctionList.List.DeleteFunction(this.function);
                            this.RemoveFromParent();
                            this.actionDel?.Invoke();
                        });
                    });
                });
            };
            this.delView.MouseUpEventHandler += ClickEvent;
            this.delTextBtn.MouseUpEventHandler += ClickEvent;
            this.delRightBtn.MouseUpEventHandler += ClickEvent;
        }
    }
}
HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs
@@ -86,7 +86,7 @@
                d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
                d.Add("deviceIds", functionIds);
                var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_RefreshDeviceStatus, "刷新设备状态");
                if (!this.dataChecking(responsePackNew))
                if (!this.DataChecking(responsePackNew))
                {
                    return;
                }
@@ -123,7 +123,7 @@
                d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
                d.Add("deviceIds", new List<string> { music.deviceId });
                var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_PlayerList, "获取音乐列表");
                if (!this.dataChecking(responsePackNew))
                if (!this.DataChecking(responsePackNew))
                {
                    return;
                }
@@ -173,7 +173,7 @@
                }
                d.Add("deviceInfos", new List<Dictionary<string, object>> { deviceIds });
                var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_GroupList, "获取列表名列表");
                if (!this.dataChecking(responsePackNew))
                if (!this.DataChecking(responsePackNew))
                {
                    return new List<GroupList>();
                }
@@ -238,7 +238,7 @@
                d.Add("sidGroups", new List<Dictionary<string, object>> { d1 });
                var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_GroupPlayerList, "通过列表名获取歌曲列表");
                if (!this.dataChecking(responsePackNew))
                if (!this.DataChecking(responsePackNew))
                {
                    return new List<PalyerSongListInfo>();
                }
@@ -282,7 +282,7 @@
        /// </summary>
        /// <param name="responsePackNew">回复数据对象</param>
        /// <returns></returns>
        private bool dataChecking(ResponsePackNew responsePackNew)
        public bool DataChecking(ResponsePackNew responsePackNew)
        {
            if (responsePackNew.Code != "0" || responsePackNew.Data == null || responsePackNew.Data.ToString() == "")
            {
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/Send.cs
New file
@@ -0,0 +1,80 @@
using System;
using System.Threading;
using HDL_ON.Entity;
namespace HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock
{
    public class Send
    {
        public Send()
        {
        }
        private static Send send = null;
        public static Send Currnet
        {
            get
            {
                if (send == null)
                {
                    send = new Send();
                }
                return send;
            }
        }
        /// <summary>
        /// 解绑设备
        /// </summary>
        /// <param name="function">当前的设备</param>
        /// <param name="action">回调结果</param>
        public void DelDevice(Function function, Action<bool> action)
        {
            new Thread(() =>
            {
                try
                {
                    //HDL_ON.UI.Music.SendMethod.Current.RequestServerhomeId();
                    if (function != null)
                    {
                        action?.Invoke(false);
                    }
                }
                catch(Exception s) {
                }
            })
            { IsBackground = true }.Start();
        }
        /// <summary>
        /// 获取电池电量
        /// </summary>
        /// <param name="function">当前的设备</param>
        /// <param name="action">回调结果</param>
        public void GetCellValue(Function function, Action<int> action)
        {
            new Thread(() =>
            {
                try
                {
                    //HDL_ON.UI.Music.SendMethod.Current.RequestServerhomeId();
                    if (function != null)
                    {
                        action?.Invoke(8);
                    }
                }
                catch (Exception s)
                {
                }
            })
            { IsBackground = true }.Start();
        }
    }
}
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockListPage.cs
@@ -171,10 +171,13 @@
            this.dicBatteryContr[i_device.sid] = btnBattery;
            frameBack.ButtonClickEvent += (sender, e) =>
            {
                var form = new VideoDoorLockPage(i_device, btnName, btnRoom,Comerom.function);
                var form = new VideoDoorLockPage(i_device, btnName, btnRoom,Comerom.function,()=> {
                    this.CloseForm();
                });
                MainPage.BasePageView.AddChidren(form);
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                form.Show();
                //var form = new VideoDoorLockPage();
                //form.AddForm(i_device, new Button(), btnName, btnRoom);
            };
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs
@@ -44,6 +44,10 @@
        /// </summary>
        private Button btnCell;
        /// <summary>
        /// 电量进度条
        /// </summary>
        private DiyArcSeekBar cellDiyArcSeekBar;
        /// <summary>
        ///收藏图标
        /// </summary>
        private Button btnCollectIcon;
@@ -55,10 +59,6 @@
        /// 实时视频
        /// </summary>
        private CustomFrameLayout rtvFL;
        /// <summary>
        /// 一键开锁
        /// </summary>
        private CustomFrameLayout openFL;
        /// <summary>
        /// 临时密码
        /// </summary>
@@ -72,6 +72,10 @@
        /// 表示来自那个界面
        /// </summary>
        private Comerom Comerom;
        /// <summary>
        /// 删除设备后需要更新界面的回调
        /// </summary>
        public Action action;
        #endregion
@@ -81,12 +85,13 @@
        /// <param name="function">设备</param>
        /// <param name="btnDeviceName">上一级界面的设备名字控件</param>
        /// <param name="btnRoomName">上一级界面的房间名字控件</param> 
        public VideoDoorLockPage(Function function, Button btnDeviceName, Button btnRoomName, Comerom comerom)
        public VideoDoorLockPage(Function function, Button btnDeviceName, Button btnRoomName, Comerom comerom, Action action)
        {
            this.device = function;
            this.btnDeviceName = btnDeviceName;
            this.btnRoomName = btnRoomName;
            this.Comerom = comerom;
            this.action = action;
        }
@@ -95,10 +100,15 @@
            //初始化UI
            this.InitUI();
            //初始化事件
            this.EventListener ();
            this.EventListener();
            //读取数据
            this.ReadData();
        }
        /// <summary>
        /// 初始化界面
        /// </summary>
@@ -108,16 +118,16 @@
            this.BackgroundColor = MusicColor.ViewColor;
            this.topView = new TopView();
            this.topView.setBtn.Visible = true;
            this.topView.topNameBtn.TextID =StringId.shipinmensuo;
            this.topView.topNameBtn.TextID = StringId.shipinmensuo;
            this.AddChidren(topView.TopFLayoutView());
            var middleFl=new FrameLayout
            var middleFl = new FrameLayout
            {
                Y = topView.fLayout.Bottom,
                Height = Application.GetRealHeight(H_W.H - H_W.T_Height),
            };
            this.AddChidren(middleFl);
            var whiteFl = new FrameLayout
            var whiteFl = new FrameLayout
            {
                Y = Application.GetRealHeight(24),
                X = Application.GetRealWidth(24),
@@ -128,48 +138,6 @@
            };
            middleFl.AddChidren(whiteFl);
            btnCurrDeviceName= new Button
            {
                TextSize = TextSize.Text24,
                TextColor = MusicColor.Text18Color,
                Width = Application.GetRealWidth(160),
                Height = Application.GetRealHeight(33),
                Y = Application.GetRealHeight(16),
                X = Application.GetRealWidth(16),
                Text = this.device.name,
                TextAlignment=TextAlignment.CenterLeft,
            };
            whiteFl.AddChidren(btnCurrDeviceName);
            btnCurrDeviceRoom = new Button
            {
                TextSize = TextSize.Text12,
                TextColor = MusicColor.MusicNoTxetColor,
                Width = Application.GetRealWidth(160),
                Height = Application.GetRealHeight(33),
                Y = btnCurrDeviceName.Bottom+ Application.GetRealHeight(4),
                X = Application.GetRealWidth(16),
                Text = this.device.GetRoomListName(),
                TextAlignment = TextAlignment.CenterLeft,
            };
            whiteFl.AddChidren(btnCurrDeviceRoom);
            btnCurrDeviceRoom.Width=btnCurrDeviceName.GetTextWidth();
            btnCell = new Button
            {
                TextSize = TextSize.Text10,
                TextColor = MusicColor.TextColor,
                Y = Application.GetRealHeight(43),
                X = btnCurrDeviceRoom.Right+Application.GetRealWidth(17),
                //Text ="60"+"%",
                //TextAlignment = TextAlignment.Center,
                Width = Application.GetRealWidth(36),
                Height = Application.GetRealWidth(36),
                UnSelectedImagePath ="FunctionIcon/DoorLock/Cell.png",
            };
            whiteFl.AddChidren(btnCell);
            btnCollectIcon = new Button
            {
                X = Application.GetRealWidth(264),
@@ -178,10 +146,84 @@
                Height = Application.GetRealWidth(40),
                UnSelectedImagePath = "MusicIcon/collect.png",
                SelectedImagePath = "MusicIcon/collectSelected.png",
                IsSelected= this.device.collect,
                IsSelected = this.device.collect,
                Name = "collect"
            };
            whiteFl.AddChidren(btnCollectIcon);
            btnCurrDeviceName = new Button
            {
                TextSize = TextSize.Text24,
                TextColor = MusicColor.Text18Color,
                Width = Application.GetRealWidth(160),
                Height = Application.GetRealHeight(33),
                Y = Application.GetRealHeight(16),
                X = Application.GetRealWidth(16),
                Text = this.device.name,
                TextAlignment = TextAlignment.CenterLeft,
            };
            whiteFl.AddChidren(btnCurrDeviceName);
            btnCurrDeviceName.Width = btnCurrDeviceName.GetTextWidth();
            if (btnCurrDeviceName.GetTextWidth() > btnCollectIcon.X)
            {
                btnCurrDeviceName.Width = btnCollectIcon.X;
            }
            btnCurrDeviceRoom = new Button
            {
                TextSize = TextSize.Text12,
                TextColor = MusicColor.MusicNoTxetColor,
                Width = Application.GetRealWidth(160),
                Height = Application.GetRealHeight(17),
                Y = btnCurrDeviceName.Bottom + Application.GetRealHeight(4),
                X = Application.GetRealWidth(16),
                Text = this.device.GetRoomListName(),
                TextAlignment = TextAlignment.CenterLeft,
            };
            whiteFl.AddChidren(btnCurrDeviceRoom);
            btnCurrDeviceRoom.Width = btnCurrDeviceRoom.GetTextWidth();
            var cellFrame = new FrameLayout
            {
                X = btnCurrDeviceRoom.Right + Application.GetRealWidth(20),
                Y = btnCurrDeviceName.Bottom + Application.GetRealHeight(5),
                Width = Application.GetRealWidth(30),
                Height = Application.GetRealHeight(16),
            };
            whiteFl.AddChidren(cellFrame);
            cellDiyArcSeekBar = new DiyArcSeekBar
            {
                X = Application.GetRealWidth(3),
                Y = Application.GetRealHeight(3),
                Width = cellFrame.Width + Application.GetRealWidth(-6),
                Height = cellFrame.Height + Application.GetRealHeight(-6),
                Progress = 60,
                ProgressBarColor = MusicColor.MusicNoTxetColor,
                MaxValue = 100,
                MinValue = 0,
                //IsCanMove = false,
                //IsCanScrolled=false,
            };
            //cellFrame.AddChidren(cellDiyArcSeekBar);
            btnCell = new Button
            {
                TextSize = TextSize.Text10,
                TextColor = MusicColor.TextColor,
                Text = "60" + "%",
                TextAlignment = TextAlignment.Center,
                UnSelectedImagePath = "FunctionIcon/DoorLock/Cell.png",
            };
            cellFrame.AddChidren(btnCell);
            //门锁状态
            btnDoorLockIcon = new Button
            {
@@ -193,12 +235,12 @@
                SelectedImagePath = "FunctionIcon/DoorLock/UnLocking.png",
            };
            whiteFl.AddChidren(btnDoorLockIcon);
            int heightY = btnDoorLockIcon.Bottom + Application.GetRealHeight(70);
            //实时视频
            rtvFL = new CustomFrameLayout(CustomFrameLayout.widthFrameLayout, CustomFrameLayout.heightFrameLayout);
            whiteFl.AddChidren(rtvFL);
            rtvFL.Y = btnDoorLockIcon.Bottom+ Application.GetRealHeight(45);
            rtvFL.X = Application.GetRealWidth(68);
            rtvFL.Y = heightY;
            rtvFL.X = Application.GetRealWidth(41);
            rtvFL.AddImageView();
            rtvFL.AddTextButtonView();
            rtvFL.GetImageButton().UnSelectedImagePath = "FunctionIcon/DoorLock/RTV.png";
@@ -206,32 +248,24 @@
            //历史记录
            recordFL = new CustomFrameLayout(CustomFrameLayout.widthFrameLayout, CustomFrameLayout.heightFrameLayout);
            whiteFl.AddChidren(recordFL);
            recordFL.Y = btnDoorLockIcon.Bottom + Application.GetRealHeight(45);
            recordFL.X = rtvFL.Right + Application.GetRealHeight(CustomFrameLayout.interval);
            recordFL.Y = heightY;
            recordFL.X = rtvFL.Right + Application.GetRealWidth(CustomFrameLayout.interval);
            recordFL.AddImageView();
            recordFL.AddTextButtonView();
            recordFL.GetImageButton().UnSelectedImagePath = "FunctionIcon/DoorLock/HistoryList.png";
            recordFL.GetTextButton().TextID = StringId.lishijilu;
            //一键开锁
            openFL = new CustomFrameLayout(CustomFrameLayout.widthFrameLayout, CustomFrameLayout.heightFrameLayout);
            whiteFl.AddChidren(openFL);
            openFL.X = rtvFL.X;
            openFL.Y = rtvFL.Bottom+Application.GetRealHeight(14);
            openFL.AddImageView();
            openFL.AddTextButtonView();
            openFL.GetImageButton().UnSelectedImagePath = "FunctionIcon/DoorLock/OneOpenLock.png";
            openFL.GetTextButton().TextID = StringId.yijiankaisuo;
            //临时密码
            pswFL = new CustomFrameLayout(CustomFrameLayout.widthFrameLayout, CustomFrameLayout.heightFrameLayout);
            whiteFl.AddChidren(pswFL);
            pswFL.X = recordFL.X;
            pswFL.Y = rtvFL.Bottom + Application.GetRealHeight(14);
            pswFL.Y = heightY;
            pswFL.X = recordFL.Right + Application.GetRealWidth(CustomFrameLayout.interval);
            pswFL.AddImageView();
            pswFL.AddTextButtonView();
            pswFL.GetImageButton().UnSelectedImagePath = "FunctionIcon/DoorLock/OneOpenLock.png";
            pswFL.GetTextButton().TextID = StringId.linshimima1;
            #endregion
        }
        /// <summary>
@@ -261,7 +295,7 @@
                    this.btnRoomName.Text = this.device.GetRoomListName();
                    this.topView.topNameBtn.Text = this.device.name;
                    this.btnCurrDeviceName.Text = this.device.name;
                    this.btnCurrDeviceRoom.Text= this.device.GetRoomListName();
                    this.btnCurrDeviceRoom.Text = this.device.GetRoomListName();
                    ////从新计算宽度
                    //this.btnDeviceName.Text = btnDeviceName.Text;
@@ -272,27 +306,54 @@
                    ////回调事件
                    //this.SettionFinishEvent?.Invoke();
                }, () =>
                {
                    //解绑设备后
                    this.RemoveFromParent();
                    this.action?.Invoke();
                });
                MainPage.BasePageView.AddChidren(infoView);
                infoView.LoadPage();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            //收藏
            btnCollectIcon.MouseUpEventHandler += (sender, e) =>
            this.btnCollectIcon.MouseUpEventHandler += (sender, e) =>
            {
                btnCollectIcon.IsSelected = this.device.collect = !btnCollectIcon.IsSelected;
                this.device.CollectFunction();
            };
            //实时视频
            rtvFL.SetClickListener((fl, btnStateImage, btnStateText) => { });
            //一键开锁
            openFL.SetClickListener((fl, btnStateImage, btnStateText) => { });
            //临时密码
            pswFL.SetClickListener((fl, btnStateImage, btnStateText) => { });
            //历史记录
            recordFL.SetClickListener((fl, btnStateImage, btnStateText) => { });
            this.rtvFL.SetClickListener((fl, btnStateImage, btnStateText) =>
            {
            });
            //临时密码
            this.pswFL.SetClickListener((fl, btnStateImage, btnStateText) => { });
            //历史记录
            this.recordFL.SetClickListener((fl, btnStateImage, btnStateText) => { });
        }
        /// <summary>
        /// 初始数据
        /// </summary>
        private void ReadData()
        {
            new System.Threading.Thread(() =>
            {
                HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.Send.Currnet.GetCellValue(this.device, (value) =>
                {
                    Application.RunOnMainThread(() =>
                    {
                        //this.cellDiyArcSeekBar.Progress = i;
                        //更新电量值
                        this.btnCell.Text = value + "%";
                    });
                });
            })
            { IsBackground = true }.Start();
        }
    }
@@ -301,11 +362,11 @@
    /// </summary>
    class CustomFrameLayout : FrameLayout
    {
        public const int widthFrameLayout = 74;
        public const int heightFrameLayout = 70;
        public const int yFrameLayout = 353;
        public const int xFrameLayout = 68;
        public const int interval = 47;//行中的列间隔值
        public const int widthFrameLayout = 48;
        public const int heightFrameLayout = 53;
        public const int yFrameLayout = 378;
        public const int xFrameLayout = 41;
        public const int interval = 51;//行中的列间隔值
        public CustomFrameLayout(int width, int height, int x = 0, int y = 0)
        {
@@ -372,11 +433,7 @@
        {
            EventHandler<MouseEventArgs> click = (sender, e) =>
                    {
                        if (action == null)
                        {
                            return;
                        }
                        action(this, btnStateImage, btnStateText);
                        action?.Invoke(this, btnStateImage, btnStateText);
                    };
            this.MouseUpEventHandler += click;
            btnStateImage.MouseUpEventHandler += click;