xm
2020-04-22 dfa6733793434bdcfd394f978ae72f1628b2260f
合并代码
40个文件已修改
2092 ■■■■■ 已修改文件
ZigbeeApp/GateWay.Droid/Assets/Language.ini 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Resources/Language.ini 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Common/CommonPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Common/Device.cs 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/DLL/Android/Shared.Droid.HDLWidget.dll 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/DLL/IOS/Shared.IOS.TBL.dll 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/AddCondition.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/MainPage/DeviceDetailInfoForm.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/BottomItemSelectForm.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceDoorLockLogic.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlRoomLogic.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/ChooseKeyModePage.cs 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLighWithSensorForm.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs 273 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetForm.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetsForm.cs 947 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFunctionSettionForm.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/ShowDoorLockMsgControl.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UnLockMethod.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayProductInfoForm.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs 83 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/R.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Assets/Language.ini
@@ -309,11 +309,10 @@
303=温度来源
304=湿度来源
305=PM2.5来源
307=不能创建自动化常开模式
308=不能取消自动化常开模式
307=警告!时效性常开关闭门锁功能失败,请手动取消常开模式。
308=警告!时效性常开删除失败。
309=时效性常开删除失败,继续“常开模式”请前往门锁用户界面设置;
5097=取消
5098=确定
@@ -1744,7 +1743,7 @@
16034=闪光灯
16035=房间的内容在此处显示
16036=我知道了
16037=分享数据已经变更,请重新登陆
16037=分享数据已经变更,请重新登录
16038=工作模式
16039=控制模式
16040=触发模式
@@ -1801,7 +1800,7 @@
16091=常开模式手动开启
16092=常开模式手动取消
16093=常开模式启用{0}小时
16094=您的权限已经变更,请重新登陆
16094=您的权限已经变更,请重新登录
16095=我已阅读并同意
16096=隐私权政策
16097=和
ZigbeeApp/Home.Ios/Resources/Language.ini
@@ -312,7 +312,7 @@
307=警告!时效性常开关闭门锁功能失败,请手动取消常开模式。
308=警告!时效性常开删除失败。
309=时效性常开删除失败,继续“常开模式”请前往门锁用户界面设置;
310=请输入合法的数字
5097=取消
5098=确定
@@ -1743,7 +1743,7 @@
16034=闪光灯
16035=房间的内容在此处显示
16036=我知道了
16037=分享数据已经变更,请重新登陆
16037=分享数据已经变更,请重新登录
16038=工作模式
16039=控制模式
16040=触发模式
@@ -1800,7 +1800,7 @@
16091=常开模式手动开启
16092=常开模式手动取消
16093=常开模式启用{0}小时
16094=您的权限已经变更,请重新登陆
16094=您的权限已经变更,请重新登录
16095=我已阅读并同意
16096=隐私权政策
16097=和
ZigbeeApp/Shared/Common/CommonPage.cs
@@ -57,7 +57,7 @@
        /// <summary>
        /// 版本号
        /// </summary>
        public static string CodeIDString = "1.0.20041501";
        public static string CodeIDString = "1.0.20041601";
        /// <summary>
        /// 注册来源(0:HDL On 1:Zigbee)
        /// </summary>
ZigbeeApp/Shared/Common/Device.cs
old mode 100755 new mode 100644
@@ -115,7 +115,7 @@
            {
                CommonDevice device = null;
                //反序列化为指定的类,不然数据会丢失而导致无法强转
                try
                try
                {
                    device = CommonDevice.CommonDeviceByFilePath(file);
                }
@@ -1766,6 +1766,14 @@
                    info.ConcreteType = DeviceConcreteType.Sensor_Humidity;
                }
                info.ObjectTypeNameId = 60000;//传感器
            }
            //14新风设备
            else if (dicType.ContainsKey(DeviceType.FreshAir) == true)
            {
                info.ConcreteTextId = R.MyInternationalizationString.DeviceModelId2310;
                info.BeloneType = DeviceBeloneType.A新风;
                info.ConcreteType = DeviceConcreteType.Relay_FangyueFreshAirModul;
                info.ObjectTypeNameId = 60011;//新风
            }
            int value = (int)info.BeloneType;
@@ -2024,8 +2032,8 @@
            list.Add(DeviceBeloneType.A传感器);
            //其他的看着办呗,都是排在后面的,都归为这个属性
            list.Add(DeviceBeloneType.A未知设备);
            list.Add(DeviceBeloneType.A未知设备);
            return list;
        }
@@ -2826,9 +2834,9 @@
        /// <summary>
        /// 方悦新风小模块 镜像id:2310
        /// </summary>
        Relay_FangyueFreshAirModul = 2310,
        //=========★★调光器类(2500-2799)★★=========
        Relay_FangyueFreshAirModul = 2310,
        //=========★★调光器类(2500-2799)★★=========
        /// <summary>
        /// 调光器
        /// </summary>
@@ -3002,7 +3010,11 @@
        /// <summary>
        /// 干接点
        /// </summary>
        A干接点 = 16
        A干接点 = 16,
        /// <summary>
        /// 新风
        /// </summary>
        A新风 = 17
    }
    #endregion
ZigbeeApp/Shared/DLL/Android/Shared.Droid.HDLWidget.dll
Binary files differ
ZigbeeApp/Shared/DLL/IOS/Shared.IOS.TBL.dll
Binary files differ
ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
old mode 100755 new mode 100644
@@ -476,7 +476,16 @@
            var listDevice = new List<CommonDevice>();
            for (int i = 0; i < rowInfo.listDeviceKeys.Count; i++)
            {
                var device = LocalDevice.Current.GetDevice(rowInfo.listDeviceKeys[i]);
                var device = LocalDevice.Current.GetDevice(rowInfo.listDeviceKeys[i]);
                //获取设备类型的
                var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
                //新风面板下的回路不显示,(如新风、温/湿度传感器则不显示)
                if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
                {
                    continue;
                }
                if (device != null)
                {
                    listDevice.Add(device);
@@ -511,6 +520,11 @@
                    }
                    //空调
                    else if (device.Type == DeviceType.Thermostat)
                    {
                        cardContr = new Controls.DeviceAcRowControl(listView.rowSpace / 2);
                    }
                    // 新风
                    else if (device.Type == DeviceType.FreshAir)
                    {
                        cardContr = new Controls.DeviceAcRowControl(listView.rowSpace / 2);
                    }
@@ -611,21 +625,43 @@
            }
            var dicSceneContr = new Dictionary<int, SceneCategoryView>();
            var listview = new VerticalListControl();
            functionSceneBodyView.AddChidren(listview);
            //主人,管理员专用刷新控件
            VerticalListRefreshControl listview1 = null;
            //成员专用不能刷新的控件
            VerticalListControl listview2 = null;
            //if (UserCenterResourse.UserInfo.AuthorityNo == 1 || UserCenterResourse.UserInfo.AuthorityNo == 2)
            //{
            //    listview1 = new VerticalListRefreshControl();
            //    functionSceneBodyView.AddChidren(listview1);
            //}
            //else
            {
                listview2 = new VerticalListControl();
                functionSceneBodyView.AddChidren(listview2);
            }
            foreach (var scene in listScene)
            {
                //场景卡片控件
                var sceneView = new SceneCategoryView();
                listview.AddChidren(sceneView);
                listview1?.AddChidren(sceneView);
                listview2?.AddChidren(sceneView);
                sceneView.InitControl(scene, room);
                dicSceneContr[scene.Id] = sceneView;
            }
            HdlThreadLogic.Current.RunThread(() =>
            {
                //获取全部场景的延时时间
                this.GetAllDelayScene(dicSceneContr, listview);
                if (listview1 != null)
                {
                    //获取全部场景的延时时间
                    this.GetAllDelayScene(dicSceneContr, listview1);
                }
                else
                {
                    //获取全部场景的延时时间
                    this.GetAllDelayScene(dicSceneContr, listview2);
                }
            }, ShowErrorMode.NO);
        }
@@ -633,7 +669,7 @@
        /// 获取全部场景的延时时间
        /// </summary>
        /// <param name="dicSceneContr"></param>
        private async void GetAllDelayScene(Dictionary<int, SceneCategoryView> dicSceneContr, VerticalListControl listview)
        private async void GetAllDelayScene(Dictionary<int, SceneCategoryView> dicSceneContr, ViewGroup listview)
        {
            //读取全部的延时时间
            var result = await Scene.CatDelaySceneAsync();
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/AddCondition.cs
@@ -262,7 +262,10 @@
                var accounts = new Dictionary<string, string>();
                accounts.Add("Type", "1");
                accounts.Add("Account", Config.Instance.Guid);
                accounts.Add("AccountName",accountName);
                accounts.Add("AccountName",accountName);
                ///mac+端口是为识别是那个门锁;
                accounts.Add("MacAddr", Send.CurrentDoorLock.DeviceAddr);
                accounts.Add("Epoint", Send.CurrentDoorLock.DeviceEpoint.ToString());
                accounts.Add("UserId", userId);
                if (SelectedDeviceStatuscondition != "")
                {
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs
@@ -85,7 +85,14 @@
                        }
                        bool yes = false;
                        for (int a = 0; a < logic.Accounts.Count; a++)
                        {
                        {
                            if (logic.Accounts[a]["MacAddr"].ToString() != Send.CurrentDoorLock.DeviceAddr && logic.Accounts[a]["Epoint"].ToString() != Send.CurrentDoorLock.DeviceEpoint.ToString())
                            {
                                //查找是否是那个门锁;
                                //如果不是该门锁联动事件不显示出来;
                                yes = false;
                                break;
                            }
                            if (logic.Accounts[a]["Account"].ToString() == Config.Instance.Guid)
                            {
                                //查找自己账号下的创建联动事件;
ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs
old mode 100644 new mode 100755
@@ -67,7 +67,7 @@
                            Common.Logic.LogicDviceList.AddRange(LocalDevice.Current.listAllDevice.ToArray());
                        }
                        //读取系统当前时间:时-分
                        //读取系统当前时间:时-分
                        //读取系统当前时间:时-分
                        var h = DateTime.Now.ToString("HH");
                        var m = DateTime.Now.ToString("mm");
                        Dictionary<string, string> timeConditionsInfo = new Dictionary<string, string>();
@@ -345,9 +345,9 @@
        /// 加载自动化列表界面
        /// </summary>
        /// <param name="refresview">Refresview.</param>
        static RowLayout selectedRow = new RowLayout() { Tag = "0" };//记录左滑状态
        static  RowLayout selectedRow = new RowLayout() { Tag="0"};//记录左滑状态
        private static async void Automationview(VerticalRefreshLayout refresview, bool no)
        {
            refresview.RemoveAll();
@@ -438,7 +438,7 @@
                    //实现android显示逻辑列表的圆角;
                    fLayout.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft);
                    logicRowlayout.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft);
                }
                i++;
                var logicnameBtn = new Button
@@ -763,14 +763,14 @@
            }
            return false;//表示添加失败;
        }
        ///<summary>
        /// s-one门锁是否存在自动化的方法;
        /// 注意(参数2;3):valueInt=3是删除设置失效时间自动化;valueInt=2判断是否存在自动化;
        /// 返回值:0不存在;1存在;2删除成功;3删除失败;
        /// </summary>
        public static async System.Threading.Tasks.Task<int> Exist(int valueInt = 2)
        }
        ///<summary>
        /// s-one门锁是否存在自动化的方法;
        /// 注意(参数2;3):valueInt=3是删除设置失效时间自动化;valueInt=2判断是否存在自动化;
        /// 返回值:0不存在;1存在;2删除成功;3删除失败;
        /// </summary>
        public static async System.Threading.Tasks.Task<int> Exist(int valueInt = 2)
        {
            int exist = 0;
            var Idlist = await Send.GetLogicId(valueInt);
@@ -781,27 +781,27 @@
                    for (int i = 0; i < Idlist.Count; i++)
                    {
                        //valueInt=3一条特殊的自动化(用来设置失效时间)
                        var d = await Send.DelLogic(Idlist[i]);
                        if (d != 0)
                        {
                            //删除成功
                            exist = 2;
                        }
                        else
                        {
                            //删除失败
                            exist = 3;
                        }
                        return exist;
                        var d=await Send.DelLogic(Idlist[i]);
                        if (d == 0)
                        {
                            //删除成功
                            exist = 2;
                        }
                        else
                        {
                            //删除失败
                            exist = 3;
                        }
                        return exist;
                    }
                }
                    }
                }
                exist = 1;
            }
            return exist;
        }
    }
}
ZigbeeApp/Shared/Phone/MainPage/DeviceDetailInfoForm.cs
@@ -319,6 +319,7 @@
                        var title = Language.StringByID(R.MyInternationalizationString.uSelectFunctionType);
                        var form = new BottomItemSelectForm();
                        form.SelectRowCanCancel = false;//选择的不能取消
                        form.AddForm(title, listText, nowSelectNo);
                        form.FinishSelectEvent += (selectNo) =>
                        {
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/BottomItemSelectForm.cs
@@ -19,6 +19,14 @@
        /// 前回选择的控件
        /// </summary>
        private NormalSelectControl oldSelectContr = null;
        /// <summary>
        /// 选择取消(不是左上角),并且按下确定键时,是否调用回调函数(调用时传递的参数是 -1,默认不回调)
        /// </summary>
        public bool CancelCallEvent = false;
        /// <summary>
        /// 选择的行能否取消
        /// </summary>
        public bool SelectRowCanCancel = true;
        #endregion
@@ -111,6 +119,11 @@
                    //回调函数
                    FinishSelectEvent.Invoke(Convert.ToInt32(oldSelectContr.MainKeys));
                }
                else if (FinishSelectEvent != null && this.CancelCallEvent == true)
                {
                    //回调函数
                    FinishSelectEvent.Invoke(-1);
                }
                this.CloseForm();
            };
@@ -138,8 +151,12 @@
                    //取消选择
                    if (btnRow.IsSelected == true)
                    {
                        btnRow.IsSelected = false;
                        oldSelectContr = null;
                        //允许取消的时候,才能取消
                        if (this.SelectRowCanCancel == true)
                        {
                            btnRow.IsSelected = false;
                            oldSelectContr = null;
                        }
                        return;
                    }
                    if (oldSelectContr != null)
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceDoorLockLogic.cs
@@ -88,7 +88,7 @@
            var pra2 = new AddDoorPra();
            pra2.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
            pra2.DoorLockId = i_doorLock.DeviceAddr + "_" + i_doorLock.DeviceEpoint;
            var result2 = await UserCenterLogic.GetResponseDataByRequestHttps("DoorLock/AddDoorLock", true, pra, listCheck);
            var result2 = await UserCenterLogic.GetResponseDataByRequestHttps("DoorLock/AddDoorLock", true, pra2, listCheck);
            //云端是直接返回创建的主键字符串
            return result2;
        }
@@ -122,6 +122,10 @@
            /// 常开持续时间(1~72小时 OtherOpenLockMode=9003的时候有效)
            /// </summary>
            public string NormallyOpenContinuedTime = string.Empty;
            /// <summary>
            /// 开锁时间(历史记录的时间From-To检索的对象)
            /// </summary>
            public string UnlockTime = DateTime.UtcNow.ToString();
        }
        /// <summary>
@@ -184,6 +188,10 @@
            /// 其他开锁方式 固定9000
            /// </summary>
            public int OpenLockMode = 9000;
            /// <summary>
            ///  录入时间
            /// </summary>
            public string EntryTime = DateTime.Now.ToString();
        }
        /// <summary>
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlRoomLogic.cs
@@ -1018,9 +1018,11 @@
            if (strData != null)
            {
                listFloorSort = Newtonsoft.Json.JsonConvert.DeserializeObject<List<string>>(strData);
            }
            foreach (string keys in Common.Config.Instance.Home.FloorDics.Keys)
            {
            }
            foreach (string keys in Common.Config.Instance.Home.FloorDics.Keys)
            {
                if (listFloorSort != null)
                {
                    if (listFloorSort.Contains(keys) == false)
@@ -1029,9 +1031,10 @@
                        listFloorSort.Add(keys);
                    }
                }
            }
            var dic = new Dictionary<string, string>();
            }
            var dic = new Dictionary<string, string>();
            if (listFloorSort != null)
            {
                for (int i = 0; i < listFloorSort.Count; i++)
@@ -1042,7 +1045,6 @@
                    }
                }
            }
            //保存顺序
            UserCenterLogic.SaveFileContent(fullName, listFloorSort);
            return dic;
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs
old mode 100755 new mode 100644
@@ -102,20 +102,20 @@
            {
                RemoveFromParent();
            };
            this.btnTitle.Width = Application.GetRealWidth(1080 - 161 - 200 - 58);
            this.btnTitle.Width = Application.GetRealWidth(1080 - 161 - 300);
            this.btnBack.MouseUpEventHandler += eHandlerBack;
            this.btnBackFrameLayout.MouseUpEventHandler += eHandlerBack;
            this.MidFrameLayout(this);
            var btnAddFrameLayout = new FrameLayout
            {
                X = Application.GetRealWidth(830),
                X = Application.GetRealWidth(619),
            };
            this.titleFrameLayout.AddChidren(btnAddFrameLayout);
            btnFloorText = new Button
            {
                Width = Application.GetRealWidth(110),
                Width = Application.GetRealWidth(300 - 69 - 58),
                X = Application.GetRealWidth(15),
                Text = Language.StringByID(R.MyInternationalizationString.FirstFloor),
                TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
@@ -125,32 +125,40 @@
            };
            btnAddFrameLayout.AddChidren(btnFloorText);
            var btnBindDownFrameLayout = new FrameLayout
            {
                Width = Application.GetMinReal(69 + 58),
                X = Application.GetRealWidth(300 - 69 - 58),
            };
            btnAddFrameLayout.AddChidren(btnBindDownFrameLayout);
            var btnBindDown = new Button
            {
                Height = Application.GetMinReal(69),
                Width = Application.GetMinReal(69),
                X = Application.GetRealWidth(200 - 77),
                UnSelectedImagePath = "BindPic/BindDown.png",
                Gravity = Gravity.CenterVertical,
            };
            btnAddFrameLayout.AddChidren(btnBindDown);
            btnBindDownFrameLayout.AddChidren(btnBindDown);
            if (Common.Config.Instance.Home.FloorDics.Count == 0)
            {
                btnBindDown.Visible = false;
            }
            btnBindDown.MouseDownEventHandler += (sender, e) =>
            EventHandler<MouseEventArgs> eHandlerBindDown = (sender, e) =>
            {
                SideslipFramelayout();
            };
            btnBindDown.MouseDownEventHandler += eHandlerBindDown;
            btnBindDownFrameLayout.MouseDownEventHandler += eHandlerBindDown;
            if (Common.Config.Instance.Home.FloorDics.Count == 0)
            {
                btnAddFrameLayout.Width = 0;
            }
            else
            {
                btnAddFrameLayout.Width = Application.GetRealWidth(200);
                btnAddFrameLayout.Width = Application.GetRealWidth(300);
            }
            MidFrameLayoutContent(btnFloorText);
        }
@@ -733,7 +741,6 @@
            var sidelipFrameLayout = new FrameLayout()
            {
                Height = Application.GetMinReal(783),
                Width = Application.GetMinReal(449),
                Y = Application.GetRealHeight(161),
                X = Application.GetRealWidth(596),
@@ -758,17 +765,19 @@
            var sidelipVerticalScrolViewLayout = new VerticalScrolViewLayout()
            {
                Height = Application.GetRealHeight(600),
                Y = btnSelectFloor.Bottom,
                Y = btnSelectFloor.Bottom + Application.GetRealHeight(45),
            };
            sidelipFrameLayout.AddChidren(sidelipVerticalScrolViewLayout);
            Button oldbutton = null;
            Button oldbuttonText = null;
            int count = 0;
            foreach (var floorId in dicFloor.Keys)
            {
                count++;
                var rowFrameLayout = new RowLayout()
                {
                    Height = Application.GetRealHeight(150),
                    Height = Application.GetRealHeight(152),
                    LineColor = Shared.Common.ZigbeeColor.Current.XMRowLine,
                    X = Application.GetRealWidth(81),
                };
@@ -778,7 +787,7 @@
                {
                    Width = Application.GetMinReal(81),
                    Height = Application.GetMinReal(81),
                    Y = Application.GetRealHeight(55),
                    Gravity = Gravity.CenterVertical,
                    UnSelectedImagePath = "Floor/Floor.png",
                    SelectedImagePath = "Floor/FloorSelected.png",
                };
@@ -789,7 +798,7 @@
                    Width = Application.GetRealWidth(311),
                    Height = Application.GetRealHeight(58),
                    X = Application.GetRealWidth(92),
                    Y = Application.GetRealHeight(69),
                    Gravity = Gravity.CenterVertical,
                    TextColor = Shared.Common.ZigbeeColor.Current.XMGray3,
                    TextSize = 14,
                    TextAlignment = TextAlignment.CenterLeft,
@@ -860,6 +869,19 @@
                rowFrameLayout.MouseUpEventHandler += hander;
                btnMethodText.MouseUpEventHandler += hander;
            }
            if (count == 0)
            {
                sidelipFrameLayout.Height = 0;
            }
            else if (count <= 4 && count > 0)
            {
                sidelipFrameLayout.Height = Application.GetRealHeight(180) + count * Application.GetRealHeight(150);
            }
            else
            {
                sidelipFrameLayout.Height = Application.GetMinReal(780);
            }
        }
    }
}
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs
old mode 100755 new mode 100644
@@ -75,20 +75,20 @@
            {
                RemoveFromParent();
            };
            this.btnTitle.Width = Application.GetRealWidth(1080 - 161 - 200 - 58);
            this.btnTitle.Width = Application.GetRealWidth(1080 - 161 - 300);
            this.btnBack.MouseUpEventHandler += eHandlerBack;
            this.btnBackFrameLayout.MouseUpEventHandler += eHandlerBack;
            this.MidFrameLayout(this);
            var btnAddFrameLayout = new FrameLayout
            {
                X = Application.GetRealWidth(830),
                X = Application.GetRealWidth(619),
            };
            this.titleFrameLayout.AddChidren(btnAddFrameLayout);
            btnFloorText = new Button
            {
                Width = Application.GetRealWidth(110),
                Width = Application.GetRealWidth(300 - 69 - 58),
                X = Application.GetRealWidth(15),
                Text = Language.StringByID(R.MyInternationalizationString.FirstFloor),
                TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
@@ -98,26 +98,36 @@
            };
            btnAddFrameLayout.AddChidren(btnFloorText);
            var btnBindDownFrameLayout = new FrameLayout
            {
                Width = Application.GetMinReal(69 + 58),
                X = Application.GetRealWidth(300 - 69 - 58),
            };
            btnAddFrameLayout.AddChidren(btnBindDownFrameLayout);
            var btnBindDown = new Button
            {
                Height = Application.GetMinReal(69),
                Width = Application.GetMinReal(69),
                X = Application.GetRealWidth(200 - 77),
                UnSelectedImagePath = "BindPic/BindDown.png",
                Gravity = Gravity.CenterVertical,
            };
            btnAddFrameLayout.AddChidren(btnBindDown);
            btnBindDown.MouseDownEventHandler += (sender, e) =>
            btnBindDownFrameLayout.AddChidren(btnBindDown);
            EventHandler<MouseEventArgs> eHandlerBindDown = (sender, e) =>
            {
                SideslipFramelayout();
            };
            btnBindDown.MouseDownEventHandler += eHandlerBindDown;
            btnBindDownFrameLayout.MouseDownEventHandler += eHandlerBindDown;
            if (Common.Config.Instance.Home.FloorDics.Count == 0)
            {
                btnAddFrameLayout.Width = 0;
            }
            else
            {
                btnAddFrameLayout.Width = Application.GetRealWidth(200);
                btnAddFrameLayout.Width = Application.GetRealWidth(300);
            }
            MidFrameLayoutContent(btnFloorText);
        }
@@ -362,18 +372,7 @@
                        var dev = new AddedDeviceBindResponseAllData();
                        dev = await currentKey.AddDeviceBindAsync(addBindeDev);
                        if (dev.addedDeviceBindResponseData == null)
                        {
                            Application.RunOnMainThread(() =>
                            {
                                CommonPage.Loading.Hide();
                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh);
                            });
                            btnFinifh.Enable = true;
                            btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                            return;
                        }
                        else
                        if (dev != null && dev.addedDeviceBindResponseData != null)
                        {
                            if (dev.addedDeviceBindResponseData.Result == 0)
                            {
@@ -433,6 +432,17 @@
                                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                return;
                            }
                        }
                        else
                        {
                            Application.RunOnMainThread(() =>
                            {
                                CommonPage.Loading.Hide();
                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh);
                            });
                            btnFinifh.Enable = true;
                            btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                            return;
                        }
                    }
                }
@@ -761,7 +771,6 @@
            var sidelipFrameLayout = new FrameLayout()
            {
                Height = Application.GetMinReal(783),
                Width = Application.GetMinReal(449),
                Y = Application.GetRealHeight(161),
                X = Application.GetRealWidth(596),
@@ -786,17 +795,19 @@
            var sidelipVerticalScrolViewLayout = new VerticalScrolViewLayout()
            {
                Height = Application.GetRealHeight(600),
                Y = btnSelectFloor.Bottom,
                Y = btnSelectFloor.Bottom + Application.GetRealHeight(45),
            };
            sidelipFrameLayout.AddChidren(sidelipVerticalScrolViewLayout);
            Button oldbutton = null;
            Button oldbuttonText = null;
            int count = 0;
            foreach (var floorId in dicFloor.Keys)
            {
                count++;
                var rowFrameLayout = new RowLayout()
                {
                    Height = Application.GetRealHeight(150),
                    Height = Application.GetRealHeight(152),
                    LineColor = Shared.Common.ZigbeeColor.Current.XMRowLine,
                    X = Application.GetRealWidth(81),
                };
@@ -806,7 +817,7 @@
                {
                    Width = Application.GetMinReal(81),
                    Height = Application.GetMinReal(81),
                    Y = Application.GetRealHeight(55),
                    Gravity = Gravity.CenterVertical,
                    UnSelectedImagePath = "Floor/Floor.png",
                    SelectedImagePath = "Floor/FloorSelected.png",
                };
@@ -817,7 +828,7 @@
                    Width = Application.GetRealWidth(311),
                    Height = Application.GetRealHeight(58),
                    X = Application.GetRealWidth(92),
                    Y = Application.GetRealHeight(69),
                    Gravity = Gravity.CenterVertical,
                    TextColor = Shared.Common.ZigbeeColor.Current.XMGray3,
                    TextSize = 14,
                    TextAlignment = TextAlignment.CenterLeft,
@@ -898,6 +909,19 @@
                rowFrameLayout.MouseUpEventHandler += hander;
                btnMethodText.MouseUpEventHandler += hander;
            }
            if (count == 0)
            {
                sidelipFrameLayout.Height = 0;
            }
            else if (count <= 4 && count > 0)
            {
                sidelipFrameLayout.Height = Application.GetRealHeight(180) + count * Application.GetRealHeight(150);
            }
            else
            {
                sidelipFrameLayout.Height = Application.GetMinReal(780);
            }
        }
        /// <summary>
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs
old mode 100755 new mode 100644
@@ -13,6 +13,7 @@
        #region ◆ 变量申明__________________________
        public FrameLayout topFrameLayout = new FrameLayout { Height = Application.GetRealHeight(184), BackgroundColor = ZigbeeColor.Current.XMTopFrameLayout };
        public FrameLayout midFrameLayout = new FrameLayout { Height = Application.GetRealHeight(1925 - 184), BackgroundColor = ZigbeeColor.Current.XMMidFrameLayout };
        public FrameLayout bottomRadiusFrameLayout = new FrameLayout()
        {
            Height = Application.GetRealHeight(100),
@@ -20,35 +21,47 @@
            Radius = 17,
            BackgroundColor = ZigbeeColor.Current.XMWhite,
        };
        public FrameLayout titleFrameLayout = new FrameLayout
        {
            Y = Application.GetRealHeight(92),
            X = Application.GetRealWidth(161),
            Width = Application.GetRealWidth(1080 - 161),//919
            Height = Application.GetRealHeight(69),
        };
        public Button btnTitle = new Button
        {
            TextAlignment = TextAlignment.CenterLeft,
            TextColor = Shared.Common.ZigbeeColor.Current.XMTopTitleText,
            X = Application.GetRealWidth(161),
            Width = Application.GetRealWidth(1080 - 161),
            Width = Application.GetRealWidth(1080 - 161),//919
            Height = Application.GetRealWidth(69),
            IsBold = true,
            TextSize = 17,
            IsBold = true,
            //X = Application.GetRealWidth(161 - 116),
        };
        /// <summary>
        /// 标题返回布局
        /// </summary>
        public FrameLayout btnBackFrameLayout = new FrameLayout
        {
            X = Application.GetRealWidth(58),
            Height = Application.GetRealHeight(58),
            Width = Application.GetRealWidth(58),
            Width = Application.GetRealWidth(58 * 2),//116
        };
        /// <summary>
        /// 标题返回按键
        /// </summary>
        public Button btnBack = new Button
        {
            Height = Application.GetMinReal(51),
            Width = Application.GetMinReal(30),
            Height = Application.GetRealHeight(51),
            Width = Application.GetRealWidth(30),
            X = Application.GetRealWidth(58),
            Y = Application.GetRealHeight(98),
            UnSelectedImagePath = "DoorLock/Left.png",
        };
        /// <summary>
        /// 标题下线
        /// </summary>
        public Button btnTitleLine = new Button
        {
            Y = Application.GetRealHeight(181),
@@ -58,18 +71,18 @@
        #endregion
        /// <summary>
        /// 门锁顶部布局
        /// 顶部布局
        /// </summary>
        /// <param name="frameLayout"></param>
        public void TopFrameLayout(FrameLayout frameLayout, string titleText)
        {
            this.AddChidren(topFrameLayout);
            topFrameLayout.AddChidren(btnBackFrameLayout);
            topFrameLayout.AddChidren(titleFrameLayout);
            topFrameLayout.AddChidren(btnTitleLine);
            btnBackFrameLayout.AddChidren(btnBack);
            titleFrameLayout.AddChidren(btnTitle);
            btnTitle.Text = titleText;
            titleFrameLayout.AddChidren(btnBackFrameLayout);
            btnBackFrameLayout.AddChidren(btnBack);
        }
        /// <summary>
        /// 门锁中部布局
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs
old mode 100755 new mode 100644
@@ -246,7 +246,7 @@
            var btnAddFrameLayout = new FrameLayout()
            {
                X = Application.GetRealWidth(888),
                X = Application.GetRealWidth(772 - 58),
                Width = Application.GetRealWidth(192),
            };
            this.titleFrameLayout.AddChidren(btnAddFrameLayout);
@@ -352,6 +352,7 @@
            InitListInfo();
        }
        /// <summary>
        /// 中部布局
        /// </summary>
@@ -490,6 +491,10 @@
                            {
                                btnFloorRoomNameText = myName;
                            }
                            else
                            {
                                btnFloorRoomNameText = Language.StringByID(R.MyInternationalizationString.Undistributed);
                            }
                        }
                    }
                    else
@@ -512,11 +517,25 @@
                                    var tempDevFloorName = Common.Config.Instance.Home.GetFloorNameById(tempDevFloorId);
                                    if (string.IsNullOrEmpty(tempDevFloorName))
                                    {
                                        btnFloorRoomNameText = tempDevRoomName;
                                        if (string.IsNullOrEmpty(tempDevRoomName))
                                        {
                                            btnFloorRoomNameText = Language.StringByID(R.MyInternationalizationString.Undistributed);
                                        }
                                        else
                                        {
                                            btnFloorRoomNameText = tempDevRoomName;
                                        }
                                    }
                                    else
                                    {
                                        btnFloorRoomNameText = tempDevFloorName + "," + tempDevRoomName;
                                        if (string.IsNullOrEmpty(tempDevRoomName))
                                        {
                                            btnFloorRoomNameText = Language.StringByID(R.MyInternationalizationString.Undistributed);
                                        }
                                        else
                                        {
                                            btnFloorRoomNameText = tempDevFloorName + "," + tempDevRoomName;
                                        }
                                    }
                                }
@@ -640,10 +659,10 @@
                             else
                             {
                                 var temp = await currentKey.ConfigureHdlKeyValueAsync(Panel.KeyMode.Default);
                                 if (temp.setWritableValueResponData?.Status != 0)
                                 if (temp != null && temp.setWritableValueResponData?.Status != 0)
                                 {
                                     var temp1 = await currentKey.ConfigureHdlKeyValueAsync(Panel.KeyMode.Default);
                                     if (temp1.setWritableValueResponData?.Status != 0)
                                     if (temp1 != null && temp1.setWritableValueResponData?.Status != 0)
                                     {
                                         new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.ChangeBindMode), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show(btnDel);
                                     }
@@ -739,8 +758,10 @@
                }
            }
            int count = 0;
            foreach (var value in typeModeList)
            {
                count++;
                #region  rowView
                var rowView = new FrameLayout()
                {
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/ChooseKeyModePage.cs
@@ -244,18 +244,7 @@
                            var dev = new AddedDeviceBindResponseAllData();
                            dev = await currentKey.AddDeviceBindAsync(addBindeDev);
                            if (dev != null || dev.addedDeviceBindResponseData == null)
                            {
                                Application.RunOnMainThread(() =>
                                {
                                    CommonPage.Loading.Hide();
                                    new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh);
                                });
                                btnFinifh.Enable = true;
                                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                return;
                            }
                            else
                            if (dev != null && dev.addedDeviceBindResponseData != null)
                            {
                                if (dev.addedDeviceBindResponseData.Result == 0)
                                {
@@ -318,6 +307,17 @@
                                    return;
                                }
                            }
                            else
                            {
                                Application.RunOnMainThread(() =>
                                {
                                    CommonPage.Loading.Hide();
                                    new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh);
                                });
                                btnFinifh.Enable = true;
                                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                return;
                            }
                        }
                        else
                        {
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs
@@ -150,6 +150,10 @@
                    {
                        device.IconPath = "Device/Light.png";
                    }
                    else
                    {
                        device.IconPath = "Device/RelayEpoint.png";
                    }
                    device.ReSave();
                }
                this.CloseProgressBar();
@@ -338,10 +342,19 @@
                        var title = Language.StringByID(R.MyInternationalizationString.uSelectFunctionType);
                        var form = new BottomItemSelectForm();
                        form.CancelCallEvent = true;//允许取消
                        form.AddForm(title, listText, nowSelectNo);
                        form.FinishSelectEvent += (selectNo) =>
                        {
                            btnFunction.Text = listText[selectNo];
                            if (selectNo == -1)
                            {
                                //取消选择
                                btnFunction.Text = string.Empty;
                            }
                            else
                            {
                                btnFunction.Text = listText[selectNo];
                            }
                            nowSelectNo = selectNo;
                            //记录起当前选择的功能类型
                            if (selectNo == 0)
@@ -352,10 +365,14 @@
                            {
                                dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A灯光;
                            }
                            else
                            else if (selectNo == 2)
                            {
                                dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A插座;
                            }
                            else
                            {
                                dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A未定义;
                            }
                        };
                    };
                }
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs
old mode 100755 new mode 100644
@@ -446,10 +446,19 @@
            }
            //新风面板
            else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir)
            {
                //方悦新风面板的按键配置
                var form = new DevicePanel.PanelFangyueFreshAirButtonSettionForm();
                form.AddForm(device);
            {
                //方悦新风面板的按键配置
                //干接点
                if (device.Type == DeviceType.FreshAir)
                {
                    var form = new DevicePanel.PanelFangyueFreshAirButtonSettionForm();
                    form.AddForm(device);
                }
                else
                {
                    var form = new DeviceFunctionSettionForm();
                    form.AddForm(device, true);
                }
            }
            //方悦面板
            else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueTwo
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
old mode 100755 new mode 100644
@@ -141,7 +141,7 @@
                //选择未分配时,清空
                if (roomKeys == string.Empty) { listCheck = new List<string>(); }
                foreach (var device in this.listNewDevice)
                {
                {
                    if (device is OTADevice)
                    {
                        //针对单纯只有一个200端点的设备
@@ -160,10 +160,16 @@
                        //这里有点特殊,如果回路没有设置有区域的时候,才设置
                        listCheck.Add(mainKeys);
                        HdlRoomLogic.Current.ChangedRoom(device, roomKeys);
                    }
                    else if (this.deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir
                      && device.Type == DeviceType.FreshAir)
                    {
                        //新风面板的新风设备,则区域跟着模块一起
                        HdlRoomLogic.Current.ChangedRoom(device, roomKeys);
                    }
                    else if (listCheck.Contains(mainKeys) == true)
                    {
                        //如果这个回路之前都还没有区域,在本界面还没有关闭之前,可以无条件随便变更
                    {
                        //如果这个回路之前都还没有区域,在本界面还没有关闭之前,可以无条件随便变更
                        HdlRoomLogic.Current.ChangedRoom(device, roomKeys);
                    }
                }
@@ -932,10 +938,19 @@
                var title = Language.StringByID(R.MyInternationalizationString.uSelectFunctionType);
                var form = new BottomItemSelectForm();
                form.CancelCallEvent = true;//允许取消
                form.AddForm(title, listText, nowSelectNo);
                form.FinishSelectEvent += (selectNo) =>
                {
                    btnFunction.Text = listText[selectNo];
                    if (selectNo == -1)
                    {
                        //选择取消
                        btnFunction.Text = string.Empty;
                    }
                    else
                    {
                        btnFunction.Text = listText[selectNo];
                    }
                    nowSelectNo = selectNo;
                    //记录起当前选择的功能类型
                    if (selectNo == 0)
@@ -956,13 +971,22 @@
                            this.listNewDevice[0].IconPath = "Device/Light.png";
                        }
                    }
                    else
                    else if (selectNo == 2)
                    {
                        this.listNewDevice[0].DfunctionType = DeviceFunctionType.A插座;
                        if (this.listNewDevice[0].IsCustomizeImage == false)
                        {
                            //重新设置图片
                            this.listNewDevice[0].IconPath = "Device/Socket1.png";
                        }
                    }
                    else
                    {
                        this.listNewDevice[0].DfunctionType = DeviceFunctionType.A未定义;
                        if (this.listNewDevice[0].IsCustomizeImage == false)
                        {
                            //重新设置图片
                            this.listNewDevice[0].IconPath = "Device/Switch.png";
                        }
                    }
                    this.listNewDevice[0].ReSave();
@@ -1187,8 +1211,8 @@
        private void ShowTopRightMenu()
        {
            //检测此回路是否拥有定位功能(拿端点最小的那个回路去定位)
            bool canTest = Common.LocalDevice.Current.DeviceIsCanFixedPosition(listNewDevice[0]);
            bool canTest = Common.LocalDevice.Current.DeviceIsCanFixedPosition(listNewDevice[0]);
            var frame = new TopRightMenuControl(canTest == true ? 2 : 1, 1);
            string deviceMenu = string.Empty;
            if (canTest == true)
ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs
@@ -963,7 +963,7 @@
            /// <summary>
            /// 其他开锁方式(OpenLockMode=9000时有效) 9001:常开打开 9002:常开取消 9003:常开持续 
            /// </summary>
            public int OtherOpenLockMode = -1;
            public int? OtherOpenLockMode = -1;
            /// <summary>
            /// 常开持续时间(1~72小时 OtherOpenLockMode=9003的时候有效)
            /// </summary>
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLighWithSensorForm.cs
old mode 100755 new mode 100644
@@ -575,15 +575,15 @@
            }
            //节能模式修改(他们说随便一个回路就行)
            //设备同事说默认去秒时间,这样接近感应功能才合理
            energyModeInfo.time = 1;
            //肖志豪给按键控制面板(四开八控)设备,说默认15秒时间,这样接近感应功能才合理
            energyModeInfo.time = 15;
            result = await HdlDevicePanelLogic.Current.SetDeviceEnergyConservationMode(panelDevice, energyModeInfo.enable, energyModeInfo.time, energyModeInfo.level);
            if (result == false)
            {
                this.CloseProgressBar();
                return;
            }
            //接近修改(他们说随便一个回路就行)
            //接近传感设置  (肖志豪给按键控制面板(四开八控)设备,传感距离和触发延迟时间默认用最大值)
            result = await HdlDevicePanelLogic.Current.SetProximitySensorStatus(panelDevice, proximitySensorsInfo.enable);
            if (result == false)
            {
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs
old mode 100755 new mode 100644
@@ -152,12 +152,22 @@
            frameBack.AddChidren(seekBar1);
            seekBar1.ProgressChangedEvent += (div, value) =>
            {
                btnProgress1.Text = value.ToString();
                if (value == 0)
                {
                    btnProgress1.Text = (value + 1).ToString();
                }
                else
                {
                    btnProgress1.Text = value.ToString();
                }
                switch (value)
                {
                    case 0:
                    case 1:
                        linghtLevelInfo.panelDirectionsLevel = 20;
                        btnLevel.Text = "1" + strRank;
                        break;
                    case 2:
                        linghtLevelInfo.panelDirectionsLevel = 40;
@@ -175,14 +185,22 @@
                        linghtLevelInfo.panelDirectionsLevel = 100;
                        btnLevel.Text = "5" + strRank;
                        break;
                    default:
                        linghtLevelInfo.panelDirectionsLevel = 0;
                        btnLevel.Text = "0" + strRank;
                        break;
                }
            };
            if (linghtLevelInfo.panelDirectionsLevel <= 20 && linghtLevelInfo.panelDirectionsLevel > 0)
            seekBar1.OnStopTrackingTouchEvent += (div, value) =>
            {
                if (value == 0)
                {
                    seekBar1.Progress = 1;
                }
                else
                {
                    seekBar1.Progress = value;
                }
            };
            if (linghtLevelInfo.panelDirectionsLevel <= 20 && linghtLevelInfo.panelDirectionsLevel >= 0)
            {
                btnLevel.Text = "1" + strRank;
                btnProgress1.Text = "1";
@@ -214,17 +232,17 @@
            }
            else
            {
                btnLevel.Text = "0" + strRank;
                btnProgress1.Text = "0";
                seekBar1.Progress = 0;
                btnLevel.Text = "1" + strRank;
                btnProgress1.Text = "1";
                seekBar1.Progress = 1;
            }
            var btnTemp1 = new NormalViewControl(200, 50, true);
            btnTemp1.X = ControlCommonResourse.XXLeft;
            btnTemp1.Y = Application.GetRealHeight(322);
            btnTemp1.TextSize = 12;
            btnTemp1.TextColor = UserCenterColor.Current.TextGrayColor3;
            btnTemp1.Text = "0";
            btnTemp1.Text = "1";
            frameBack.AddChidren(btnTemp1);
            var btnTemp2 = new NormalViewControl(100, 50, true);
@@ -565,15 +583,15 @@
            this.ShowProgressBar();
            //节能模式修改(他们说随便一个回路就行)
            //设备同事说默认去1秒时间,这样接近感应功能才合理
            energyModeInfo.time = 1;
            //设备同事说新风面板默认60秒时间,这样接近感应功能才合理
            energyModeInfo.time = 60;
            var result = await HdlDevicePanelLogic.Current.SetDeviceEnergyConservationMode(panelDevice, energyModeInfo.enable, energyModeInfo.time, energyModeInfo.level);
            if (result == false)
            {
                this.CloseProgressBar();
                return;
            }
            //接近感应(他们说随便一个回路就行)
            //接近感应(提供设备的同事说随便一个回路就行)
            result = await HdlDevicePanelLogic.Current.SetProximitySensorStatus(panelDevice, proximitySensorsInfo.enable);
            if (result == false)
            {
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs
@@ -1,4 +1,8 @@
using System;
using System.Collections.Generic;
using Org.BouncyCastle.Bcpg.OpenPgp;
using Shared.Common;
using ZigBee.Common;
using ZigBee.Device;
namespace Shared.Phone.UserCenter.DevicePanel
@@ -18,6 +22,22 @@
        /// 设备的某一回路
        /// </summary>
        private CommonDevice deviceObj = null;
        /// <summary>
        /// 新风目标名字
        /// </summary>
        private string bindFreshAirName = string.Empty;
        /// <summary>
        /// 温度目标名字
        /// </summary>
        private string bindTemperatureName = string.Empty;
        /// <summary>
        /// 湿度目标名字
        /// </summary>
        private string bindHumidityName = string.Empty;
        /// <summary>
        /// PM目标名字
        /// </summary>
        private string bindPmName = string.Empty;
        #endregion
@@ -30,6 +50,8 @@
        public void ShowForm(CommonDevice i_device)
        {
            this.deviceObj = i_device;
            //获取数据
            ReadDoorLockUserInfo(deviceObj);
            //设置头部信息
            base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uPanelSettion));
@@ -65,9 +87,9 @@
            this.listview = tableContr.InitControl(listBackControl.frameTable, Language.StringByID(R.MyInternationalizationString.uDeviceEditor), 1028);
            //初始化菜单行
            this.InitMenuRow();
            //初始化桌布完成
            this.InitMenuRow();
            //初始化桌布完成
            tableContr.FinishInitControl();
            tableContr = null;
@@ -79,30 +101,70 @@
            {
                //关闭自身
                this.CloseForm();
            };
            };
        }
        /// <summary>
        /// 初始化菜单行
        /// </summary>
        private void InitMenuRow()
        {
        {
            this.listview.RemoveAll();
            //添加新风目标
            this.AddFreshAirRow();
            //PM2.5来源
            //this.AddPMRow();
            this.AddPMRow();
            //添加温度来源
            //this.AddTemperatureSensorRow();
            this.AddTemperatureSensorRow();
            //添加湿度来源
            //this.AddHumiditySourceRow();
            //添加新风目标
            //this.AddPMRow();
            this.AddHumiditySourceRow();
            //亮度调节
            this.AddLevelRow();
        }
        #endregion
        #region ■ 初始化数据_________________________
        /// <summary>
        /// 初始化数据
        /// </summary>
        void ReadDoorLockUserInfo(CommonDevice curControlDev)
        {
            System.Threading.Tasks.Task.Run(async () =>
            {
                try
                {
                    Application.RunOnMainThread(() =>
                    {
                        CommonPage.Loading.Start("");
                    });
                    var result = await GetBindName(curControlDev);
                    if (!result)
                    {
                        Application.RunOnMainThread(() =>
                        {
                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                        });
                    }
                }
                catch (Exception ex)
                {
                    var mess = ex.Message;
                }
                finally
                {
                    Application.RunOnMainThread(() =>
                    {
                        this.InitMenuRow();
                        CommonPage.Loading.Hide();
                    });
                }
            });
        }
        #endregion
        #region ■ 新风目标_________________________ 
        /// <summary>
        ///  新风目标行
@@ -116,21 +178,90 @@
            //底线
            rowNewWind.AddBottomLine();
            //右箭头
            rowNewWind.AddRightArrow();
            var msg = Language.StringByID(R.MyInternationalizationString.nothing);
            // 回调新风绑定目标
            rowNewWind.AddRightArrow();
            var msg = Language.StringByID(R.MyInternationalizationString.nothing);
            if (!string.IsNullOrEmpty(bindFreshAirName))
            {
                msg = bindFreshAirName;
            }
            var btnNewWindStatu = rowNewWind.AddMostRightView(msg, 700);
            rowNewWind.ButtonClickEvent += (sender, e) =>
            {
                //var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, 1);
                //Shared.Phone.UserView.HomePage.Instance.AddChidren(addDevicePage);
                //Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
                //addDevicePage.Show();
                var form = new PanelFangyueFreshAirTargetForm();
                form.AddForm(this.deviceObj, string.Empty, 3);
                var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, 1);
                Shared.Phone.UserView.HomePage.Instance.AddChidren(addDevicePage);
                Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
                addDevicePage.Show();
                addDevicePage.actionFreshAirTarget += (bindName) =>
                {
                    Application.RunOnMainThread(() =>
                    {
                        if (string.IsNullOrEmpty(bindName))
                        {
                            btnNewWindStatu.Text = Language.StringByID(R.MyInternationalizationString.nothing);
                        }
                        else
                        {
                            btnNewWindStatu.Text = bindName;
                        }
                    });
                };
                //var form = new PanelFangyueFreshAirTargetForm();
                //form.AddForm(this.deviceObj, string.Empty, 3);
            };
        }
        #endregion
        /// <summary>
        /// 获取绑定目标
        /// </summary>
        /// <param name="curControlDev"></param>
        /// <returns></returns>
        private async System.Threading.Tasks.Task<bool> GetBindName(CommonDevice curDev)
        {
            bool result = false;
            //获取面板中存在的绑定目标
            FreshAir curControlDev = curDev as FreshAir;
            var panelBindListRes = await curControlDev.GetDeviceBindAsync();
            if (panelBindListRes != null && panelBindListRes.getAllBindResponseData != null)
            {
                foreach (var bDev in panelBindListRes.getAllBindResponseData.BindList)
                {
                    curControlDev.bindList.Add(bDev);
                    var device = Common.LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint);
                    //获取设备类型的
                    var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
                    //新风面板的新风设备,则不显示
                    if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
                    {
                        continue;
                    }
                    if (device.Type == DeviceType.FreshAir)
                    {
                        bindFreshAirName = device.DeviceEpointName;
                    }
                    if (device.Type == DeviceType.TemperatureSensor)
                    {
                        bindTemperatureName = device.DeviceEpointName;
                    }
                    if (device.Type == DeviceType.FreshAirHumiditySensor)
                    {
                        bindHumidityName = device.DeviceEpointName;
                    }
                    //if (device.Type == DeviceType.FreshAir)
                    //{
                    //    bindPmName  = device.DeviceEpointName;
                    //}
                }
                result = true;
            }
            return result;
        }
        #region ■ PM2.5来源_________________________ 
        /// <summary>
@@ -139,22 +270,40 @@
        private void AddPMRow()
        {
            //PM2.5
            var rowNewWind = new FrameRowControl(listview.rowSpace / 2);
            listview.AddChidren(rowNewWind);
            rowNewWind.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.PM25Source), 600);
            var rowPM = new FrameRowControl(listview.rowSpace / 2);
            listview.AddChidren(rowPM);
            rowPM.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.PM25Source), 600);
            //底线
            rowNewWind.AddBottomLine();
            rowPM.AddBottomLine();
            //右箭头
            rowNewWind.AddRightArrow();
            rowPM.AddRightArrow();
            var msg = Language.StringByID(R.MyInternationalizationString.nothing);
            // 回调PM2.5来源绑定目标
            var btnNewWindStatu = rowNewWind.AddMostRightView(msg, 700);
            rowNewWind.ButtonClickEvent += (sender, e) =>
            if (!string.IsNullOrEmpty(bindPmName))
            {
                msg = bindPmName;
            }
            var btnPMStatu = rowPM.AddMostRightView(msg, 700);
            rowPM.ButtonClickEvent += (sender, e) =>
            {
                var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, 4);
                Shared.Phone.UserView.HomePage.Instance.AddChidren(addDevicePage);
                Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
                addDevicePage.Show();
                addDevicePage.actionPMTarget += (bindName) =>
                {
                    Application.RunOnMainThread(() =>
                    {
                        if (string.IsNullOrEmpty(bindName))
                        {
                            btnPMStatu.Text = Language.StringByID(R.MyInternationalizationString.nothing);
                        }
                        else
                        {
                            btnPMStatu.Text = bindName;
                        }
                    });
                };
            };
        }
        #endregion
@@ -166,22 +315,40 @@
        private void AddTemperatureSensorRow()
        {
            //温度来源
            var rowNewWind = new FrameRowControl(listview.rowSpace / 2);
            listview.AddChidren(rowNewWind);
            rowNewWind.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.TemperatureSource), 600);
            var rowTemPerature = new FrameRowControl(listview.rowSpace / 2);
            listview.AddChidren(rowTemPerature);
            rowTemPerature.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.TemperatureSource), 600);
            //底线
            rowNewWind.AddBottomLine();
            rowTemPerature.AddBottomLine();
            //右箭头
            rowNewWind.AddRightArrow();
            rowTemPerature.AddRightArrow();
            var msg = Language.StringByID(R.MyInternationalizationString.nothing);
            // 回调温度来源绑定目标
            var btnNewWindStatu = rowNewWind.AddMostRightView(msg, 700);
            rowNewWind.ButtonClickEvent += (sender, e) =>
            if (!string.IsNullOrEmpty(bindTemperatureName))
            {
                msg = bindTemperatureName;
            }
            var btnTemperatureStatu = rowTemPerature.AddMostRightView(msg, 700);
            rowTemPerature.ButtonClickEvent += (sender, e) =>
            {
                var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, 2);
                Shared.Phone.UserView.HomePage.Instance.AddChidren(addDevicePage);
                Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
                addDevicePage.Show();
                addDevicePage.actionTemperatureTarget += (bindName) =>
                {
                    Application.RunOnMainThread(() =>
                    {
                        if (string.IsNullOrEmpty(bindName))
                        {
                            btnTemperatureStatu.Text = Language.StringByID(R.MyInternationalizationString.nothing);
                        }
                        else
                        {
                            btnTemperatureStatu.Text = bindName;
                        }
                    });
                };
            };
        }
        #endregion
@@ -193,22 +360,40 @@
        private void AddHumiditySourceRow()
        {
            //湿度
            var rowNewWind = new FrameRowControl(listview.rowSpace / 2);
            listview.AddChidren(rowNewWind);
            rowNewWind.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.HumiditySource), 600);
            var rowHumidity = new FrameRowControl(listview.rowSpace / 2);
            listview.AddChidren(rowHumidity);
            rowHumidity.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.HumiditySource), 600);
            //底线
            rowNewWind.AddBottomLine();
            rowHumidity.AddBottomLine();
            //右箭头
            rowNewWind.AddRightArrow();
            rowHumidity.AddRightArrow();
            var msg = Language.StringByID(R.MyInternationalizationString.nothing);
            // 回调湿度来源绑定目标
            var btnNewWindStatu = rowNewWind.AddMostRightView(msg, 700);
            rowNewWind.ButtonClickEvent += (sender, e) =>
            if (!string.IsNullOrEmpty(bindHumidityName))
            {
                msg = bindHumidityName;
            }
            var btnHumidityStatu = rowHumidity.AddMostRightView(msg, 700);
            rowHumidity.ButtonClickEvent += (sender, e) =>
            {
                var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, 3);
                Shared.Phone.UserView.HomePage.Instance.AddChidren(addDevicePage);
                Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
                addDevicePage.Show();
                addDevicePage.actionHumidityTarget += (bindName) =>
                {
                    Application.RunOnMainThread(() =>
                    {
                        if (string.IsNullOrEmpty(bindName))
                        {
                            btnHumidityStatu.Text = Language.StringByID(R.MyInternationalizationString.nothing);
                        }
                        else
                        {
                            btnHumidityStatu.Text = bindName;
                        }
                    });
                };
            };
        }
        #endregion
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetForm.cs
old mode 100755 new mode 100644
@@ -6,8 +6,7 @@
{
    public class PanelFangyueFreshAirTargetForm : EditorCommonForm
    {
        #region ■ 变量声明___________________________
        #region ■ 变量声明___________________________
        /// <summary>
        /// 列表控件
        /// </summary>
@@ -308,9 +307,7 @@
                        //收集可以显示的设备
                        this.dicShowDevice[room.Id].Add(device);
                    }
                }
                }
            }
            return canShow;
        }
@@ -320,8 +317,7 @@
            bool canShow = false;
            return canShow;
        }
        }
        #endregion
    }
}
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetsForm.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using Microsoft.AppCenter.Crashes;
using Shared.Common;
using Shared.Phone.UserCenter.Safety;
using ZigBee.Device;
@@ -62,10 +63,6 @@
        /// </summary>
        List<Room> supportRoomList = new List<Room>();
        /// <summary>
        /// 当绑定表变化后的回调
        /// </summary>
        public Action<List<BindListResponseObj>> action;
        /// <summary>
        /// 保存完成按钮
        /// </summary>
        Button btnFinifh;
@@ -92,19 +89,19 @@
        /// <summary>
        /// 新风绑定目标回调
        /// </summary>
        Action actionFreshAirTarget = null;
        public Action<string> actionFreshAirTarget = null;
        /// <summary>
        /// 温度绑定目标回调
        /// </summary>
        Action actionTemperatureTarget = null;
        public Action<string> actionTemperatureTarget = null;
        /// <summary>
        /// 湿度绑定目标回调
        /// </summary>
        Action actionHumidityTarget = null;
        public Action<string> actionHumidityTarget = null;
        /// <summary>
        /// PM绑定目标回调
        /// </summary>
        Action actionPMTarget = null;
        public Action<string> actionPMTarget = null;
        #endregion
        #region UI设计 
@@ -135,7 +132,7 @@
            {
                RemoveFromParent();
            };
            this.btnTitle.Width = Application.GetRealWidth(1080 - 161 - 200 - 58);
            this.btnTitle.Width = Application.GetRealWidth(1080 - 161 - 300);
            this.btnBack.MouseUpEventHandler += eHandlerBack;
            this.btnBackFrameLayout.MouseUpEventHandler += eHandlerBack;
            this.MidFrameLayout(this);
@@ -156,14 +153,13 @@
        {
            var btnAddFrameLayout = new FrameLayout
            {
                X = Application.GetRealWidth(830),
                X = Application.GetRealWidth(619),
            };
            this.titleFrameLayout.AddChidren(btnAddFrameLayout);
            btnFloorText = new Button
            {
                Width = Application.GetRealWidth(110),
                X = Application.GetRealWidth(15),
                Width = Application.GetRealWidth(300 - 69 - 58),
                Text = Language.StringByID(R.MyInternationalizationString.FirstFloor),
                TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
                TextSize = 14,
@@ -172,26 +168,35 @@
            };
            btnAddFrameLayout.AddChidren(btnFloorText);
            var btnBindDownFrameLayout = new FrameLayout
            {
                Width = Application.GetMinReal(69 + 58),
                X = Application.GetRealWidth(300 - 69 - 58),
            };
            btnAddFrameLayout.AddChidren(btnBindDownFrameLayout);
            var btnBindDown = new Button
            {
                Height = Application.GetMinReal(69),
                Width = Application.GetMinReal(69),
                X = Application.GetRealWidth(200 - 77),
                UnSelectedImagePath = "BindPic/BindDown.png",
                Gravity = Gravity.CenterVertical,
            };
            btnAddFrameLayout.AddChidren(btnBindDown);
            btnBindDown.MouseDownEventHandler += (sender, e) =>
            btnBindDownFrameLayout.AddChidren(btnBindDown);
            EventHandler<MouseEventArgs> eHandlerBindDown = (sender, e) =>
            {
                SideslipFramelayout();
            };
            btnBindDown.MouseDownEventHandler += eHandlerBindDown;
            btnBindDownFrameLayout.MouseDownEventHandler += eHandlerBindDown;
            if (Common.Config.Instance.Home.FloorDics.Count == 0)
            {
                btnAddFrameLayout.Width = 0;
            }
            else
            {
                btnAddFrameLayout.Width = Application.GetRealWidth(200);
                btnAddFrameLayout.Width = Application.GetRealWidth(300);
            }
        }
@@ -220,6 +225,11 @@
                Height = Application.GetRealHeight(1145),
            };
            this.midFrameLayout.AddChidren(midVerticalScrolViewLayout);
            midVerticalScrolViewLayout.BeginHeaderRefreshingAction += () =>
            {
                midVerticalScrolViewLayout.BeginHeaderRefreshing();
                InitData();
            };
            //底部保存栏
            var bottomFrameLayout = new FrameLayout()
@@ -253,8 +263,9 @@
        /// </summary>
        /// <param name="gateway">Gateway.</param>
        /// <param name="key">Key.</param>
        void RefreshRoomList(Room curRoom, ref int index2)
        void RefreshRoomList()
        {
            Room curRoom = null;
            if (supportRoomList.Count == 0)
            {
                return;
@@ -263,7 +274,7 @@
            Button curentOldRoom = null;
            FrameLayout curentOldRoomFrameLayout = null;
            int index = 0;
            var roomTempList = GetSupportRoomList(curRoom);
            var roomTempList = GetSupportRoomList();
            for (int i = 0; i < roomTempList.Count; i++)
            {
                var room = roomTempList[i];
@@ -302,7 +313,6 @@
                }
                EventHandler<MouseEventArgs> eHandlerRoom = (sender, e) =>
                {
                    //ChangeRoom(curRoom, room, btnRoom, curentOldRoom, btnRoomFrameLayout, curentOldRoomFrameLayout);
                    if (!btnRoom.IsSelected)
                    {
                        if (curentOldRoom != null)
@@ -327,26 +337,11 @@
                    }
                    curRoom = room;
                    curControlDev.RoomId = room.Id;
                    if (curRoom.ListSceneId.Count == 0)
                    {
                        btnFinifh.Enable = false;
                        btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
                    }
                    else
                    {
                        btnFinifh.Enable = true;
                        btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                    }
                    if (targetList.Count == 0)
                    {
                        btnFinifh.Enable = false;
                        btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
                    }
                    else
                    {
                        btnFinifh.Enable = true;
                        btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                    }
                    //新风面板保存使能
                    btnFinifh.Enable = true;
                    btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                    RefreshDeviceList(curRoom);
                };
                btnRoom.MouseUpEventHandler += eHandlerRoom;
@@ -354,6 +349,17 @@
                index++;
            }
            BindInfo.FinishDisplay(roomTempList, btnFinifh);
            if (roomTempList.Count != 0)
            {
                curRoom = roomTempList[0];
            }
            else
            {
                curRoom = new Shared.Common.Room();
            }
            RefreshDeviceList(curRoom);
        }
        /// <summary>
@@ -425,7 +431,7 @@
                };
                rowLayout.AddChidren(line2);
                if (curIndex == currentPanelSupportBindDeviceList.Count - 1)
                if (curIndex == currentRoomSupportBindDeviceList.Count - 1)
                {
                    line2.Visible = false;
                }
@@ -435,23 +441,6 @@
                string mianKey = device.DeviceAddr + device.DeviceEpoint;
                if (targetList.Count != 0)
                {
                    //    if(curControlDev!=null)
                    //    {
                    //        foreach (var bindedSc in curControlDev.bindList)
                    //        {
                    //            if (bindedSc.BindMacAddr + bindedSc.BindEpoint == mianKey)
                    //            {
                    //                btnChoose.IsSelected = true;
                    //                btnChoose.Visible = true;
                    //                oldDevice = btnChoose;
                    //                targetList.Add(device);
                    //            }
                    //        }
                    //    }
                    //}
                    //else
                    //{
                    foreach (var bindedDev in targetList)
                    {
                        if (bindedDev.DeviceAddr + bindedDev.DeviceEpoint == mianKey)
@@ -465,17 +454,20 @@
                EventHandler<MouseEventArgs> hander = (sender, e) =>
               {
                   //ChangeTarget(device, btnChoose, oldDevice);
                   if (curControlDev.bindList.Count != 0)
                   {
                       if (btnChoose.IsSelected)
                       {
                           new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindExist), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
                           return;
                       }
                   }
                   btnChoose.IsSelected = !btnChoose.IsSelected;
                   if (!btnChoose.IsSelected)
                   {
                       if (oldDevice != null)
                       {
                           oldDevice.IsSelected = false;
                           oldDevice.Visible = false;
                       }
                       oldDevice = btnChoose;
                       oldDevice.IsSelected = false;
                       oldDevice.Visible = false;
                       targetList.Clear();
                   }
                   else
                   {
                       if (oldDevice != null)
                       {
@@ -488,33 +480,16 @@
                       targetList.Clear();
                       targetList.Add(device);
                   }
                   if (targetList.Count == 0)
                   {
                       btnFinifh.Enable = false;
                       btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
                   }
                   else
                   {
                       btnFinifh.Enable = true;
                       btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                   }
                   //新风面板:由于目标没有提供删除接口,所以可以取消选中能保存
                   btnFinifh.Enable = true;
                   btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
               };
                rowLayout.MouseUpEventHandler += hander;
                devicePic.MouseUpEventHandler += hander;
                btnBindName.MouseUpEventHandler += hander;
                btnChoose.MouseUpEventHandler += hander;
                curIndex++;
            }
            if (targetList.Count == 0)
            {
                btnFinifh.Enable = false;
                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
            }
            else
            {
                btnFinifh.Enable = true;
                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
            }
        }
@@ -537,7 +512,6 @@
            var sidelipFrameLayout = new FrameLayout()
            {
                Height = Application.GetMinReal(783),
                Width = Application.GetMinReal(449),
                Y = Application.GetRealHeight(161),
                X = Application.GetRealWidth(596),
@@ -561,18 +535,19 @@
            var sidelipVerticalScrolViewLayout = new VerticalScrolViewLayout()
            {
                Y = btnSelectFloor.Bottom + Application.GetRealHeight(45),
                Height = Application.GetRealHeight(600),
                Y = btnSelectFloor.Bottom,
            };
            sidelipFrameLayout.AddChidren(sidelipVerticalScrolViewLayout);
            Button oldbutton = null;
            Button oldbuttonText = null;
            int count = 0;
            foreach (var floorId in dicFloorList.Keys)
            {
                var rowFrameLayout = new RowLayout()
                {
                    Height = Application.GetRealHeight(150),
                    Height = Application.GetRealHeight(152),
                    LineColor = Shared.Common.ZigbeeColor.Current.XMRowLine,
                    X = Application.GetRealWidth(81),
                };
@@ -582,9 +557,9 @@
                {
                    Width = Application.GetMinReal(81),
                    Height = Application.GetMinReal(81),
                    Y = Application.GetRealHeight(55),
                    UnSelectedImagePath = "Floor/Floor.png",
                    SelectedImagePath = "Floor/FloorSelected.png",
                    Gravity = Gravity.CenterVertical,
                };
                rowFrameLayout.AddChidren(btnAllMethod);
@@ -593,7 +568,7 @@
                    Width = Application.GetRealWidth(311),
                    Height = Application.GetRealHeight(58),
                    X = Application.GetRealWidth(92),
                    Y = Application.GetRealHeight(69),
                    Gravity = Gravity.CenterVertical,
                    TextColor = Shared.Common.ZigbeeColor.Current.XMGray3,
                    TextSize = 14,
                    TextAlignment = TextAlignment.CenterLeft,
@@ -608,36 +583,18 @@
                    btnMethodText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                }
                string curFloorId = floorId;
                EventHandler<MouseEventArgs> hander = (sender, e) =>
                {
                    //ChangeFloor(dialog, floorId, btnMethodText, oldbuttonText, oldbutton);
                    var curFloorId = floorId;
                    curControlDev.currentSelectFloorId = curFloorId;
                    btnFloorText.Text = dicFloorList[curFloorId];
                    if (curControlDev.currentSelectFloorId == curFloorId)
                    {
                        return;
                    }
                    curControlDev.currentSelectFloorId = curFloorId;
                    btnFloorText.Text = dicFloorList[curFloorId];
                    btnFloorText.Text = dicFloorList[floorId];
                    //获取楼层中房间列表 
                    supportRoomList = GetFloorRoomList();
                    if (supportRoomList.Count == 0)
                    {
                        return;
                    }
                    var curRoom = new Room();
                    if (supportRoomList.Count != 0)
                    {
                        curRoom = supportRoomList[0];
                    }
                    else
                    {
                        curRoom = new Shared.Common.Room();
                        supportRoomList.Add(curRoom);
                    }
                    if (!btnMethodText.IsSelected)
                    {
                        if (oldbutton != null)
@@ -656,23 +613,26 @@
                    }
                    int index = 0;
                    RefreshRoomList(curRoom, ref index);
                    if (targetList.Count == 0)
                    {
                        btnFinifh.Enable = false;
                        btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
                    }
                    else
                    {
                        btnFinifh.Enable = true;
                        btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                    }
                    RefreshRoomList();
                    dialog.Close();
                };
                btnAllMethod.MouseUpEventHandler += hander;
                rowFrameLayout.MouseUpEventHandler += hander;
                btnMethodText.MouseUpEventHandler += hander;
                count++;
            }
            if (count == 0)
            {
                sidelipFrameLayout.Height = 0;
            }
            else if (count <= 4 && count > 0)
            {
                sidelipFrameLayout.Height = Application.GetRealHeight(180) + count * Application.GetRealHeight(150);
            }
            else
            {
                sidelipFrameLayout.Height = Application.GetMinReal(780);
            }
        }
        #endregion
@@ -697,8 +657,10 @@
                    curControlDev.currentSelectFloorId = BindInfo.GetCurrentSelectFloorId();
                    if (BindInfo.GetCurrentSelectFloorIdName() != null)
                    {
                        btnFloorText.Text = BindInfo.GetCurrentSelectFloorIdName();
                        Application.RunOnMainThread(() =>
                        {
                            btnFloorText.Text = BindInfo.GetCurrentSelectFloorIdName();
                        });
                    }
                    //获取楼层中房间列表
@@ -743,215 +705,76 @@
                                var device = LocalDevice.Current.GetDevice(bindDev.DeviceAddr, bindDev.DeviceEpoint);
                                if (device != null)
                                {
                                    //获取设备类型的
                                    var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
                                    //新风面板的新风设备,则不显示
                                    if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
                                    switch (curDeviceBindType)
                                    {
                                        continue;
                                        case 1:
                                            //获取设备类型的
                                            var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
                                            //新风面板的新风设备,则不显示
                                            if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
                                            {
                                                continue;
                                            }
                                            if (device.Type == DeviceType.FreshAir)
                                            {
                                                targetList.Add(device);
                                                oldTargetList.Add(device);
                                            }
                                            break;
                                        case 2:
                                            if (device.Type == DeviceType.TemperatureSensor)
                                            {
                                                targetList.Add(device);
                                                oldTargetList.Add(device);
                                            }
                                            break;
                                        case 3:
                                            if (device.Type == DeviceType.FreshAirHumiditySensor)
                                            {
                                                targetList.Add(device);
                                                oldTargetList.Add(device);
                                            }
                                            break;
                                        case 4:
                                            //PM2.5
                                            break;
                                    }
                                    if (device.Type == DeviceType.FreshAir)
                                    {
                                        targetList.Add(device);
                                        oldTargetList.Add(device);
                                    }
                                }
                                }
                            }
                        }
                    }
                }
                catch { }
                catch (Exception ex)
                {
                    var mess = ex.Message;
                }
                finally
                {
                    Application.RunOnMainThread(() =>
                    {
                        if (supportRoomList.Count != 0)
                        {
                            Shared.Common.Room curRoom = supportRoomList[0];
                            int index = 0;
                            RefreshRoomList(curRoom, ref index);
                            RefreshDeviceList(curRoom);
                            if (curRoom.ListDevice.Count == 0 || targetList.Count == 0)
                            {
                                btnFinifh.Enable = false;
                                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
                            }
                            else
                            {
                                btnFinifh.Enable = true;
                                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                            }
                            RefreshRoomList();
                        }
                        //首次是否能点击保存
                        if (targetList.Count == 0)
                        {
                            btnFinifh.Enable = false;
                            btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
                        }
                        else
                        {
                            btnFinifh.Enable = true;
                            btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                        }
                        CommonPage.Loading.Hide();
                        midVerticalScrolViewLayout.EndHeaderRefreshing();
                    });
                }
            });
        }
        /// <summary>
        /// 切换楼层
        /// </summary>
        /// <param name="dialog"></param>
        /// <param name="curFloorId"></param>
        /// <param name="btnMethodText"></param>
        /// <param name="oldbuttonText"></param>
        /// <param name="oldbutton"></param>
        void ChangeFloor(Dialog dialog, string curFloorId, Button btnMethodText, Button oldbuttonText, Button oldbutton)
        {
            if (curControlDev.currentSelectFloorId == curFloorId)
            {
                return;
            }
            curControlDev.currentSelectFloorId = curFloorId;
            btnFloorText.Text = dicFloorList[curFloorId];
            //获取楼层中房间列表
            supportRoomList = GetFloorRoomList();
            if (supportRoomList.Count == 0)
            {
                return;
            }
            var curRoom = new Room();
            if (supportRoomList.Count != 0)
            {
                curRoom = supportRoomList[0];
            }
            else
            {
                curRoom = new Shared.Common.Room();
                supportRoomList.Add(curRoom);
            }
            if (!btnMethodText.IsSelected)
            {
                if (oldbutton != null)
                {
                    oldbutton.IsSelected = false;
                }
                if (oldbuttonText != null)
                {
                    oldbuttonText.TextColor = Shared.Common.ZigbeeColor.Current.XMGray3;
                }
                oldbutton = btnMethodText;
                oldbuttonText = btnMethodText;
                btnMethodText.IsSelected = true;
                oldbuttonText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                oldbuttonText.IsBold = true;
            }
            int index = 0;
            RefreshRoomList(curRoom, ref index);
            if (targetList.Count == 0)
            {
                btnFinifh.Enable = false;
                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
            }
            else
            {
                btnFinifh.Enable = true;
                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
            }
            dialog.Close();
        }
        /// <summary>
        /// 切换房间
        /// </summary>
        /// <param name="curRoom"></param>
        /// <param name="room"></param>
        /// <param name="btnRoom"></param>
        /// <param name="curentOldRoom"></param>
        /// <param name="btnRoomFrameLayout"></param>
        /// <param name="curentOldRoomFrameLayout"></param>
        void ChangeRoom(Room curRoom, Room room, Button btnRoom, Button curentOldRoom, FrameLayout btnRoomFrameLayout, FrameLayout curentOldRoomFrameLayout)
        {
            if (!btnRoom.IsSelected)
            {
                if (curentOldRoom != null)
                {
                    curentOldRoom.TextColor = Shared.Common.ZigbeeColor.Current.XMGray3;
                }
                curentOldRoom = btnRoom;
                curentOldRoom.TextColor = Shared.Common.ZigbeeColor.Current.XMWhite;
            }
            if (btnRoomFrameLayout.BorderWidth == 1)
            {
                if (curentOldRoomFrameLayout != null)
                {
                    curentOldRoomFrameLayout.BorderWidth = 1;
                    curentOldRoomFrameLayout.BorderColor = Shared.Common.ZigbeeColor.Current.XMOrange;
                    curentOldRoomFrameLayout.BackgroundImagePath = "Item/RoomIconBackground.png";
                }
                curentOldRoomFrameLayout = btnRoomFrameLayout;
                curentOldRoomFrameLayout.BorderWidth = 0;
                curentOldRoomFrameLayout.BackgroundImagePath = "Item/RoomIconBackgroundSelected.png";
            }
            curRoom = room;
            curControlDev.RoomId = room.Id;
            if (curRoom.ListSceneId.Count == 0)
            {
                btnFinifh.Enable = false;
                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
            }
            else
            {
                btnFinifh.Enable = true;
                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
            }
            if (targetList.Count == 0)
            {
                btnFinifh.Enable = false;
                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
            }
            else
            {
                btnFinifh.Enable = true;
                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
            }
            RefreshDeviceList(curRoom);
        }
        /// <summary>
        /// 切换绑定目标
        /// </summary>
        void ChangeTarget(CommonDevice device, Button btnChoose, Button oldDevice)
        {
            if (curControlDev.bindList.Count != 0)
            {
                if (btnChoose.IsSelected)
                {
                    new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindExist), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
                    return;
                }
            }
            if (!btnChoose.IsSelected)
            {
                if (oldDevice != null)
                {
                    oldDevice.IsSelected = false;
                    oldDevice.Visible = false;
                }
                oldDevice = btnChoose;
                oldDevice.IsSelected = true;
                oldDevice.Visible = true;
                targetList.Clear();
                targetList.Add(device);
            }
            if (targetList.Count == 0)
            {
                btnFinifh.Enable = false;
                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
            }
            else
            {
                btnFinifh.Enable = true;
                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
            }
        }
        /// <summary>
@@ -960,24 +783,127 @@
        /// <param name="curControlDev"></param>
        void SaveTarget()
        {
            bool isFinish = false;
            //空目标
            if (targetList.Count == 0)
            {
                Application.RunOnMainThread(() =>
                //空目标
                System.Threading.Tasks.Task.Run(async () =>
                {
                    var myTip = new Tip();
                    myTip.Direction = AMPopTipDirection.None;
                    myTip.CloseTime = 2;
                    myTip.Text = Language.StringByID(R.MyInternationalizationString.BindDeviceTargetIsEmpty);
                    myTip.Show(Common.CommonPage.Instance);
                    try
                    {
                        Application.RunOnMainThread(() => { CommonPage.Loading.Start(""); });
                        if (oldTargetList.Count != 0)
                        {
                            //删除取消的目标
                            foreach (var bd in oldTargetList)
                            {
                                var delDevice = new DelDeviceBindData();
                                delDevice.DeviceAddr = curControlDev.DeviceAddr;
                                delDevice.Epoint = curControlDev.DeviceEpoint;
                                var removeDevice = new RemoveBindListObj();
                                removeDevice.BindType = 0;
                                switch (curDeviceBindType)
                                {
                                    case 1:
                                        removeDevice.BindCluster = 514;
                                        break;
                                    case 2:
                                        removeDevice.BindCluster = 1026;
                                        break;
                                    case 3:
                                        removeDevice.BindCluster = 1029;
                                        break;
                                    case 4:
                                        //PM2.5
                                        break;
                                }
                                removeDevice.BindMacAddr = bd.DeviceAddr;
                                removeDevice.BindEpoint = bd.DeviceEpoint;
                                delDevice.RemoveBindList.Add(removeDevice);
                                var delResult = new DelDeviceBindResponseAllData();
                                delResult = await curControlDev.DelDeviceBindAsync(delDevice);
                                if (delResult != null && delResult.removeBindResultResponseData != null)
                                {
                                    if (delResult.removeBindResultResponseData.Result == 0)
                                    {
                                        switch (curDeviceBindType)
                                        {
                                            case 1:
                                                if (actionFreshAirTarget != null)
                                                {
                                                    actionFreshAirTarget("");
                                                }
                                                break;
                                            case 2:
                                                if (actionTemperatureTarget != null)
                                                {
                                                    actionTemperatureTarget("");
                                                }
                                                break;
                                            case 3:
                                                if (actionHumidityTarget != null)
                                                {
                                                    actionHumidityTarget("");
                                                }
                                                break;
                                            case 4:
                                                if (actionPMTarget != null)
                                                {
                                                    actionPMTarget("");
                                                }
                                                break;
                                        }
                                        Application.RunOnMainThread(() =>
                                        {
                                            CommonPage.Loading.Hide();
                                            btnFinifh.Enable = true;
                                            btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                            this.RemoveFromParent();
                                        });
                                    }
                                    else
                                    {
                                        Application.RunOnMainThread(() =>
                                        {
                                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
                                            btnFinifh.Enable = true;
                                            btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                            CommonPage.Loading.Hide();
                                        });
                                        return;
                                    }
                                }
                            }
                        }
                        else
                        {
                            //没有目标提示
                            Application.RunOnMainThread(() =>
                            {
                                var myTip = new Tip();
                                myTip.Direction = AMPopTipDirection.None;
                                myTip.CloseTime = 2;
                                myTip.Text = Language.StringByID(R.MyInternationalizationString.BindDeviceTargetIsEmpty);
                                myTip.Show(Common.CommonPage.Instance);
                                btnFinifh.Enable = true;
                                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                CommonPage.Loading.Hide();
                            });
                            return;
                        }
                    }
                    catch (Exception ex)
                    {
                        var mess = ex.Message;
                    }
                });
                return;
            }
            else
            {
                //已经绑定过的目标
                //选中目标
                //1、已经绑定过的目标
                if (checkExistDevice())
                {
                    Application.RunOnMainThread(() =>
@@ -987,6 +913,8 @@
                        myTip.CloseTime = 2;
                        myTip.Text = Language.StringByID(R.MyInternationalizationString.BindExist);
                        myTip.Show(Common.CommonPage.Instance);
                        btnFinifh.Enable = true;
                        btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                    });
                    return;
                }
@@ -1002,23 +930,52 @@
                        {
                            foreach (var bd in oldTargetList)
                            {
                                var res = await RemoveTargets(bd);
                                if (res != 0)
                                {
                                    Application.RunOnMainThread(() =>
                                    {
                                        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
                                        btnFinifh.Enable = true;
                                        btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                        CommonPage.Loading.Hide();
                                        return;
                                    });
                                }
                                var delDevice = new DelDeviceBindData();
                                delDevice.DeviceAddr = curControlDev.DeviceAddr;
                                delDevice.Epoint = curControlDev.DeviceEpoint;
                                var removeDevice = new RemoveBindListObj();
                                removeDevice.BindType = 0;
                                switch (curDeviceBindType)
                                {
                                    case 1:
                                        removeDevice.BindCluster = 514;
                                        break;
                                    case 2:
                                        removeDevice.BindCluster = 1026;
                                        break;
                                    case 3:
                                        removeDevice.BindCluster = 1029;
                                        break;
                                    case 4:
                                        //PM2.5
                                        break;
                                }
                                removeDevice.BindMacAddr = bd.DeviceAddr;
                                removeDevice.BindEpoint = bd.DeviceEpoint;
                                delDevice.RemoveBindList.Add(removeDevice);
                                var delResult = new DelDeviceBindResponseAllData();
                                delResult = await curControlDev.DelDeviceBindAsync(delDevice);
                                if (delResult != null && delResult.removeBindResultResponseData != null)
                                {
                                    if (delResult.removeBindResultResponseData.Result != 0)
                                    {
                                        Application.RunOnMainThread(() =>
                                        {
                                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
                                            btnFinifh.Enable = true;
                                            btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                            CommonPage.Loading.Hide();
                                        });
                                        return;
                                    }
                                }
                            }
                        }
                        //添加新的目标
                        //2、添加新的目标
                        string bindName = "";
                        var addBindeDev = new AddBindData();
                        addBindeDev.DeviceAddr = curControlDev.DeviceAddr;
                        addBindeDev.Epoint = curControlDev.DeviceEpoint;
@@ -1036,25 +993,29 @@
                                case 3:
                                    addBindInfo.BindCluster = 1029;
                                    break;
                                case 4:
                                    //PM2.5
                                    break;
                            }
                            addBindInfo.BindType = 0;
                            addBindInfo.BindMacAddr = de.DeviceAddr;
                            addBindInfo.BindEpoint = de.DeviceEpoint;
                            addBindeDev.BindList.Add(addBindInfo);
                            bindName = de.DeviceEpointName;
                        }
                        var dev = new AddedDeviceBindResponseAllData();
                        dev = await curControlDev.AddDeviceBindAsync(addBindeDev);
                        if (dev != null || dev.addedDeviceBindResponseData == null)
                        if (dev == null || dev.addedDeviceBindResponseData == null)
                        {
                            Application.RunOnMainThread(() =>
                            {
                                CommonPage.Loading.Hide();
                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
                                btnFinifh.Enable = true;
                                btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                return;
                            });
                            btnFinifh.Enable = true;
                            btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                            return;
                        }
                        else
                        {
@@ -1062,24 +1023,41 @@
                            {
                                curControlDev.bindList = dev.addedDeviceBindResponseData.BindList;
                                targetList.Clear();
                                isFinish = true;
                                if (isFinish)
                                switch (curDeviceBindType)
                                {
                                    if (action != null)
                                    {
                                        action(curControlDev.bindList);
                                    }
                                    this.RemoveFromParent();
                                    case 1:
                                        if (actionFreshAirTarget != null)
                                        {
                                            actionFreshAirTarget(bindName);
                                        }
                                        break;
                                    case 2:
                                        if (actionTemperatureTarget != null)
                                        {
                                            actionTemperatureTarget(bindName);
                                        }
                                        break;
                                    case 3:
                                        if (actionHumidityTarget != null)
                                        {
                                            actionHumidityTarget(bindName);
                                        }
                                        break;
                                    case 4:
                                        if (actionPMTarget != null)
                                        {
                                            actionPMTarget(bindName);
                                        }
                                        break;
                                }
                                else
                                {
                                    this.RemoveFromParent();
                                }
                                Application.RunOnMainThread(() =>
                                {
                                    CommonPage.Loading.Hide();
                                    btnFinifh.Enable = true;
                                    btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                    this.RemoveFromParent();
                                });
                            }
                            else if (dev.addedDeviceBindResponseData.Result == 1)
@@ -1118,68 +1096,12 @@
                            }
                        }
                    }
                    catch
                    catch (Exception ex)
                    {
                        var mess = ex.Message;
                    }
                });
            }
        }
        /// <summary>
        /// 删除存在的目标
        /// </summary>
        /// <param name="bindDevice"></param>
        /// <param name="btnDel"></param>
        /// <returns></returns>
        private async System.Threading.Tasks.Task<int> RemoveTargets(CommonDevice delDev)
        {
            var delDevice = new DelDeviceBindData();
            delDevice.DeviceAddr = curControlDev.DeviceAddr;
            delDevice.Epoint = curControlDev.DeviceEpoint;
            var removeDevice = new RemoveBindListObj();
            removeDevice.BindType = 0;
            switch (curDeviceBindType)
            {
                case 1:
                    removeDevice.BindCluster = 514;
                    break;
                case 2:
                    removeDevice.BindCluster = 1026;
                    break;
                case 3:
                    removeDevice.BindCluster = 1029;
                    break;
            }
            removeDevice.BindMacAddr = delDev.DeviceAddr;
            removeDevice.BindEpoint = delDev.DeviceEpoint;
            delDevice.RemoveBindList.Add(removeDevice);
            try
            {
                CommonPage.Loading.Start("");
                var delResult = new DelDeviceBindResponseAllData();
                delResult = await curControlDev.DelDeviceBindAsync(delDevice);
                if (delResult != null && delResult.delDeviceBindResponseData != null)
                {
                    if (delResult.delDeviceBindResponseData?.RemoveBindList != null)
                    {
                        foreach (var re in delResult.delDeviceBindResponseData.RemoveBindList)
                        {
                            if (re.Result == 0)
                            {
                                return 0;
                            }
                            {
                                return -1;
                            }
                        }
                    }
                }
            }
            catch { }
            return -1;
        }
        /// <summary>
@@ -1208,7 +1130,7 @@
        /// <summary>
        /// 能显示的房间列表
        /// </summary>
        private List<Room> GetSupportRoomList(Room curRoom)
        private List<Room> GetSupportRoomList()
        {
            var roomTempList = new List<Room>();
            for (int i = 0; i < supportRoomList.Count; i++)
@@ -1225,11 +1147,81 @@
                {
                    continue;
                }
                roomTempList.Add(room);
                if (roomTempList.Count != 0)
                else
                {
                    curRoom = roomTempList[0];
                    List<CommonDevice> roomIncludeMatchDevice = new List<CommonDevice>();
                    //房间中没有对应的支持绑定的目标
                    switch (curDeviceBindType)
                    {
                        case 1:
                            foreach (var de in room.ListDevice)
                            {
                                var device = LocalDevice.Current.GetDevice(de);
                                if (device != null)
                                {
                                    //获取设备类型的
                                    var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
                                    //新风面板的新风设备,则不显示
                                    if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
                                    {
                                        continue;
                                    }
                                    if (device.Type == DeviceType.FreshAir)
                                    {
                                        roomIncludeMatchDevice.Add(device);
                                    }
                                }
                            }
                            break;
                        case 2:
                            foreach (var de in room.ListDevice)
                            {
                                var device = LocalDevice.Current.GetDevice(de);
                                if (device != null)
                                {
                                    if (device.Type == DeviceType.TemperatureSensor)
                                    {
                                        roomIncludeMatchDevice.Add(device);
                                    }
                                }
                            }
                            break;
                        case 3:
                            foreach (var de in room.ListDevice)
                            {
                                var device = LocalDevice.Current.GetDevice(de);
                                if (device != null)
                                {
                                    if (device.Type == DeviceType.FreshAirHumiditySensor)
                                    {
                                        roomIncludeMatchDevice.Add(device);
                                    }
                                }
                            }
                            break;
                        case 4:
                            break;
                    }
                    if (roomIncludeMatchDevice.Count == 0)
                    {
                        continue;
                    }
                }
                if (!string.IsNullOrEmpty(room.FloorId))
                {
                    //有楼层
                    if (room.FloorId == curControlDev.currentSelectFloorId)
                    {
                        roomTempList.Add(room);
                    }
                }
                else
                {
                    //没有楼层
                    roomTempList.Add(room);
                }
            }
            return roomTempList;
@@ -1261,24 +1253,21 @@
            }
            else
            {
                // 获取楼层对应对房间
                // 获取支持的房间
                foreach (var room in listAllRoom)
                {
                    if (room.FloorId == curControlDev.currentSelectFloorId)
                    if (room.IsLove)
                    {
                        if (room.IsLove)
                        {
                            continue;
                        }
                        supportRoomListTemp.Add(room);
                        continue;
                    }
                    supportRoomListTemp.Add(room);
                }
            }
            return supportRoomListTemp;
        }
        /// <summary>
        /// 房间中匹配的支持绑定的所有目标列表
        /// 所有房间中匹配的支持绑定的所有目标列表
        /// </summary>
        /// <returns></returns>
        List<CommonDevice> GetAllRoomSupportDeviceList()
@@ -1299,13 +1288,13 @@
                            var device = LocalDevice.Current.GetDevice(deviceKeys);
                            if (device != null)
                            {
                                ////获取设备类型的
                                //var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
                                ////新风面板的新风设备,则不显示
                                //if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
                                //{
                                //    continue;
                                //}
                                //获取设备类型的
                                var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
                                //新风面板的新风设备,则不显示
                                if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
                                {
                                    continue;
                                }
                                if (device.Type == DeviceType.FreshAir)
                                {
                                    currentPanelBindSupportDeviceListTemp.Add(device);
@@ -1315,8 +1304,44 @@
                    }
                    break;
                case 2:
                    foreach (var r in supportRoomList)
                    {
                        if (r.ListDevice.Count == 0)
                        {
                            continue;
                        }
                        foreach (var deviceKeys in r.ListDevice)
                        {
                            var device = LocalDevice.Current.GetDevice(deviceKeys);
                            if (device != null)
                            {
                                if (device.Type == DeviceType.TemperatureSensor)
                                {
                                    currentPanelBindSupportDeviceListTemp.Add(device);
                                }
                            }
                        }
                    }
                    break;
                case 3:
                    foreach (var r in supportRoomList)
                    {
                        if (r.ListDevice.Count == 0)
                        {
                            continue;
                        }
                        foreach (var deviceKeys in r.ListDevice)
                        {
                            var device = LocalDevice.Current.GetDevice(deviceKeys);
                            if (device != null)
                            {
                                if (device.Type == DeviceType.FreshAirHumiditySensor)
                                {
                                    currentPanelBindSupportDeviceListTemp.Add(device);
                                }
                            }
                        }
                    }
                    break;
                case 4:
                    break;
@@ -1340,13 +1365,13 @@
                        var device = LocalDevice.Current.GetDevice(deviceKeys);
                        if (device != null)
                        {
                            ////获取设备类型的
                            //var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
                            ////新风面板的新风设备,则不显示
                            //if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
                            //{
                            //    continue;
                            //}
                            //获取设备类型的
                            var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
                            //新风面板的新风设备,则不显示
                            if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
                            {
                                continue;
                            }
                            if (device.Type == DeviceType.FreshAir)
                            {
                                curRoomDeviceListTemp.Add(device);
@@ -1355,14 +1380,50 @@
                    }
                    break;
                case 2:
                    foreach (var deviceKeys in curRoom.ListDevice)
                    {
                        var device = LocalDevice.Current.GetDevice(deviceKeys);
                        if (device != null)
                        {
                            if (device.Type == DeviceType.TemperatureSensor)
                            {
                                curRoomDeviceListTemp.Add(device);
                            }
                        }
                    }
                    break;
                case 3:
                    foreach (var deviceKeys in curRoom.ListDevice)
                    {
                        var device = LocalDevice.Current.GetDevice(deviceKeys);
                        if (device != null)
                        {
                            if (device.Type == DeviceType.FreshAirHumiditySensor)
                            {
                                curRoomDeviceListTemp.Add(device);
                            }
                        }
                    }
                    break;
                case 4:
                    break;
            }
            return curRoomDeviceListTemp;
        }
        #endregion
        #endregion
        #region 移除方法
        /// <summary>
        /// 重写移除方法
        /// </summary>
        public override void RemoveFromParent()
        {
            actionFreshAirTarget = null;
            actionTemperatureTarget = null;
            actionHumidityTarget = null;
            actionPMTarget = null;
            base.RemoveFromParent();
        }
        #endregion
    }
}
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFunctionSettionForm.cs
@@ -144,6 +144,10 @@
                    {
                        device.IconPath = "Device/Light.png";
                    }
                    else
                    {
                        device.IconPath = "Device/RelayEpoint.png";
                    }
                    device.ReSave();
                }
                this.CloseProgressBar();
@@ -332,10 +336,19 @@
                        var title = Language.StringByID(R.MyInternationalizationString.uSelectFunctionType);
                        var form = new BottomItemSelectForm();
                        form.CancelCallEvent = true;//允许取消
                        form.AddForm(title, listText, nowSelectNo);
                        form.FinishSelectEvent += (selectNo) =>
                        {
                            btnFunction.Text = listText[selectNo];
                            if (selectNo == -1)
                            {
                                //选择取消
                                btnFunction.Text = string.Empty;
                            }
                            else
                            {
                                btnFunction.Text = listText[selectNo];
                            }
                            nowSelectNo = selectNo;
                            //记录起当前选择的功能类型
                            if (selectNo == 0)
@@ -346,10 +359,14 @@
                            {
                                dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A灯光;
                            }
                            else
                            else if (selectNo == 2)
                            {
                                dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A插座;
                            }
                            else
                            {
                                dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A未定义;
                            }
                        };
                    };
                }
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs
@@ -144,6 +144,10 @@
                    {
                        device.IconPath = "Device/Light.png";
                    }
                    else
                    {
                        device.IconPath = "Device/RelayEpoint.png";
                    }
                    device.ReSave();
                }
                this.CloseProgressBar();
@@ -332,10 +336,19 @@
                        var title = Language.StringByID(R.MyInternationalizationString.uSelectFunctionType);
                        var form = new BottomItemSelectForm();
                        form.CancelCallEvent = true;//允许取消
                        form.AddForm(title, listText, nowSelectNo);
                        form.FinishSelectEvent += (selectNo) =>
                        {
                            btnFunction.Text = listText[selectNo];
                            if (selectNo == -1)
                            {
                                //选择取消
                                btnFunction.Text = string.Empty;
                            }
                            else
                            {
                                btnFunction.Text = listText[selectNo];
                            }
                            nowSelectNo = selectNo;
                            //记录起当前选择的功能类型
                            if (selectNo == 0)
@@ -346,10 +359,14 @@
                            {
                                dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A灯光;
                            }
                            else
                            else if (selectNo == 2)
                            {
                                dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A插座;
                            }
                            else
                            {
                                dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A未定义;
                            }
                        };
                    };
                }
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs
old mode 100755 new mode 100644
@@ -77,10 +77,10 @@
        #endregion
        /// <summary>
        /// 获取当前门锁的常开模式
        /// 获取当前门锁的常开模式
        /// </summary>
        /// <param name="doorLock:当前门锁"></param> 
        /// <returns></returns>
        /// <returns>null:没有回复  ; true:门锁常开;false:门锁常关</returns>
        public static async System.Threading.Tasks.Task<bool?> GetNormallyOpenMode(ZigBee.Device.DoorLock doorLock)
        {
            bool? IsDoorLockNormallyMode = null;
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs
old mode 100755 new mode 100644
@@ -15,7 +15,7 @@
        }
        #region 变量申明
        public FrameLayout topFrameLayout = new FrameLayout { Height = Application.GetRealHeight(184), BackgroundColor = ZigbeeColor.Current.XMTopFrameLayout };
        public FrameLayout midFrameLayout = new FrameLayout { Height = Application.GetRealHeight(1921 - 184), BackgroundColor = ZigbeeColor.Current.XMMidFrameLayout };
        public FrameLayout midFrameLayout = new FrameLayout { Height = Application.GetRealHeight(1925 - 184), BackgroundColor = ZigbeeColor.Current.XMMidFrameLayout };
        #region 底部有圆角布局
        /// 背景阴影界面
        /// </summary>
@@ -120,7 +120,6 @@
            Height = 1,
            BackgroundColor = Shared.Common.ZigbeeColor.Current.XMTitleLine,
        };
        /// <summary>
        /// 弹窗取消按键
@@ -233,6 +232,7 @@
                PlaceholderText = Language.StringByID(R.MyInternationalizationString.InputUnlockPasswrd),
                TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
                TextAlignment = TextAlignment.BottomLeft,
                IsNumberKeyboardType = true,
            };
            editInputPasswordFrameLayout.AddChidren(editInputPassword);
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/ShowDoorLockMsgControl.cs
old mode 100755 new mode 100644
@@ -265,7 +265,27 @@
                IsNumberKeyboardType = true,
            };
            editTextFrameLayout.AddChidren(editInvalidTime);
            editInvalidTime.TextChangeEventHandler += (sender, e) =>
            {
                if (!string.IsNullOrEmpty((sender as EditText).Text))
                {
                    var textFir = (sender as EditText).Text.Substring(0, 1);
                    if ((sender as EditText).Text.Length > 1)
                    {
                        if (textFir == "0")
                        {
                            editInvalidTime.Text = (sender as EditText).Text.Substring(1, 1);
                        }
                    }
                    if (int.Parse((sender as EditText).Text) > 72)
                    {
                        string msg0 = Language.StringByID(R.MyInternationalizationString.InvalidTimeMoreThan72);
                        var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Normal, msg0, Language.StringByID(R.MyInternationalizationString.confrim));
                        alert.Show();
                        editInvalidTime.Text = "72";
                    }
                }
            };
            var btnMsg2 = new Button()
            {
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UnLockMethod.cs
@@ -628,6 +628,7 @@
                                     var localDoorLockObj = new ZigBee.Device.DoorLock.LocaDoorLockObj() { };
                                     localDoorLockObj.UserID = curDoorLockUser.UserID;
                                     localDoorLockObj.UnlockType = curDoorLockUser.UnlockType;
                                     localDoorLockObj.PrimaryId = curDoorLockUser.PrimaryId;
                                     localDoorLockObj.EntryTime = curDoorLockUser.EntryTime;
                                     localDoorLockObj.UserName = refreshDoorLockData.UserIdRemarks;
                                     localDoorLockObj.ConnectedAccount = curAccountObj.SubAccountDistributedMark;
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
@@ -685,9 +685,7 @@
                            {
                                tempRes = false;
                            }
                            NormallyOpenModeValue(tempRes);
                            DoorLockCommonInfo.NormallyOpenModeValue(doorLock, tempRes);
                            Application.RunOnMainThread(async () =>
                            {
                                var resTemp = await Shared.Phone.Device.Logic.SkipView.Exist();
@@ -1036,23 +1034,7 @@
        }
        #endregion
        #region 常开模式
        /// <summary>
        /// 门锁常开模式值
        /// </summary>
        public void NormallyOpenModeValue(bool value)
        {
            string key = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint;
            if (doorLock.IsDoorLockNormallyMode.ContainsKey(key))
            {
                doorLock.IsDoorLockNormallyMode[key] = value;
            }
            else
            {
                doorLock.IsDoorLockNormallyMode.Add(key, value);
            }
        }
        #region 常开模式
        /// <summary>
        /// 常开模式处理
        /// </summary>
@@ -1102,7 +1084,7 @@
                            //每次重新设置常开,默认时间都是12小时
                            DoorLockCommonInfo.NormallyOpenModeInvalidTime = 12;
                            NormallyOpenModeValue(true);
                            DoorLockCommonInfo.NormallyOpenModeValue(doorLock, true);
                            Application.RunOnMainThread(() =>
                            {
                                UpdateNomallyOpenStatus();
@@ -1146,8 +1128,8 @@
            {
                if (IsFromReport)
                {
                    //上报“常开模式”已被取消,app默认了“常开模式”被取消
                    NormallyOpenModeValue(false);
                    //上报“常开模式”已被取消,app默认了“常开模式”被取消
                    DoorLockCommonInfo.NormallyOpenModeValue(doorLock, false);
                    Application.RunOnMainThread(() =>
                    {
                        UpdateNomallyOpenStatus();
@@ -1165,8 +1147,8 @@
                }
                else
                {
                    //app默认“常开模式”还是开启
                    NormallyOpenModeValue(true);
                    //app默认“常开模式”还是开启
                    DoorLockCommonInfo.NormallyOpenModeValue(doorLock, true);
                    Application.RunOnMainThread(() =>
                    {
                        UpdateNomallyOpenStatus();
@@ -1197,7 +1179,7 @@
                    {
                        string msg0 = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime);
                        this.ShowTipMsg(msg0);
                        NormallyOpenModeValue(false);
                        DoorLockCommonInfo.NormallyOpenModeValue(doorLock, false);
                        Application.RunOnMainThread(() =>
                        {
                            UpdateNomallyOpenStatus();
@@ -1208,7 +1190,7 @@
                    {
                        string msg1 = Language.StringByID(R.MyInternationalizationString.OpenNormallyOpenModeFailed);
                        this.ShowTipMsg(msg1);
                        NormallyOpenModeValue(false);
                        DoorLockCommonInfo.NormallyOpenModeValue(doorLock, false);
                        Application.RunOnMainThread(() =>
                        {
                            UpdateNomallyOpenStatus();
@@ -1217,8 +1199,8 @@
                    }
                    else
                    {
                        //保持“常开成功”
                        NormallyOpenModeValue(true);
                        //保持“常开成功”
                        DoorLockCommonInfo.NormallyOpenModeValue(doorLock, true);
                        Application.RunOnMainThread(() =>
                        {
                            UpdateNomallyOpenStatus();
@@ -1237,8 +1219,8 @@
                }
                else
                {
                    //app操作不取消“常开模式”
                    NormallyOpenModeValue(true);
                    //app操作不取消“常开模式”
                    DoorLockCommonInfo.NormallyOpenModeValue(doorLock, true);
                    Application.RunOnMainThread(() =>
                    {
                        UpdateNomallyOpenStatus();
@@ -1250,8 +1232,8 @@
            {
                if (IsFromReport)
                {
                    //上报门锁“常开模式”已经取消,现在app确认“常开模式”取消
                    NormallyOpenModeValue(false);
                    //上报门锁“常开模式”已经取消,现在app确认“常开模式”取消
                    DoorLockCommonInfo.NormallyOpenModeValue(doorLock, false);
                    Application.RunOnMainThread(() =>
                    {
                        UpdateNomallyOpenStatus();
@@ -1290,8 +1272,8 @@
                        //添加App开启常开模式的历史记录
                        HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog(this.doorLock, 9002, string.Empty);
                        //app确认取消“常开模式”成功
                        NormallyOpenModeValue(false);
                        //app确认取消“常开模式”成功
                        DoorLockCommonInfo.NormallyOpenModeValue(doorLock, false);
                        Application.RunOnMainThread(() =>
                        {
                            UpdateNomallyOpenStatus();
@@ -1367,19 +1349,6 @@
            alertTimeInValidSetting.InvalidTimeAction += async (obj) =>
             {
                 Regex rg = new Regex("^[0-9]+$");
                 if (!rg.IsMatch(obj))
                 {
                     //必须是数字
                     string msg0 = Language.StringByID(R.MyInternationalizationString.NormallyOpenModeInvalidTimeTip);
                     this.ShowTipMsg(msg0);
                     string msgTimeInValidSetting2 = Language.StringByID(R.MyInternationalizationString.DoorLockOpenAllTheTime);
                     var timeConfrim2 = Language.StringByID(R.MyInternationalizationString.Confrim);
                     var alertTimeInValidSetting2 = new ShowDoorLockMsgControl(ShowDoorLockMsgControl.DoorLockMsgType.InValid, msgTimeInValidSetting2, timeConfrim2);
                     alertTimeInValidSetting2.Show();
                     return;
                 }
                 //常开模式失效时间设置成功
                 var temp = int.Parse(obj);
                 DoorLockCommonInfo.NormallyOpenModeInvalidTime = temp;
@@ -1389,8 +1358,8 @@
                 {
                     //默认创建常开模式失败
                     string msg0 = Language.StringByID(R.MyInternationalizationString.AddLogicNormallyModeFailed);
                     this.ShowTipMsg(msg0);
                     var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Normal, msg0, Language.StringByID(R.MyInternationalizationString.confrim));
                     alert.Show();
                     //二次加载弹窗 常开模式开启提示
                     NomallyOpenModeInvalidTimeDialog();
                 }
@@ -1408,6 +1377,10 @@
                return;
            }
            string key = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint;
            if (!doorLock.IsDoorLockNormallyMode.ContainsKey(key))
            {
                return;
            }
            if (doorLock.IsDoorLockNormallyMode[key] == true)
            {
                btnNormallyOpen.IsSelected = true;
ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs
@@ -109,6 +109,15 @@
                HdlGatewayLogic.Current.ChangedGatewayRoom(this.zbGateway, roomKeys);
            };
            //所属住宅
            caption = Language.StringByID(R.MyInternationalizationString.uBelongResidence);
            var btnBeloneArea = new FrameCaptionViewControl(caption, Common.Config.Instance.Home.Name, listview.rowSpace / 2);
            btnBeloneArea.UseClickStatu = false;
            listview.AddChidren(btnBeloneArea);
            btnBeloneArea.InitControl();
            //划线
            btnBeloneArea.AddBottomLine();
            //数据上传与下载
            var rowData = new RowLayoutControl(listview.rowSpace / 2);
            listview.AddChidren(rowData);
ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayProductInfoForm.cs
@@ -111,14 +111,17 @@
            btnType.AddBottomLine();
            HdlGatewayLogic.Current.SetGatewayImageText(btnType.txtView, zbGateway);
            //所属住宅
            caption = Language.StringByID(R.MyInternationalizationString.uBelongResidence);
            var btnBeloneArea = new FrameCaptionViewControl(caption, Common.Config.Instance.Home.Name, listview.rowSpace / 2);
            btnBeloneArea.UseClickStatu = false;
            listview.AddChidren(btnBeloneArea);
            btnBeloneArea.InitControl();
            //划线
            btnBeloneArea.AddBottomLine();
            //安装位置
            var rowBeloneArea = new BelongAreaControl(listview.rowSpace / 2);
            listview.AddChidren(rowBeloneArea);
            rowBeloneArea.InitControl(Language.StringByID(R.MyInternationalizationString.uInstallationLocation), this.zbGateway);
            //底线
            rowBeloneArea.AddBottomLine();
            rowBeloneArea.SelectRoomEvent += (roomKeys) =>
            {
                //变更网关房间
                HdlGatewayLogic.Current.ChangedGatewayRoom(this.zbGateway, roomKeys);
            };
            //完成初始化桌布
            tableContr.FinishInitControl();
ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs
@@ -16,9 +16,13 @@
        /// </summary>
        private FrameLayout frameTable = null;
        /// <summary>
        /// 列表控件
        /// 列表控件(白色背景)
        /// </summary>
        private VerticalListControl listView = null;
        private FrameListControl listView = null;
        /// <summary>
        /// 整个界面的上下滑动控件
        /// </summary>
        private VerticalFrameControl listBackContr = null;
        /// <summary>
        /// 楼层顺序
        /// </summary>
@@ -64,10 +68,16 @@
            //清空bodyFrame
            this.ClearBodyFrame();
            //整个界面的上下滑动控件
            this.listBackContr = new VerticalFrameControl();
            listBackContr.Height = bodyFrameLayout.Height;
            bodyFrameLayout.AddChidren(listBackContr);
            //住宅行
            var rowHome = new RowLayoutControl();
            rowHome.Height = Application.GetRealHeight(173);
            rowHome.BackgroundColor = UserCenterColor.Current.White;
            bodyFrameLayout.AddChidren(rowHome);
            listBackContr.frameTable.AddChidren(rowHome);
            rowHome.frameTable.UseClickStatu = false;
            var btnAdreeIcon = rowHome.frameTable.AddLeftIcon(81);
@@ -144,8 +154,8 @@
            //初始化桌布
            this.frameTable = new FrameLayout();
            frameTable.Y = rowHome.Bottom + Application.GetRealHeight(23);
            frameTable.Height = bodyFrameLayout.Height - rowHome.Bottom - Application.GetRealHeight(23);
            bodyFrameLayout.AddChidren(frameTable);
            frameTable.Height = listBackContr.frameTable.Height - rowHome.Bottom - Application.GetRealHeight(23);
            listBackContr.frameTable.AddChidren(frameTable);
            //根据指定模式,初始化桌布控件
            this.InitFrameTableByMode();
@@ -244,7 +254,7 @@
            frameFloor.UseClickStatu = false;
            frameFloor.Height = Application.GetRealHeight(115);
            frameFloor.BackgroundColor = UserCenterColor.Current.White;
            frameTable.AddChidren(frameFloor);
            this.frameTable.AddChidren(frameFloor);
            //楼层
            var btnFloor = frameFloor.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uFloor), 200, 60);
@@ -253,11 +263,11 @@
            btnFloor.TextSize = 15;
            frameFloor.AddChidren(btnFloor, ChidrenBindMode.NotBind);
            listView = new VerticalListControl(29);
            listView = new FrameListControl(29);
            listView.BackgroundColor = UserCenterColor.Current.White;
            listView.Y = frameFloor.Bottom;
            listView.Height = frameTable.Height - frameFloor.Bottom;
            frameTable.AddChidren(listView);
            this.frameTable.AddChidren(listView);
            //初始化楼层行
            this.InitFloorRow();
@@ -289,7 +299,7 @@
                    this.AddFloorRow(keys, dicFloor[keys], i != count);
                }
                //调整控件高度
                listView.AdjustRealHeight(Application.GetRealHeight(23));
                this.AdjustContrlTableHeight();
            });
        }
@@ -306,6 +316,7 @@
        private void AddFloorRow(string keys, string floorName, bool addLine)
        {
            var frameRow = new RowLayoutControl(listView.rowSpace / 2);
            frameRow.MainKeys = keys;
            this.listView.AddChidren(frameRow);
            //图标
            var btnIcon = frameRow.frameTable.AddLeftIcon(81);
@@ -395,8 +406,24 @@
                        }
                        else
                        {
                            bool canMove = false;
                            for (int i = 0; i < listView.ChildrenCount; i++)
                            {
                                var myRow = listView.GetChildren(i) as RowLayoutControl;
                                if (myRow != null && myRow.MainKeys == keys)
                                {
                                    canMove = true;
                                    continue;
                                }
                                if (canMove == true)
                                {
                                    //它之后的行,全部往上移
                                    myRow.Y -= frameRow.Height;
                                }
                            }
                            frameRow.RemoveFromParent();
                            listView.AdjustRealHeight(Application.GetRealHeight(23));
                            //调整桌布高度
                            this.AdjustContrlTableHeight();
                        }
                    });
                };
@@ -495,7 +522,7 @@
            btnRoomList.TextSize = 15;
            frameRoom.AddChidren(btnRoomList, ChidrenBindMode.NotBind);
            listView = new VerticalListControl(29);
            listView = new FrameListControl(29);
            listView.BackgroundColor = UserCenterColor.Current.White;
            listView.Y = frameRoom.Bottom;
            listView.Height = frameTable.Height - frameRoom.Bottom;
@@ -523,8 +550,8 @@
                //添加房间行
                this.AddRoomRow(listRoom[i], i != listRoom.Count - 1);
            }
            //调整控件真实高度
            listView.AdjustRealHeight(Application.GetRealHeight(23));
            //调整桌布高度
            this.AdjustContrlTableHeight();
        }
        #endregion
@@ -539,6 +566,7 @@
        private void AddRoomRow(Common.Room room, bool addLine)
        {
            var frameRow = new RowLayoutControl(listView.rowSpace / 2);
            frameRow.MainKeys = room.Id;
            listView.AddChidren(frameRow);
            //图标
            var btnIcon = frameRow.frameTable.AddLeftIcon(81);
@@ -602,8 +630,24 @@
                    }
                    else
                    {
                        bool canMove = false;
                        for (int i = 0; i < listView.ChildrenCount; i++)
                        {
                            var myRow = listView.GetChildren(i) as RowLayoutControl;
                            if (myRow != null && myRow.MainKeys == room.Id)
                            {
                                canMove = true;
                                continue;
                            }
                            if (canMove == true)
                            {
                                //它之后的行,全部往上移
                                myRow.Y -= frameRow.Height;
                            }
                        }
                        frameRow.RemoveFromParent();
                        listView.AdjustRealHeight(Application.GetRealHeight(23));
                        //调整桌布高度
                        this.AdjustContrlTableHeight();
                    }
                });
            };
@@ -812,6 +856,17 @@
            return true;
        }
        /// <summary>
        /// 调整控件桌布高度
        /// </summary>
        private void AdjustContrlTableHeight()
        {
            //调整桌布高度
            listView.AdjustRealHeight(Application.GetRealHeight(23));
            this.frameTable.Height = listView.Bottom;
            this.listBackContr.AdjustTableHeight();
        }
        #endregion
        #region ■ 结构体_____________________________
ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs
old mode 100755 new mode 100644
@@ -1402,7 +1402,7 @@
        ///<summary >
        /// 配置按键指示灯面板节能模式
        /// <para>modeEnable:节能模式使能</para>
        /// <para>modeTime:无操作进入节能模式时间 0-ff</para>
        /// <para>modeTime:无操作进入节能模式时间 0-ffff</para>
        /// <para>节能模式亮度:0-100</para>
        /// </summary>
        public async System.Threading.Tasks.Task<ResponseAllData> SetKeyModeAsync(bool modeEnable, int modeTime, int level)
@@ -1509,11 +1509,11 @@
        string SetPanelModeModeData(bool modeEnable, int modeTime, int modelevel)
        {
            string data = "";
            string dataLength = "07";
            string dataLength = "08";
            string dataComand1 = "03";
            string dataComand2 = "04";
            string dataSerialNum = "01";
            string addDataLength = "03";
            string addDataLength = "04";
            string mode = "";
            string time = "";
            string level = "";
@@ -1527,17 +1527,30 @@
                {
                    mode = "00";
                }
                var sbString1 = new System.Text.StringBuilder();
                string temp = Convert.ToString(modeTime, 16);
                switch (temp.Length)
                if (modeTime == -1)
                {
                    case 1:
                        time = "0" + temp;
                        break;
                    case 2:
                        time = temp;
                        break;
                    //当节能模式没有给时间,默认给60秒
                    modeTime = 60;
                }
                var tempBytes = new byte[2];
                for (int i = 0; i < 2; i++)
                {
                    tempBytes[i] = (byte)(modeTime >> (i * 8) & 0xff);
                }
                var time1 = Convert.ToString(tempBytes[0], 16);
                var time2 = Convert.ToString(tempBytes[1], 16);
                if (time1.Length == 1)
                {
                    time1 = "0" + time1;
                }
                if (time2.Length == 1)
                {
                    time2 = "0" + time2;
                }
                time = (time1 + time2).ToUpper();
                var sbString2 = new System.Text.StringBuilder();
                string temp2 = Convert.ToString(modelevel, 16);
@@ -1550,11 +1563,10 @@
                        level = temp2;
                        break;
                }
                sbString1.Append(time.ToUpper());
                sbString2.Append(level.ToUpper());
                data = dataLength + dataComand1 + dataComand2 + dataSerialNum + addDataLength +
                   mode + sbString1 + sbString2;
                   mode + time + sbString2;
            }
            catch { };
@@ -2153,7 +2165,7 @@
                            if (gatewayTemp.clientDataPassthroughResponseData?.PassData != null)
                            {
                                var data = gatewayTemp.clientDataPassthroughResponseData.PassData;
                                if (data.Length == 16)
                                if (data.Length == 18)
                                {
                                    var command = data[4].ToString() + data[5].ToString() + data[2].ToString() + data[3].ToString();
                                    if (command == "0409")
@@ -2167,8 +2179,8 @@
                                        {
                                            tempR.enable = false;
                                        }
                                        tempR.time = Convert.ToInt32(data[12].ToString() + data[13].ToString(), 16);
                                        tempR.level = Convert.ToInt32(data[14].ToString() + data[15].ToString(), 16);
                                        tempR.time = Convert.ToInt32(data[14].ToString() + data[15].ToString() + data[12].ToString() + data[13].ToString(), 16);
                                        tempR.level = Convert.ToInt32(data[16].ToString() + data[17].ToString(), 16);
                                        panelSaveEnergyModeInfo = tempR;
                                        result = new PanelSwitchLevelResponInfo { panelSaveEnergyModeInfo = tempR };
                                        System.Console.WriteLine($"UI收到通知后的主题_command:0408_{ topic}");
ZigbeeApp/Shared/R.cs
@@ -550,6 +550,10 @@
        /// 时效性常开删除失败,继续“常开模式”请前往门锁用户界面设置
        /// </summary>
        public const int CancelLogicNormallyModeFailed2 = 309;
        /// <summary>
        /// 请输入合法的数字
        /// </summary>
        public const int IllegalNumber = 310;
        public readonly static int cancel = 5097;
        public readonly static int confrim = 5098;