黄学彪
2020-01-06 72be4f06a683de33ddd563c8447c39f7f17e5b7d
合并代码
1个文件已添加
86个文件已修改
13429 ■■■■ 已修改文件
ZigbeeApp/GateWay.Droid/Assets/Language.ini 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs 10086 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Resources/Language.ini 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Common/CommonPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Common/DeviceUI.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Common/House.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Common/Room.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Common/ZigbeeColor.cs 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/DLL/Android/Shared.Droid.dll 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/AC/ACControl.cs 299 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Account/PhoneEmailForm.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Category/Category.cs 703 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs 181 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Category/SelectFloor.cs 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Category/SelectHouse.cs 129 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Category/SelectScene.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/ACLeftIconButtonRowLayout.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/CategoryFunctionForWinRow.cs 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/CategoryFunctionRow.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceDetailInfo.cs 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceIconSelectedIMGByLocal.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/LeftIconButtonRow.cs 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/RoomView.cs 114 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/RowLayoutDeleteButton.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/RowLayoutEditButton.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs 182 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/SceneMainView.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/SceneTargetFunctionRow.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/SceneTargetTimeRow.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/SelectTime.cs 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/SelectZone.cs 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Curtain/RollerShadeControl.cs 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Light/AirSwitchControl.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Light/DimmableLightControl.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Light/OnOffControl.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Light/PlugControl.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/CustomText.cs 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/AddCondition.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/Send.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceCondition.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Room/RoomCommon.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Room/RoomManagement.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Room/UnallocatedRoom.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/GatewayBackupEnum.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameCaptionInputControl.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAirConditionerLogic.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAttributeLogic.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceCurtainLogic.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePirSensorLogic.cs 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs 141 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Curtain/AutoOpenDirectionAndLimitSettionForm.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceDryContactSettionForm.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFirmwareUpdateForm.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorBindTargetSettionForm.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UnLockMethod.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserManagement.cs 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Gateway/Update/GatewayFirmwareUpdateForm.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Suggestion/FeedbackForm.cs 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/UserMain/MessageManagementForm.cs 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserView/SafetyShortcutControl.cs 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs 271 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserView/UserPage.cs 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/ZigBee/Device/BindObj.cs 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/ZigBee/Device/TemperatureSensor.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/R.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Shared.projitems 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Assets/Language.ini
@@ -232,7 +232,7 @@
226=确认删除按键模式及{0}清空所有目标
227=清空所有目标
228=确认
229=分享成功
229=分配成功
230=确定要将该账户解冻?
548=提醒设置
550=新增用户
@@ -369,7 +369,7 @@
5097=取消
5098=确认
5098=确定
5099=提示
5100=逻辑列表
5101=无
@@ -412,7 +412,7 @@
5138=时间条件
5139=条件
5140=推送设置
5141=推送开关
5141=推送消息
5142=自定义推送
5143=日出前
5144=日出后
@@ -540,7 +540,7 @@
5266=布防
5267=请选择布防或撤防为条件
5268=请选择安防类型
5269=有人
5269=检测有人时
5270=无人
5271=开启
5272=关闭
@@ -554,7 +554,7 @@
5280=立即执行
5281=时间范围
5282=自定义房间
5283=设置周期
5283=生效时间
5284=自动化
5285=自动化名称
5286=如果
@@ -614,12 +614,13 @@
5370=请选择用户,否则无法执行下一步.
5371=请选择场景,否则无法执行下一步.
5372=请选择安防模式,否则无法执行下一步.
5373=自动化已执行.
5373=已执行.
5374=添加传感器
5375=添加开关/灯光
5376=应用
5377=没有自动化{\r\n} 请点击右上角添加
5378=推送内容不能为空.
5379=暂无门锁联动事件{\r\n} 请点击右上角添加
@@ -704,7 +705,7 @@
11001=场景
11002=自动化
11010=没有功能 {\r\n} 请在个人中心中--设备管理处添加
11010=没有功能 {\r\n} 请在个人中心--设备管理处添加
11011=编辑
11012=设置功能
11013=信息编辑
@@ -1678,7 +1679,7 @@
15920=邮箱地址
15921=请输入您的邮箱地址
15922=提交
15923=提交成功,感谢您的意见
15923=您的反馈已成功提交
15924=上传
15925=自动备份
15926=今日提交次数已上限
ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.hdl.home" android:versionCode="2019123101" android:installLocation="auto" android:versionName="1.0.19123101">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.hdl.home" android:versionCode="2020010601" android:installLocation="auto" android:versionName="1.0.20010601">
    <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="26" />
    <permission android:name="com.hdl.home.permission.JPUSH_MESSAGE" android:protectionLevel="signature" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs
Diff too large
ZigbeeApp/Home.Ios/Resources/Language.ini
@@ -232,7 +232,7 @@
226=确认删除按键模式及{0}清空所有目标
227=清空所有目标
228=确认
229=分享成功
229=分配成功
230=确定要将该账户解冻?
548=提醒设置
550=新增用户
@@ -369,7 +369,7 @@
5097=取消
5098=确认
5098=确定
5099=提示
5100=逻辑列表
5101=无
@@ -412,7 +412,7 @@
5138=时间条件
5139=条件
5140=推送设置
5141=推送开关
5141=推送消息
5142=自定义推送
5143=日出前
5144=日出后
@@ -540,7 +540,7 @@
5266=布防
5267=请选择布防或撤防为条件
5268=请选择安防类型
5269=有人
5269=检测有人时
5270=无人
5271=开启
5272=关闭
@@ -554,7 +554,7 @@
5280=立即执行
5281=时间范围
5282=自定义房间
5283=设置周期
5283=生效时间
5284=自动化
5285=自动化名称
5286=如果
@@ -614,12 +614,13 @@
5370=请选择用户,否则无法执行下一步.
5371=请选择场景,否则无法执行下一步.
5372=请选择安防模式,否则无法执行下一步.
5373=自动化已执行.
5373=已执行.
5374=添加传感器
5375=添加开关/灯光
5376=应用
5377=没有自动化{\r\n} 请点击右上角添加
5378=推送内容不能为空.
5379=暂无门锁联动事件{\r\n} 请点击右上角添加
@@ -704,7 +705,7 @@
11001=场景
11002=自动化
11010=没有功能 {\r\n} 请在个人中心中--设备管理处添加
11010=没有功能 {\r\n} 请在个人中心--设备管理处添加
11011=编辑
11012=设置功能
11013=信息编辑
@@ -1678,7 +1679,7 @@
15920=邮箱地址
15921=请输入您的邮箱地址
15922=提交
15923=提交成功,感谢您的意见
15923=您的反馈已成功提交
15924=上传
15925=自动备份
15926=今日提交次数已上限
ZigbeeApp/Shared/Common/CommonPage.cs
@@ -62,7 +62,7 @@
        /// <summary>
        /// 版本号
        /// </summary>
        public static string CodeIDString = "1.0.19123101";
        public static string CodeIDString = "1.0.20010601";
        /// <summary>
        /// 注册来源(0:HDL On 1:Zigbee)
        /// </summary>
ZigbeeApp/Shared/Common/DeviceUI.cs
@@ -532,6 +532,27 @@
                }
                return null;
            }
            else if (device.Type == DeviceType.TemperatureSensor)
            {
                var tempera = CommonDevice as TemperatureSensor;
                if(tempera.SensorDiv==1)
                {
                    if (tempera.Temperatrue == 0)
                    {
                        return "--℃";
                    }
                    return $"{tempera.Temperatrue}℃";
                }
                else if(tempera.SensorDiv==2)
                {
                    if (tempera.Humidity == 0)
                    {
                        return "--%";
                    }
                    return $"{tempera.Humidity}%";
                }
                return null;
            }
            else
            {
                return null;
ZigbeeApp/Shared/Common/House.cs
@@ -68,7 +68,7 @@
        /// </summary>
        public Dictionary<string,string> FloorDics = new Dictionary<string,string> { };
        /// <summary>
        /// 当前楼层
        /// 当前楼层Id
        /// </summary>
        public string CurrentFloorId;
ZigbeeApp/Shared/Common/Room.cs
@@ -69,7 +69,7 @@
        /// <summary>
        /// 温度传感器(设备主键)
        /// </summary>
        /// </summary>
        public string TemperatrueDevice = string.Empty;
        /// <summary>
        /// 湿度传感器(设备主键)
@@ -78,11 +78,11 @@
        /// <summary>
        /// 温度
        /// </summary>
        public double Temperatrue;
        public decimal Temperatrue;
        /// <summary>
        /// 湿度
        /// </summary>
        public double Humidity;
        public decimal Humidity;
        /// <summary>
        /// 当前选择的房间
@@ -332,7 +332,7 @@
                        room.Name = $"{room.Name}";
                    }
                    Lists.Add(room);
                }
            }
            Config.Instance.Home.InitFloor();
@@ -1233,10 +1233,10 @@
        /// <param name="addCommons">Add commons.</param>
        public async System.Threading.Tasks.Task<int> ModifyScene(SceneUI sceneUI, Scene.SceneRemoveMemberData sceneRemoveMemberData, List<Scene.AddSceneMemberData> addCommons)
        {
            if (AllRoomSceneUIList.Find(s => s.Name == sceneUI.Name) == null)
            {
                return 0;
            }
            //if (AllRoomSceneUIList.Find(s => s.Name == sceneUI.Name) == null)
            //{
            //    return 0;
            //}
            bool result = true;
            //移除成员 返回结果
@@ -1310,6 +1310,13 @@
            SceneUIList.Remove(sceneUI);
            SceneUIFilePathList.Remove(sceneUI.FileName);
            Save();
            if (IsLove == false)
            {
                if (CurrentRoom.GetLoveRoom().SceneUIList.Find((obj) => obj.Id == sceneUI.Id) != null)
                {
                    CurrentRoom.GetLoveRoom().DeleteScene(sceneUI);
                }
            }
            Global.DeleteFilebyHomeId(sceneUI.FileName);
            HdlAutoBackupLogic.DeleteFile(sceneUI.FileName);
        }
ZigbeeApp/Shared/Common/ZigbeeColor.cs
@@ -263,22 +263,47 @@
        /// </summary>
        public uint GXCSeekBarBackground = 0xFFF5F5F5;
        /// <summary>
        /// 用于空调的选中文字颜色
        /// 用于空调风速的选中文字颜色
        /// 0xFF99D619
        /// </summary>
        public uint GXCACSelectedTextColor = 0xFF99D619;
        public uint GXCACSelectedTextColor_FanModel = 0xFF99D619;
        /// <summary>
        /// 开始颜色
        /// 用于空调扫风的选中文字颜色
        /// 0xFF8162FE
        /// </summary>
        public uint GXCACSelectedTextColor2 = 0xFF8162FE;
        /// <summary>
        /// 用于空调模式的选中文字颜色
        /// 0xFF445BF9
        /// </summary>
        public uint GXCACSelectedTextColor_Cool = 0xFF445BF9;
        /// <summary>
        /// 用于空调模式的选中文字颜色
        /// 0xFFFB744A
        /// </summary>
        public uint GXCACSelectedTextColor_Heat = 0xFFFB744A;
        /// <summary>
        /// 用于空调模式的选中文字颜色
        /// 0xFFFFB400
        /// </summary>
        public uint GXCACSelectedTextColor_Dry = 0xFFFFB400;
        /// <summary>
        /// 用于空调模式的选中文字颜色
        /// 0xFF99D619
        /// </summary>
        public uint GXCACSelectedTextColor_Fan = 0xFF99D619;
        /// <summary>
        /// 开始颜色 0xFF495AF4
        /// </summary>
        public uint GXCArcScaleSeekBarStartColor = 0xFF495AF4;
        /// <summary>
        /// 结束颜色
        /// 结束颜色 0xFFAE50A8
        /// </summary>
        public uint GXCArcScaleSeekBarEndColor = 0xFFAE50A8;
        public uint GXCButtonBlueColor = 0xFF00AAF0;
        #endregion
        #region --Logic定义的颜色--
ZigbeeApp/Shared/DLL/Android/Shared.Droid.dll
Binary files differ
ZigbeeApp/Shared/Phone/Device/AC/ACControl.cs
@@ -503,7 +503,8 @@
                Gravity = Gravity.CenterHorizontal,
                Text = device.CommonDevice.DeviceEpointName,
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                TextSize = 15
                TextSize = 15,
                IsBold=true
            };
            itemView.AddChidren(deviceNameBtn);
@@ -514,7 +515,8 @@
                Height = Application.GetRealHeight(60),
                Gravity = Gravity.CenterHorizontal,
                TextColor = ZigbeeColor.Current.GXCTextGrayColor,
                Text = $"{Language.StringByID(R.MyInternationalizationString.Current)} {ac.currentLocalTemperature} ℃"
                Text = $"{Language.StringByID(R.MyInternationalizationString.Current)} {ac.currentLocalTemperature} ℃",
                TextSize=10
            };
            itemView.AddChidren(indoorTemperatureBtn);
@@ -564,7 +566,8 @@
                Width = Application.GetRealWidth(200),
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                Gravity = Gravity.CenterHorizontal,
                Text = ACControlBase.GetModeNameByModeId(ac.currentSystemMode)
                Text = ACControlBase.GetModeNameByModeId(ac.currentSystemMode),
                TextSize=12
            };
            itemView.AddChidren(currentModeBtn);
@@ -671,7 +674,8 @@
                Height = Application.GetRealHeight(50),
                Text = room.Name,
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = ZigbeeColor.Current.GXCTextWhiteColor
                TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
                TextSize=12
            };
            itemView.AddChidren(roomName);
        }
@@ -759,14 +763,14 @@
            };
            closeBGview.AddChidren(changeFanModeBG);
            var changeFanModeFL = new FrameLayout()
            var changeFanModeFL = new VerticalScrolViewLayout()
            {
                X = Application.GetRealWidth(600),
                Y = Application.GetRealHeight(750),
                Height = Application.GetRealHeight(600),
                Width = Application.GetRealWidth(fanItem_Width),
                Radius = CommonPage.BigFormRadius,
                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
                ScrollEnabled=false,
                VerticalScrollBarEnabled=false
            };
            closeBGview.AddChidren(changeFanModeFL);
@@ -777,62 +781,47 @@
                Height = Application.GetRealHeight(fanItem_Height),
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                TextID = R.MyInternationalizationString.SelectFanMode,
                TextAlignment = TextAlignment.CenterLeft
                TextAlignment = TextAlignment.CenterLeft,
                TextSize=14,
                IsBold=true
            };
            changeFanModeFL.AddChidren(changeFanBtn);
            var fan_Low = new CommonForm.ACLeftIconButtonRowLayout()
            {
                Y = changeFanBtn.Bottom,
                Width = Application.GetRealWidth(fanItem_Width),
                Height = Application.GetRealHeight(fanItem_Height),
                Tag = ZigBee.Device.AC.FanMode.Low
            };
            changeFanModeFL.AddChidren(fan_Low);
            var fan_Low = new LeftIconButtonRow();
            fan_Low.Tag = ZigBee.Device.AC.FanMode.Low;
            fan_Low.Init("AC/Fan_Low.png", "AC/Fan_LowSelected.png", Language.StringByID(R.MyInternationalizationString.Fan_Low));
            fan_Low.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor, ZigbeeColor.Current.GXCACSelectedTextColor_FanModel);
            changeFanModeFL.AddChidren(fan_Low);
            var fan_Middle = new CommonForm.ACLeftIconButtonRowLayout()
            {
                Y = fan_Low.Bottom,
                Width = Application.GetRealWidth(fanItem_Width),
                Height = Application.GetRealHeight(fanItem_Height),
                Tag = ZigBee.Device.AC.FanMode.Medium
            };
            changeFanModeFL.AddChidren(fan_Middle);
            var fan_Middle = new LeftIconButtonRow();
            fan_Middle.Tag = ZigBee.Device.AC.FanMode.Medium;
            fan_Middle.Init("AC/Fan_Middle.png", "AC/Fan_MiddleSelected.png", Language.StringByID(R.MyInternationalizationString.Fan_Middle));
            fan_Middle.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor, ZigbeeColor.Current.GXCACSelectedTextColor_FanModel);
            changeFanModeFL.AddChidren(fan_Middle);
            var fan_Height = new CommonForm.ACLeftIconButtonRowLayout()
            {
                Y = fan_Middle.Bottom,
                Width = Application.GetRealWidth(fanItem_Width),
                Height = Application.GetRealHeight(fanItem_Height),
                Tag = ZigBee.Device.AC.FanMode.High
            };
            changeFanModeFL.AddChidren(fan_Height);
            var fan_Height = new LeftIconButtonRow();
            fan_Height.Tag = ZigBee.Device.AC.FanMode.High;
            fan_Height.Init("AC/Fan_Height.png", "AC/Fan_HeightSelected.png", Language.StringByID(R.MyInternationalizationString.Fan_Height), false);
            fan_Height.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor, ZigbeeColor.Current.GXCACSelectedTextColor_FanModel);
            changeFanModeFL.AddChidren(fan_Height);
            fan_Low.TitleButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
            fan_Low.IconButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
            fan_Middle.TitleButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
            fan_Middle.IconButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
            fan_Height.TitleButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
            fan_Height.IconButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
            fan_Low.ButtonClickEvent += ChangeFan_MouseUpEvent;
            fan_Middle.ButtonClickEvent += ChangeFan_MouseUpEvent;
            fan_Height.ButtonClickEvent += ChangeFan_MouseUpEvent;
            if (ACControlBase.IsOpen(ac))
            {
                if (ac.currentFanMode == 1)
                {
                    fan_Low.SetSelectedStatu();
                    fan_Low.IsSelected=true;
                }
                else if (ac.currentFanMode == 2)
                {
                    fan_Middle.SetSelectedStatu();
                    fan_Middle.IsSelected=true;
                }
                else
                {
                    fan_Height.SetSelectedStatu();
                    fan_Height.IsSelected=true;
                }
            }
        }
@@ -844,7 +833,7 @@
        /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
        private void ChangeFan_MouseUpEvent(object sender, MouseEventArgs mouseEventArgs)
        {
            var tag = (sender as Button).Tag.ToString();
            var tag = (sender as LeftIconButtonRow).Tag.ToString();
            ZigBee.Device.AC.FanMode mode = ZigBee.Device.AC.FanMode.Low;
            if (tag == "Low")
            {
@@ -921,9 +910,8 @@
                Y = Application.GetRealHeight(450),
                Height = Application.GetRealHeight(900),
                Width = Application.GetRealWidth(modeItem_Width),
                Radius = CommonFormResouce.BigFormRadius,
                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
                //BackgroundIagePath="AC/SelectedModeBG.png"
                ScrollEnabled = false,
                VerticalScrollBarEnabled = false
            };
            closeBGview.AddChidren(changeModeFL);
@@ -934,112 +922,85 @@
                Height = Application.GetRealHeight(modeItem_Height),
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                TextID = R.MyInternationalizationString.SelectMode,
                TextAlignment = TextAlignment.CenterLeft
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = 14,
                IsBold = true
            };
            changeModeFL.AddChidren(changeModeBtn);
            var mode_Auto = new CommonForm.ACLeftIconButtonRowLayout()
            {
                Y = changeModeBtn.Bottom,
                Width = Application.GetRealWidth(modeItem_Width),
                Height = Application.GetRealHeight(modeItem_Height),
                Tag = ZigBee.Device.AC.AcMode.Auto
            };
            var mode_Auto = new LeftIconButtonRow();
            mode_Auto.Tag = ZigBee.Device.AC.AcMode.Auto;
            mode_Auto.Init("AC/Mode_Auto.png", "AC/Mode_AutoSelected.png", Language.StringByID(R.MyInternationalizationString.Mode_Auto));
            mode_Auto.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor, ZigbeeColor.Current.GXCTextBlackColor);
            if (ac.listSupportMode[4] == 1)
            {
                changeModeFL.AddChidren(mode_Auto);
            }
            mode_Auto.Init("AC/Mode_Auto.png", "AC/Mode_AutoSelected.png", Language.StringByID(R.MyInternationalizationString.Mode_Auto));
            var mode_Cool = new CommonForm.ACLeftIconButtonRowLayout()
            {
                Y = mode_Auto.Bottom,
                Width = Application.GetRealWidth(modeItem_Width),
                Height = Application.GetRealHeight(modeItem_Height),
                Tag = ZigBee.Device.AC.AcMode.Cool
            };
            var mode_Cool = new LeftIconButtonRow();
            mode_Cool.Tag = ZigBee.Device.AC.AcMode.Cool;
            mode_Cool.Init("AC/Mode_Cool.png", "AC/Mode_CoolSelected.png", Language.StringByID(R.MyInternationalizationString.Mode_Cool));
            mode_Cool.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor, ZigbeeColor.Current.GXCACSelectedTextColor_Cool);
            if (ac.listSupportMode[0] == 1)
            {
                changeModeFL.AddChidren(mode_Cool);
            }
            mode_Cool.Init("AC/Mode_Cool.png", "AC/Mode_CoolSelected.png", Language.StringByID(R.MyInternationalizationString.Mode_Cool));
            var mode_Heat = new CommonForm.ACLeftIconButtonRowLayout()
            {
                Y = mode_Cool.Bottom,
                Width = Application.GetRealWidth(modeItem_Width),
                Height = Application.GetRealHeight(modeItem_Height),
                Tag = ZigBee.Device.AC.AcMode.Heat
            };
            var mode_Heat = new LeftIconButtonRow();
            mode_Heat.Tag = ZigBee.Device.AC.AcMode.Heat;
            mode_Heat.Init("AC/Mode_Heat.png", "AC/Mode_HeatSelected.png", Language.StringByID(R.MyInternationalizationString.Mode_Heat));
            mode_Heat.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor, ZigbeeColor.Current.GXCACSelectedTextColor_Heat);
            if (ac.listSupportMode[1] == 1)
            {
                changeModeFL.AddChidren(mode_Heat);
            }
            mode_Heat.Init("AC/Mode_Heat.png", "AC/Mode_HeatSelected.png", Language.StringByID(R.MyInternationalizationString.Mode_Heat));
            var mode_Dry = new CommonForm.ACLeftIconButtonRowLayout()
            {
                Y = mode_Heat.Bottom,
                Width = Application.GetRealWidth(modeItem_Width),
                Height = Application.GetRealHeight(modeItem_Height),
                Tag = ZigBee.Device.AC.AcMode.Dry
            };
            var mode_Dry = new LeftIconButtonRow();
            mode_Dry.Tag = ZigBee.Device.AC.AcMode.Dry;
            mode_Dry.Init("AC/Mode_Dry.png", "AC/Mode_DrySelected.png", Language.StringByID(R.MyInternationalizationString.Mode_Dry));
            mode_Dry.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor, ZigbeeColor.Current.GXCACSelectedTextColor_Dry);
            if (ac.listSupportMode[3] == 1)
            {
                changeModeFL.AddChidren(mode_Dry);
            }
            mode_Dry.Init("AC/Mode_Dry.png", "AC/Mode_DrySelected.png", Language.StringByID(R.MyInternationalizationString.Mode_Dry));
            var mode_Fan = new CommonForm.ACLeftIconButtonRowLayout()
            {
                Y = mode_Dry.Bottom,
                Width = Application.GetRealWidth(modeItem_Width),
                Height = Application.GetRealHeight(modeItem_Height),
                Tag = ZigBee.Device.AC.AcMode.FanOnly
            };
            var mode_Fan = new LeftIconButtonRow();
            mode_Fan.Tag = ZigBee.Device.AC.AcMode.FanOnly;
            mode_Fan.Init("AC/Mode_Fan.png", "AC/Mode_FanSelected.png", Language.StringByID(R.MyInternationalizationString.Mode_FanOnly), false);
            mode_Fan.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor, ZigbeeColor.Current.GXCACSelectedTextColor_Fan);
            if (ac.listSupportMode[2] == 1)
            {
                changeModeFL.AddChidren(mode_Fan);
            }
            mode_Fan.Init("AC/Mode_Fan.png", "AC/Mode_FanSelected.png", Language.StringByID(R.MyInternationalizationString.Mode_FanOnly), false);
            mode_Auto.TitleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
            mode_Auto.IconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
            mode_Cool.TitleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
            mode_Cool.IconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
            mode_Heat.TitleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
            mode_Heat.IconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
            mode_Dry.TitleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
            mode_Dry.IconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
            mode_Fan.TitleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
            mode_Fan.IconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
            mode_Auto.ButtonClickEvent += ChangeMode_MouseUpEvent;
            mode_Cool.ButtonClickEvent += ChangeMode_MouseUpEvent;
            mode_Heat.ButtonClickEvent += ChangeMode_MouseUpEvent;
            mode_Dry.ButtonClickEvent += ChangeMode_MouseUpEvent;
            mode_Fan.ButtonClickEvent += ChangeMode_MouseUpEvent;
            if (ACControlBase.IsOpen(ac))
            {
                if (ac.currentSystemMode == 1)
                {
                    mode_Auto.SetSelectedStatu();
                    mode_Auto.IsSelected = true;
                }
                else if (ac.currentSystemMode == 3)
                {
                    mode_Cool.SetSelectedStatu();
                    mode_Cool.IsSelected = true;
                }
                else if (ac.currentSystemMode == 4)
                {
                    mode_Heat.SetSelectedStatu();
                    mode_Heat.IsSelected = true;
                }
                else if (ac.currentSystemMode == 8)
                {
                    mode_Dry.SetSelectedStatu();
                    mode_Dry.IsSelected = true;
                }
                else if (ac.currentSystemMode == 7)
                {
                    mode_Fan.SetSelectedStatu();
                    mode_Fan.IsSelected = true;
                }
            }
        }
@@ -1051,7 +1012,7 @@
        /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
        private void ChangeMode_MouseUpEvent(object sender, MouseEventArgs mouseEventArgs)
        {
            var tag = (sender as Button).Tag.ToString();
            var tag = (sender as LeftIconButtonRow).Tag.ToString();
            ZigBee.Device.AC.AcMode mode = ZigBee.Device.AC.AcMode.Cool;
            if (tag == "Auto")
@@ -1134,14 +1095,14 @@
            };
            closeBGview.AddChidren(changeFanModeBG);
            var changeFanModeFL = new FrameLayout()
            var changeFanModeFL = new VerticalScrolViewLayout()
            {
                X = Application.GetRealWidth(35),
                Y = Application.GetRealHeight(297),
                Height = Application.GetRealHeight(1050),
                Width = Application.GetRealWidth(fanItem_Width),
                Radius = CommonPage.BigFormRadius,
                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
                VerticalScrollBarEnabled = false,
                ScrollEnabled = false
            };
            closeBGview.AddChidren(changeFanModeFL);
@@ -1152,114 +1113,80 @@
                Height = Application.GetRealHeight(fanItem_Height),
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                TextID = R.MyInternationalizationString.SelectSwing,
                TextAlignment = TextAlignment.CenterLeft
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = 14,
                IsBold = true
            };
            changeFanModeFL.AddChidren(changeFanBtn);
            var swing_First = new CommonForm.ACLeftIconButtonRowLayout()
            {
                Y = changeFanBtn.Bottom,
                Width = Application.GetRealWidth(fanItem_Width),
                Height = Application.GetRealHeight(fanItem_Height),
                Tag = ZigBee.Device.AC.FanSwingMode.First
            };
            changeFanModeFL.AddChidren(swing_First);
            var swing_First = new LeftIconButtonRow { };
            swing_First.Tag = ZigBee.Device.AC.FanSwingMode.First;
            swing_First.Init("AC/Swing_1.png", "AC/Swing_1Selected.png", Language.StringByID(R.MyInternationalizationString.Swing_First));
            swing_First.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor, ZigbeeColor.Current.GXCACSelectedTextColor2);
            changeFanModeFL.AddChidren(swing_First);
            var swing_Second = new CommonForm.ACLeftIconButtonRowLayout()
            {
                Y = swing_First.Bottom,
                Width = Application.GetRealWidth(fanItem_Width),
                Height = Application.GetRealHeight(fanItem_Height),
                Tag = ZigBee.Device.AC.FanSwingMode.Second
            };
            changeFanModeFL.AddChidren(swing_Second);
            var swing_Second = new LeftIconButtonRow();
            swing_Second.Tag = ZigBee.Device.AC.FanSwingMode.Second;
            swing_Second.Init("AC/Swing_2.png", "AC/Swing_2Selected.png", Language.StringByID(R.MyInternationalizationString.Swing_Second));
            swing_Second.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor, ZigbeeColor.Current.GXCACSelectedTextColor2);
            changeFanModeFL.AddChidren(swing_Second);
            var swing_Thrid = new CommonForm.ACLeftIconButtonRowLayout()
            {
                Y = swing_Second.Bottom,
                Width = Application.GetRealWidth(fanItem_Width),
                Height = Application.GetRealHeight(fanItem_Height),
                Tag = ZigBee.Device.AC.FanSwingMode.Thrid
            };
            changeFanModeFL.AddChidren(swing_Thrid);
            var swing_Thrid = new LeftIconButtonRow();
            swing_Thrid.Tag = ZigBee.Device.AC.FanSwingMode.Thrid;
            swing_Thrid.Init("AC/Swing_3.png", "AC/Swing_3Selected.png", Language.StringByID(R.MyInternationalizationString.Swing_Thrid));
            swing_Thrid.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor, ZigbeeColor.Current.GXCACSelectedTextColor2);
            changeFanModeFL.AddChidren(swing_Thrid);
            var swing_Fourth = new CommonForm.ACLeftIconButtonRowLayout()
            {
                Y = swing_Thrid.Bottom,
                Width = Application.GetRealWidth(fanItem_Width),
                Height = Application.GetRealHeight(fanItem_Height),
                Tag = ZigBee.Device.AC.FanSwingMode.Fourth
            };
            changeFanModeFL.AddChidren(swing_Fourth);
            var swing_Fourth = new LeftIconButtonRow();
            swing_Fourth.Tag = ZigBee.Device.AC.FanSwingMode.Fourth;
            swing_Fourth.Init("AC/Swing_4.png", "AC/Swing_4Selected.png", Language.StringByID(R.MyInternationalizationString.Swing_Fourth));
            swing_Fourth.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor, ZigbeeColor.Current.GXCACSelectedTextColor2);
            changeFanModeFL.AddChidren(swing_Fourth);
            var swing_Fifth = new CommonForm.ACLeftIconButtonRowLayout()
            {
                Y = swing_Fourth.Bottom,
                Width = Application.GetRealWidth(fanItem_Width),
                Height = Application.GetRealHeight(fanItem_Height),
                Tag = ZigBee.Device.AC.FanSwingMode.Fifth
            };
            changeFanModeFL.AddChidren(swing_Fifth);
            var swing_Fifth = new LeftIconButtonRow();
            swing_Fifth.Tag = ZigBee.Device.AC.FanSwingMode.Fifth;
            swing_Fifth.Init("AC/Swing_5.png", "AC/Swing_5Selected.png", Language.StringByID(R.MyInternationalizationString.Swing_Fifth));
            swing_Fifth.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor, ZigbeeColor.Current.GXCACSelectedTextColor2);
            changeFanModeFL.AddChidren(swing_Fifth);
            var swing_Auto = new CommonForm.ACLeftIconButtonRowLayout()
            {
                Y = swing_Fifth.Bottom,
                Width = Application.GetRealWidth(fanItem_Width),
                Height = Application.GetRealHeight(fanItem_Height),
                Tag = ZigBee.Device.AC.FanSwingMode.Auto
            };
            var swing_Auto = new LeftIconButtonRow();
            swing_Auto.Tag = ZigBee.Device.AC.FanSwingMode.Auto;
            swing_Auto.Init("AC/Swing_Auto.png", "AC/Swing_AutoSelected.png", Language.StringByID(R.MyInternationalizationString.Swing_Auto), false);
            swing_Auto.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor, ZigbeeColor.Current.GXCACSelectedTextColor2);
            changeFanModeFL.AddChidren(swing_Auto);
            swing_Auto.Init("AC/Swing_Auto.png", "AC/Swing_AutoSelected.png", Language.StringByID(R.MyInternationalizationString.Swing_Auto),false);
            swing_First.TitleButton.MouseUpEventHandler += ChangeFanSwing_MouseUpEvent;
            swing_First.IconButton.MouseUpEventHandler += ChangeFanSwing_MouseUpEvent;
            swing_Second.TitleButton.MouseUpEventHandler += ChangeFanSwing_MouseUpEvent;
            swing_Second.IconButton.MouseUpEventHandler += ChangeFanSwing_MouseUpEvent;
            swing_Thrid.TitleButton.MouseUpEventHandler += ChangeFanSwing_MouseUpEvent;
            swing_Thrid.IconButton.MouseUpEventHandler += ChangeFanSwing_MouseUpEvent;
            swing_Fourth.TitleButton.MouseUpEventHandler += ChangeFanSwing_MouseUpEvent;
            swing_Fourth.IconButton.MouseUpEventHandler += ChangeFanSwing_MouseUpEvent;
            swing_Fifth.TitleButton.MouseUpEventHandler += ChangeFanSwing_MouseUpEvent;
            swing_Fifth.IconButton.MouseUpEventHandler += ChangeFanSwing_MouseUpEvent;
            swing_Auto.TitleButton.MouseUpEventHandler += ChangeFanSwing_MouseUpEvent;
            swing_Auto.IconButton.MouseUpEventHandler += ChangeFanSwing_MouseUpEvent;
            swing_First.ButtonClickEvent += ChangeFanSwing_MouseUpEvent;
            swing_Second.ButtonClickEvent += ChangeFanSwing_MouseUpEvent;
            swing_Thrid.ButtonClickEvent += ChangeFanSwing_MouseUpEvent;
            swing_Fourth.ButtonClickEvent += ChangeFanSwing_MouseUpEvent;
            swing_Fifth.ButtonClickEvent += ChangeFanSwing_MouseUpEvent;
            swing_Auto.ButtonClickEvent += ChangeFanSwing_MouseUpEvent;
            if (ACControlBase.IsOpen(ac))
            {
                if (ac.currentFanSwingMode == 0)
                {
                    swing_First.SetSelectedStatu();
                    swing_First.IsSelected = true;
                }
                else if (ac.currentFanSwingMode == 1)
                {
                    swing_Second.SetSelectedStatu();
                    swing_Second.IsSelected = true;
                }
                else if (ac.currentFanSwingMode == 2)
                {
                    swing_Thrid.SetSelectedStatu();
                    swing_Thrid.IsSelected = true;
                }
                else if (ac.currentFanSwingMode == 3)
                {
                    swing_Fourth.SetSelectedStatu();
                    swing_Fourth.IsSelected = true;
                }
                else if (ac.currentFanSwingMode == 4)
                {
                    swing_Fifth.SetSelectedStatu();
                    swing_Fifth.IsSelected = true;
                }
                else if (ac.currentFanSwingMode == 7)
                {
                    swing_Auto.SetSelectedStatu();
                    swing_Auto.IsSelected = true;
                }
            }
        }
@@ -1271,7 +1198,7 @@
        /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
        private void ChangeFanSwing_MouseUpEvent(object sender, MouseEventArgs mouseEventArgs)
        {
            var tag = (sender as Button).Tag.ToString();
            var tag = (sender as LeftIconButtonRow).Tag.ToString();
            ZigBee.Device.AC.FanSwingMode mode = ZigBee.Device.AC.FanSwingMode.Auto;
            if (tag == "First")
            {
@@ -1466,7 +1393,7 @@
            UserView.HomePage.Instance.AddChidren(detailInfo);
            UserView.HomePage.Instance.PageIndex += 1;
            detailInfo.Show(device, room);
            detailInfo.action = () =>
            detailInfo.EditAction = (d,r) =>
            {
                Show(device, room);
            };
ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs
@@ -174,7 +174,7 @@
            phoneEmailForm = new PhoneEmailForm();
            phoneEmailForm.Init(midFrameLayout);
            //错误提示Btn
            loginErrorBtn = new Button()
@@ -289,6 +289,11 @@
            if (string.IsNullOrEmpty(account) == false && AccountLogic.Instance.CheckEmail(account) == true)
            {
                SelectPhoneOrEmail_MouseUpEvent(phoneEmailForm.SelectedEmail, null);
                this.account = string.Empty;
            }
            else
            {
                this.account = string.Empty;
            }
        }
@@ -803,7 +808,7 @@
        private void Pwd_TextChange(object sender,string mouseEventArgs)
        {
            loginErrorBtn.Text = string.Empty;
            if (1 <= pwdRow.PasswrodET.Text.Trim().Length && pwdRow.PasswrodET.Text.Trim().Length <= 16 && (phoneRow.AccountET.Text.Trim().Length > 0 || emailRow.AccountET.Text.Trim().Length>0))
            if (1 <= pwdRow.PasswrodET.Text.Trim().Length && pwdRow.PasswrodET.Text.Trim().Length <= 16 && (phoneRow.AccountET.Text.Trim().Length > 0 || emailRow?.AccountET.Text.Trim().Length>0))
            {
                loginBtn.Enable = loginBtn.IsSelected = true;
            }
@@ -811,7 +816,7 @@
            {
                pwdRow.PasswrodET.Text = mouseEventArgs.Remove(16);
            }
            else if (pwdRow.PasswrodET.Text.Trim().Length > 16 && phoneRow.AccountET.Text.Trim().Length > 0)
            else if (pwdRow.PasswrodET.Text.Trim().Length > 16 && (phoneRow.AccountET.Text.Trim().Length > 0 || emailRow?.AccountET.Text.Trim().Length > 0))
            {
                loginBtn.Enable = loginBtn.IsSelected = true;
                pwdRow.PasswrodET.Text = mouseEventArgs.Remove(16);
ZigbeeApp/Shared/Phone/Device/Account/PhoneEmailForm.cs
@@ -272,7 +272,7 @@
            accountFL.AddChidren(accountLine);
            AccountET.FoucsChanged += Text_FoucesChangeEvent;
        }
        /// <summary>
ZigbeeApp/Shared/Phone/Device/Category/Category.cs
@@ -8,6 +8,7 @@
using Shared.Phone.Device.AC;
using Shared.Phone.UserCenter.DoorLock;
using Shared.Phone.Device.DeviceLogic;
using Shared.Phone.UserCenter;
namespace Shared.Phone.Device.Category
{
@@ -25,7 +26,7 @@
        /// <summary>
        /// low_High
        /// </summary>
        private const int low_High= 127;
        private const int low_High = 127;
        /// <summary>
        /// 功能
        /// </summary>
@@ -119,10 +120,6 @@
        /// sceneList
        /// </summary>
        private List<SceneUI> sceneList;
        /// <summary>
        /// 当前选中房间
        /// </summary>
        private Common.Room curRoom;
        #endregion
        #region ◆ 接口____________________________
@@ -262,7 +259,7 @@
                                        var attriButeList = common.DeviceStatusReport.AttriBute;
                                        var ac = deviceUI.CommonDevice as ZigBee.Device.AC;
                                        ac.DeviceStatusReport = common.DeviceStatusReport;
                                        foreach(var attList in attriButeList)
                                        foreach (var attList in attriButeList)
                                        {
                                            var curTemp = (attList.AttriButeData / 100 < ACControlBase.Temperature_High && attList.AttriButeData / 100 > ACControlBase.Temperature_Low) ? attList.AttriButeData / 100 : ACControlBase.Temperature_Default;
                                            switch (attList.AttributeId)
@@ -311,7 +308,7 @@
                                        var ac = deviceUI.CommonDevice as ZigBee.Device.AC;
                                        var attriButeList = common.DeviceStatusReport.AttriBute;
                                        ac.DeviceStatusReport = common.DeviceStatusReport;
                                        foreach(var attList in attriButeList)
                                        foreach (var attList in attriButeList)
                                        {
                                            switch (attList.AttributeId)
                                            {
@@ -363,6 +360,66 @@
                                    {
                                        deviceUI.CommonDevice.IsOnline = 1;
                                        deviceUI.CommonDevice.LastDateTime = DateTime.Now;
                                    }
                                    break;
                                case DeviceType.TemperatureSensor:
                                    //温度
                                    if (common.DeviceStatusReport.CluterID == 1026)
                                    {
                                        var tempera = deviceUI.CommonDevice as TemperatureSensor;
                                        foreach (var data in common.DeviceStatusReport.AttriBute)
                                        {
                                            if (data.AttributeId == (int)ZigBee.Device.AttriButeId.MeasuredValue)
                                            {
                                                if (data.AttriButeData == 0)
                                                {
                                                    tempera.Temperatrue = 0;
                                                }
                                                else if (data.AttriButeData > 32767)
                                                {
                                                    //负数(特殊处理)
                                                    string strValue = (data.AttriButeData - 65536).ToString();
                                                    //小数点需要一位
                                                    strValue = strValue.Substring(0, strValue.Length - 1);
                                                    tempera.Temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                                                }
                                                else
                                                {
                                                    //小数点需要一位
                                                    string strValue = data.AttriButeData.ToString();
                                                    strValue = strValue.Substring(0, strValue.Length - 1);
                                                    tempera.Temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                                                }
                                                var row = rowLayout.GetChildren(0) as CategoryFunctionRow;
                                                row.SetStatuText(deviceUI.GetDeviceStatu());
                                            }
                                        }
                                    }
                                    //湿度
                                    if (common.DeviceStatusReport.CluterID == 1029)
                                    {
                                        var tempera = deviceUI.CommonDevice as TemperatureSensor;
                                        foreach (var data in common.DeviceStatusReport.AttriBute)
                                        {
                                            if (data.AttributeId == (int)ZigBee.Device.AttriButeId.MeasuredValue)
                                            {
                                                if (data.AttriButeData == 0)
                                                {
                                                    tempera.Humidity = 0;
                                                }
                                                else
                                                {
                                                    //小数点需要一位(湿度没有负数)
                                                    string strValue = data.AttriButeData.ToString();
                                                    strValue = strValue.Substring(0, strValue.Length - 1);
                                                    tempera.Humidity = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                                                    tempera.LastDateTime = DateTime.Now;
                                                }
                                                var row = rowLayout.GetChildren(0) as CategoryFunctionRow;
                                                row.SetStatuText(deviceUI.GetDeviceStatu());
                                            }
                                        }
                                    }
                                    break;
                            }
@@ -519,7 +576,7 @@
                TextID = R.MyInternationalizationString.Category,
                TextSize = 24,
                TextColor = ZigbeeColor.Current.GXCTextDeepBlackColor,
                IsBold=true
                IsBold = true
            };
            topView.AddChidren(title);
@@ -563,7 +620,7 @@
            functionBtn.SetTitle(R.MyInternationalizationString.Function);
            functionBtn.X = sceneBtn.Right;
            //自动化
            automationBtn = new ButtonLineForm(CommonFormResouce.X_Left + 150 * 2 + 20+50, 34);
            automationBtn = new ButtonLineForm(CommonFormResouce.X_Left + 150 * 2 + 20 + 50, 34);
            automationBtn.Init();
            automationBtn.SetTitle(R.MyInternationalizationString.Automation);
            automationBtn.X = functionBtn.Right;
@@ -581,8 +638,8 @@
                Gravity = Gravity.CenterVertical,
                TextAlignment = TextAlignment.CenterRight,
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                TextSize=14,
                IsBold=true
                TextSize = 14,
                IsBold = true
            };
            selectFloorBtn = new Button()
@@ -650,7 +707,7 @@
            addBtn.MouseUpEventHandler += AddBtn_MouseUpEventHandler;
            selectFloorBtn.MouseUpEventHandler += SelectedFloor_MouseUpEventHandler;
            floorBtn.MouseUpEventHandler+= SelectedFloor_MouseUpEventHandler;
            floorBtn.MouseUpEventHandler += SelectedFloor_MouseUpEventHandler;
        }
@@ -661,13 +718,14 @@
        /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
        private void SelectedFloor_MouseUpEventHandler(object sender, MouseEventArgs mouseEventArgs)
        {
            var floors = new SelectFloor ();
            var floors = new SelectFloor();
            AddChidren(floors);
            floors.Init(580,330,Direction.Right);
            floors.Init(580, 330, Direction.Right);
            floors.changeFloor = true;
            floors.FloorAction += (floorId) =>
            {
                floorBtn.Text = Config.Instance.Home.GetFloorNameById(floorId);
                Common.Room.CurrentRoom = Common.Room.CurrentRoom.GetLoveRoom();
                RefreshBodyView();
            };
        }
@@ -751,6 +809,10 @@
            UserView.HomePage.Instance.AddChidren(scene);
            UserView.HomePage.Instance.PageIndex += 1;
            scene.Show();
            scene.AddAction = () =>
            {
                ShowScene();
            };
        }
        /// <summary>
@@ -860,10 +922,10 @@
        {
            var noFunction = new Button()
            {
                Y=Application.GetRealHeight(320),
                Width=Application.GetMinRealAverage(757),
                Y = Application.GetRealHeight(320),
                Width = Application.GetMinRealAverage(757),
                Height = Application.GetMinRealAverage(435),
                UnSelectedImagePath="Item/NoFunction.png",
                UnSelectedImagePath = "Item/NoFunction.png",
                Gravity = Gravity.CenterHorizontal
            };
            functionSceneBodyView.AddChidren(noFunction);
@@ -874,10 +936,10 @@
                Height = Application.GetRealHeight(200),
                Width = Application.GetRealWidth(700),
                Gravity = Gravity.CenterHorizontal,
                Text = Language.StringByID(R.MyInternationalizationString.NoFunction).Replace("{\\r\\n}","\r\n"),
                Text = Language.StringByID(R.MyInternationalizationString.NoFunction).Replace("{\\r\\n}", "\r\n"),
                TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
                TextAlignment = TextAlignment.Center,
                IsMoreLines=true
                IsMoreLines = true
            };
            functionSceneBodyView.AddChidren(noFunctionTip);
        }
@@ -931,7 +993,7 @@
                deviceListScrolView = new VerticalScrolViewLayout
                {
                    X = Application.GetRealWidth(CommonFormResouce.X_Left),
                    Y = Application.GetRealHeight(35+279),
                    Y = Application.GetRealHeight(35 + 279),
                    Width = Application.GetRealWidth(1028),
                    Height = Application.GetRealHeight(942),
                    BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
@@ -940,7 +1002,7 @@
                deviceListScrolView.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft);
                tempFunctionTypeBtn = new FunctionButton();
                tempFunctionTypeBtn.Init("","");
                tempFunctionTypeBtn.Init("", "");
                foreach (var deviceType in typeIdDic)
                {
@@ -996,43 +1058,14 @@
                    {
                        try
                        {
                            //删除设备
                            EventHandler<MouseEventArgs> delEvent = (delSender, delE) =>
                            var deviceTypeRowLayout = new RowLayout()
                            {
                                var alert = new CustomAlert();
                                AddChidren(alert);
                                alert.Show(Language.StringByID(R.MyInternationalizationString.DeleteFunction));
                                alert.ResultEventHandler += (e2) =>
                                {
                                    if (e2)
                                    {
                                        if(curRoom.IsLove)
                                        {
                                            Shared.Common.Room.CurrentRoom.DeleteDevice(deviceUI.FileName);
                                            deviceListScrolView.RemoveViewByTag((delSender as Button).Tag);
                                            sameTypeList.Remove(deviceUI);
                                        }
                                        else
                                        {
                                            Shared.Common.Room.CurrentRoom.DeleteDevice(deviceUI.CommonDevice);
                                            deviceListScrolView.RemoveViewByTag((delSender as Button).Tag);
                                            sameTypeList.Remove(deviceUI);
                                        }
                                        //if (sameTypeList.Count == 0)
                                        //{
                                        //    RefreshBodyView();
                                        //}
                                    }
                                };
                                Height = Application.GetRealHeight(127 + 35),
                                LineColor = ZigbeeColor.Current.GXCClearColor,
                                Tag = deviceUI,
                                SubViewWidth=Application.GetRealWidth(184)
                            };
                            EventHandler<MouseEventArgs> deviceDetailHandler = (send2, e2) =>
                            {
                                var detailInfo = new Device.CommonForm.DeviceDetailInfo { };
                                UserView.HomePage.Instance.AddChidren(detailInfo);
                                UserView.HomePage.Instance.PageIndex += 1;
                                detailInfo.Show(deviceUI, Shared.Common.Room.CurrentRoom);
                                detailInfo.action = RefreshBodyView;
                            };
                            deviceListScrolView.AddChidren(deviceTypeRowLayout);
                            if (deviceUI.CommonDevice.Type == DeviceType.OnOffOutput)
                            {
@@ -1060,19 +1093,10 @@
                                        }
                                    })
                                    { IsBackground = true }.Start();
                                    var deviceTypeRowLayout = new RowLayout()
                                    {
                                        Height = Application.GetRealHeight(129 + 35),
                                        LineColor = ZigbeeColor.Current.GXCBackgroundColor,
                                        Tag = deviceUI
                                    };
                                    deviceListScrolView.AddChidren(deviceTypeRowLayout);
                                    var deviceRow = new CategoryFunctionRow(0, 35);
                                    deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
                                    deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                                    //deviceRow.SetOnLineStatu(light.IsOnline == 1);
                                    deviceRow.SetStatuText(deviceUI.GetDeviceStatu());
                                    deviceRow.IsSelected = light.OnOffStatus == 1;
                                    deviceTypeRowLayout.AddChidren(deviceRow);
@@ -1108,7 +1132,6 @@
                                            }
                                        });
                                    };
                                    deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) =>
                                    {
                                        if (deviceUI.CommonDevice.DfunctionType == DeviceFunctionType.A开关)
@@ -1117,7 +1140,7 @@
                                            UserView.HomePage.Instance.AddChidren(lightControl);
                                            UserView.HomePage.Instance.PageIndex += 1;
                                            //lightControl.action = RefreshBodyView;
                                            lightControl.Show(deviceUI, curRoom);
                                            lightControl.Show(deviceUI, Common.Room.CurrentRoom);
                                        }
                                        else if (deviceUI.CommonDevice.DfunctionType == DeviceFunctionType.A插座)
                                        {
@@ -1125,7 +1148,7 @@
                                            UserView.HomePage.Instance.AddChidren(lightControl);
                                            UserView.HomePage.Instance.PageIndex += 1;
                                            //lightControl.action = RefreshBodyView;
                                            lightControl.Show(deviceUI, curRoom);
                                            lightControl.Show(deviceUI, Common.Room.CurrentRoom);
                                        }
                                        else
                                        {
@@ -1133,26 +1156,43 @@
                                            UserView.HomePage.Instance.AddChidren(lightControl);
                                            UserView.HomePage.Instance.PageIndex += 1;
                                            //lightControl.action = RefreshBodyView;
                                            lightControl.Show(deviceUI, curRoom);
                                            lightControl.Show(deviceUI, Common.Room.CurrentRoom);
                                        }
                                    };
                                    EventHandler<MouseEventArgs> deviceDetailHandler = (send2, e2) =>
                                    {
                                        var detailInfo = new Device.CommonForm.DeviceDetailInfo { };
                                        UserView.HomePage.Instance.AddChidren(detailInfo);
                                        UserView.HomePage.Instance.PageIndex += 1;
                                        detailInfo.Show(deviceUI, Shared.Common.Room.CurrentRoom);
                                        detailInfo.EditAction += (curDevice, curRoom) =>
                                        {
                                            if (curRoom.Id != Common.Room.CurrentRoom.Id)
                                            {
                                                Shared.Common.Room.CurrentRoom.DeleteDevice(deviceUI.FileName);
                                                deviceRow.RemoveFromParent();
                                                sameTypeList.Remove(deviceUI);
                                                if (sameTypeList.Count == 0)
                                                {
                                                    RefreshFunction(Common.Room.CurrentRoom);
                                                }
                                            }
                                            else
                                            {
                                                deviceRow.SetDeviceIcon(deviceUI.IconPath, deviceUI.OnlineIconPath);
                                                deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                                            }
                                        };
                                    };
                                    var editBtn = new CommonForm.RowLayoutEditButton()
                                    {
                                        Tag = deviceUI,
                                        Radius = 0
                                        Tag = deviceUI
                                    };
                                    var delBtn = new CommonForm.RowLayoutDeleteButton()
                                    {
                                        Tag = deviceUI,
                                        Radius = 0
                                    };
                                    if (curRoom.IsSharedRoom == false)
                                    if (Common.Room.CurrentRoom.IsSharedRoom == false)
                                    {
                                        deviceTypeRowLayout.AddRightView(editBtn);
                                        editBtn.MouseUpEventHandler += deviceDetailHandler;
                                        deviceTypeRowLayout.AddRightView(delBtn);
                                        delBtn.MouseUpEventHandler += delEvent;
                                    }
                                }
                            }
@@ -1182,22 +1222,12 @@
                                    })
                                    { IsBackground = true }.Start();
                                    var deviceTypeRowLayout = new RowLayout()
                                    {
                                        Height = Application.GetRealHeight(129 + 35),
                                        LineColor = ZigbeeColor.Current.GXCBackgroundColor,
                                        Tag = deviceUI
                                    };
                                    deviceListScrolView.AddChidren(deviceTypeRowLayout);
                                    var deviceRow = new CategoryFunctionRow(0, 35);
                                    deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
                                    deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                                    //deviceRow.SetOnLineStatu(airSwitch.IsOnline == 1);
                                    deviceRow.IsSelected = airSwitch.OnOffStatus == 1;
                                    deviceRow.SetStatuText(deviceUI.GetDeviceStatu());
                                    deviceTypeRowLayout.AddChidren(deviceRow);
                                    deviceRow.SwitchBtn.MouseUpEventHandler += (send2, e2) =>
                                    {
                                        zbGateway = deviceUI.CommonDevice.Gateway;
@@ -1229,7 +1259,6 @@
                                            }
                                        });
                                    };
                                    deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) =>
                                    {
@@ -1237,25 +1266,42 @@
                                        UserView.HomePage.Instance.AddChidren(lightControl);
                                        UserView.HomePage.Instance.PageIndex += 1;
                                        //lightControl.action = RefreshBodyView;
                                        lightControl.Show(deviceUI, curRoom);
                                        lightControl.Show(deviceUI, Common.Room.CurrentRoom);
                                    };
                                    EventHandler<MouseEventArgs> deviceDetailHandler = (send2, e2) =>
                                    {
                                        var detailInfo = new Device.CommonForm.DeviceDetailInfo { };
                                        UserView.HomePage.Instance.AddChidren(detailInfo);
                                        UserView.HomePage.Instance.PageIndex += 1;
                                        detailInfo.Show(deviceUI, Shared.Common.Room.CurrentRoom);
                                        detailInfo.EditAction += (curDevice, curRoom) =>
                                        {
                                            if (curRoom.Id != Common.Room.CurrentRoom.Id)
                                            {
                                                Shared.Common.Room.CurrentRoom.DeleteDevice(deviceUI.FileName);
                                                deviceRow.RemoveFromParent();
                                                sameTypeList.Remove(deviceUI);
                                                if (sameTypeList.Count == 0)
                                                {
                                                    RefreshFunction(Common.Room.CurrentRoom);
                                                }
                                            }
                                            else
                                            {
                                                deviceRow.SetDeviceIcon(deviceUI.IconPath, deviceUI.OnlineIconPath);
                                                deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                                            }
                                        };
                                    };
                                    var editBtn = new CommonForm.RowLayoutEditButton()
                                    {
                                        Tag = deviceUI,
                                        Radius = 0
                                        Tag = deviceUI
                                    };
                                    var delBtn = new CommonForm.RowLayoutDeleteButton()
                                    {
                                        Tag = deviceUI,
                                        Radius = 0
                                    };
                                    if (curRoom.IsSharedRoom == false)
                                    if (Common.Room.CurrentRoom.IsSharedRoom == false)
                                    {
                                        deviceTypeRowLayout.AddRightView(editBtn);
                                        editBtn.MouseUpEventHandler += deviceDetailHandler;
                                        deviceTypeRowLayout.AddRightView(delBtn);
                                        delBtn.MouseUpEventHandler += delEvent;
                                    }
                                }
                            }
@@ -1285,18 +1331,9 @@
                                    })
                                    { IsBackground = true }.Start();
                                    var deviceTypeRowLayout = new RowLayout()
                                    {
                                        Height = Application.GetRealHeight(129 + 35),
                                        LineColor = ZigbeeColor.Current.GXCBackgroundColor,
                                        Tag = deviceUI
                                    };
                                    deviceListScrolView.AddChidren(deviceTypeRowLayout);
                                    var deviceRow = new CategoryFunctionRow(0, 35);
                                    deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
                                    deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                                    //deviceRow.SetOnLineStatu(dimmableLight.IsOnline == 1);
                                    deviceRow.SetStatuText(deviceUI.GetDeviceStatu());
                                    deviceRow.IsSelected = dimmableLight.OnOffStatus == 1;
                                    deviceTypeRowLayout.AddChidren(deviceRow);
@@ -1340,25 +1377,42 @@
                                        UserView.HomePage.Instance.PageIndex += 1;
                                        UserView.HomePage.Instance.ScrollEnabled = false;
                                        //dimmableLightControl.action = RefreshBodyView;
                                        dimmableLightControl.Show(deviceUI, curRoom);
                                        dimmableLightControl.Show(deviceUI, Common.Room.CurrentRoom);
                                    };
                                    EventHandler<MouseEventArgs> deviceDetailHandler = (send2, e2) =>
                                    {
                                        var detailInfo = new Device.CommonForm.DeviceDetailInfo { };
                                        UserView.HomePage.Instance.AddChidren(detailInfo);
                                        UserView.HomePage.Instance.PageIndex += 1;
                                        detailInfo.Show(deviceUI, Shared.Common.Room.CurrentRoom);
                                        detailInfo.EditAction += (curDevice, curRoom) =>
                                        {
                                            if (curRoom.Id != Common.Room.CurrentRoom.Id)
                                            {
                                                Shared.Common.Room.CurrentRoom.DeleteDevice(deviceUI.FileName);
                                                deviceRow.RemoveFromParent();
                                                sameTypeList.Remove(deviceUI);
                                                if (sameTypeList.Count == 0)
                                                {
                                                    RefreshFunction(Common.Room.CurrentRoom);
                                                }
                                            }
                                            else
                                            {
                                                deviceRow.SetDeviceIcon(deviceUI.IconPath, deviceUI.OnlineIconPath);
                                                deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                                            }
                                        };
                                    };
                                    var editBtn = new CommonForm.RowLayoutEditButton()
                                    {
                                        Tag = deviceUI,
                                        Radius = 0
                                        Tag = deviceUI
                                    };
                                    var delBtn = new Device.CommonForm.RowLayoutDeleteButton()
                                    {
                                        Tag = deviceUI,
                                        Radius = 0
                                    };
                                    if (curRoom.IsSharedRoom == false)
                                    if (Common.Room.CurrentRoom.IsSharedRoom == false)
                                    {
                                        deviceTypeRowLayout.AddRightView(editBtn);
                                        editBtn.MouseUpEventHandler += deviceDetailHandler;
                                        deviceTypeRowLayout.AddRightView(delBtn);
                                        delBtn.MouseUpEventHandler += delEvent;
                                    }
                                }
                            }
@@ -1389,14 +1443,6 @@
                                        }
                                    })
                                    { IsBackground = true }.Start();
                                    var deviceTypeRowLayout = new RowLayout()
                                    {
                                        Height = Application.GetRealHeight(129 + 35),
                                        LineColor = ZigbeeColor.Current.GXCBackgroundColor,
                                        Tag = deviceUI
                                    };
                                    deviceListScrolView.AddChidren(deviceTypeRowLayout);
                                    var deviceRow = new CategoryFunctionRow(0, 35);
                                    deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
@@ -1438,25 +1484,6 @@
                                            }
                                        });
                                    };
                                    var editBtn = new CommonForm.RowLayoutEditButton()
                                    {
                                        Tag = deviceUI,
                                        Radius = 0
                                    };
                                    var delBtn = new CommonForm.RowLayoutDeleteButton()
                                    {
                                        Tag = deviceUI,
                                        Radius = 0
                                    };
                                    if (curRoom.IsSharedRoom == false)
                                    {
                                        deviceTypeRowLayout.AddRightView(editBtn);
                                        editBtn.MouseUpEventHandler += deviceDetailHandler;
                                        deviceTypeRowLayout.AddRightView(delBtn);
                                        delBtn.MouseUpEventHandler += delEvent;
                                    }
                                    deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) =>
                                    {
                                        var acControl = new Phone.Device.AC.ACControl();
@@ -1464,8 +1491,43 @@
                                        UserView.HomePage.Instance.PageIndex += 1;
                                        UserView.HomePage.Instance.ScrollEnabled = false;
                                        //rollerShadeControl.action = RefreshBodyView;
                                        acControl.Show(deviceUI, curRoom);
                                        acControl.Show(deviceUI, Common.Room.CurrentRoom);
                                    };
                                    EventHandler<MouseEventArgs> deviceDetailHandler = (send2, e2) =>
                                    {
                                        var detailInfo = new Device.CommonForm.DeviceDetailInfo { };
                                        UserView.HomePage.Instance.AddChidren(detailInfo);
                                        UserView.HomePage.Instance.PageIndex += 1;
                                        detailInfo.Show(deviceUI, Shared.Common.Room.CurrentRoom);
                                        detailInfo.EditAction += (curDevice, curRoom) =>
                                        {
                                            if (curRoom.Id != Common.Room.CurrentRoom.Id)
                                            {
                                                Shared.Common.Room.CurrentRoom.DeleteDevice(deviceUI.FileName);
                                                deviceRow.RemoveFromParent();
                                                sameTypeList.Remove(deviceUI);
                                                if (sameTypeList.Count == 0)
                                                {
                                                    RefreshFunction(Common.Room.CurrentRoom);
                                                }
                                            }
                                            else
                                            {
                                                deviceRow.SetDeviceIcon(deviceUI.IconPath, deviceUI.OnlineIconPath);
                                                deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                                            }
                                        };
                                    };
                                    var editBtn = new CommonForm.RowLayoutEditButton()
                                    {
                                        Tag = deviceUI
                                    };
                                    if (Common.Room.CurrentRoom.IsSharedRoom == false)
                                    {
                                        deviceTypeRowLayout.AddRightView(editBtn);
                                        editBtn.MouseUpEventHandler += deviceDetailHandler;
                                    }
                                }
                            }
                            else if (deviceUI.CommonDevice.Type == DeviceType.WindowCoveringDevice)
@@ -1495,18 +1557,9 @@
                                    })
                                    { IsBackground = true }.Start();
                                    var deviceTypeRowLayout = new RowLayout()
                                    {
                                        Height = Application.GetRealHeight(129 + 35),
                                        LineColor = ZigbeeColor.Current.GXCBackgroundColor,
                                        Tag = deviceUI
                                    };
                                    deviceListScrolView.AddChidren(deviceTypeRowLayout);
                                    var deviceRow = new CategoryFunctionForWinRow(0, 35);
                                    deviceRow.Init(deviceUI);
                                    deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                                    //deviceRow.SetOnLineStatu(rollerShade.IsOnline == 1);
                                    deviceRow.SetStatuText(deviceUI.GetDeviceStatu());
                                    deviceRow.IsSelected = rollerShade.WcdCurrentPositionLiftPercentage != 0;
                                    deviceRow.SetRollerShadeIcon(rollerShade.WcdType);
@@ -1529,24 +1582,6 @@
                                        { IsBackground = true }.Start();
                                    }
                                    var editBtn = new CommonForm.RowLayoutEditButton()
                                    {
                                        Tag = deviceUI,
                                        Radius = 0
                                    };
                                    var delBtn = new Device.CommonForm.RowLayoutDeleteButton()
                                    {
                                        Tag = deviceUI,
                                        Radius = 0
                                    };
                                    if (curRoom.IsSharedRoom == false)
                                    {
                                        deviceTypeRowLayout.AddRightView(editBtn);
                                        editBtn.MouseUpEventHandler += deviceDetailHandler;
                                        deviceTypeRowLayout.AddRightView(delBtn);
                                        delBtn.MouseUpEventHandler += delEvent;
                                    }
                                    deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) =>
                                    {
                                        var rollerShadeControl = new Phone.Device.Curtain.RollerShadeControl();
@@ -1554,62 +1589,99 @@
                                        UserView.HomePage.Instance.PageIndex += 1;
                                        UserView.HomePage.Instance.ScrollEnabled = false;
                                        //rollerShadeControl.action = RefreshBodyView;
                                        rollerShadeControl.Show(deviceUI, curRoom);
                                        rollerShadeControl.Show(deviceUI, Common.Room.CurrentRoom);
                                    };
                                    EventHandler<MouseEventArgs> deviceDetailHandler = (send2, e2) =>
                                    {
                                        var detailInfo = new Device.CommonForm.DeviceDetailInfo { };
                                        UserView.HomePage.Instance.AddChidren(detailInfo);
                                        UserView.HomePage.Instance.PageIndex += 1;
                                        detailInfo.Show(deviceUI, Shared.Common.Room.CurrentRoom);
                                        detailInfo.EditAction += (curDevice, curRoom) =>
                                        {
                                            if (curRoom.Id != Common.Room.CurrentRoom.Id)
                                            {
                                                Shared.Common.Room.CurrentRoom.DeleteDevice(deviceUI.FileName);
                                                deviceRow.RemoveFromParent();
                                                sameTypeList.Remove(deviceUI);
                                                if (sameTypeList.Count == 0)
                                                {
                                                    RefreshFunction(Common.Room.CurrentRoom);
                                                }
                                            }
                                            else
                                            {
                                                deviceRow.SetDeviceIcon(deviceUI.IconPath, deviceUI.OnlineIconPath);
                                                deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                                            }
                                        };
                                    };
                                    var editBtn = new CommonForm.RowLayoutEditButton()
                                    {
                                        Tag = deviceUI
                                    };
                                    if (Common.Room.CurrentRoom.IsSharedRoom == false)
                                    {
                                        deviceTypeRowLayout.AddRightView(editBtn);
                                        editBtn.MouseUpEventHandler += deviceDetailHandler;
                                    }
                                }
                            }
                            else if (deviceUI.CommonDevice.Type == DeviceType.DoorLock)
                            {
                                var deviceTypeRowLayout = new RowLayout()
                                {
                                    Height = Application.GetRealHeight(129 + 35),
                                    LineColor = ZigbeeColor.Current.GXCBackgroundColor,
                                    Tag = deviceUI
                                };
                                deviceListScrolView.AddChidren(deviceTypeRowLayout);
                                var deviceRow = new CategoryFunctionRow(0, 35);
                                deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
                                deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                                //deviceRow.SetOnLineStatu(deviceUI.CommonDevice.IsOnline == 1);
                                deviceRow.SetStatuText(deviceUI.GetDeviceStatu());
                                deviceRow.HideSwitchBtn(true);
                                deviceTypeRowLayout.AddChidren(deviceRow);
                                deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) =>
                                {
                                    var userDoorLockPage = new UserDoorLockPage(curRoom, deviceUI);
                                    var userDoorLockPage = new UserDoorLockPage(Common.Room.CurrentRoom, deviceUI);
                                    HomePage.Instance.AddChidren(userDoorLockPage);
                                    HomePage.Instance.PageIndex += 1;
                                    userDoorLockPage.Show();
                                };
                                EventHandler<MouseEventArgs> deviceDetailHandler = (send2, e2) =>
                                {
                                    var detailInfo = new Device.CommonForm.DeviceDetailInfo { };
                                    UserView.HomePage.Instance.AddChidren(detailInfo);
                                    UserView.HomePage.Instance.PageIndex += 1;
                                    detailInfo.Show(deviceUI, Shared.Common.Room.CurrentRoom);
                                    detailInfo.EditAction += (curDevice, curRoom) =>
                                    {
                                        if (curRoom.Id != Common.Room.CurrentRoom.Id)
                                        {
                                            Shared.Common.Room.CurrentRoom.DeleteDevice(deviceUI.FileName);
                                            deviceRow.RemoveFromParent();
                                            sameTypeList.Remove(deviceUI);
                                            if (sameTypeList.Count == 0)
                                            {
                                                RefreshFunction(Common.Room.CurrentRoom);
                                            }
                                        }
                                        else
                                        {
                                            deviceRow.SetDeviceIcon(deviceUI.IconPath, deviceUI.OnlineIconPath);
                                            deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                                        }
                                    };
                                };
                                var editBtn = new CommonForm.RowLayoutEditButton()
                                {
                                    Tag = deviceUI
                                };
                                var delBtn = new Device.CommonForm.RowLayoutDeleteButton()
                                {
                                    Tag = deviceUI
                                };
                                if (curRoom.IsSharedRoom == false)
                                if (Common.Room.CurrentRoom.IsSharedRoom == false)
                                {
                                    deviceTypeRowLayout.AddRightView(editBtn);
                                    editBtn.MouseUpEventHandler += deviceDetailHandler;
                                    deviceTypeRowLayout.AddRightView(delBtn);
                                    delBtn.MouseUpEventHandler += delEvent;
                                }
                            }
                            else if (deviceUI.CommonDevice.Type == DeviceType.IASZone)
                            {
                                var deviceTypeRowLayout = new RowLayout()
                                {
                                    Height = Application.GetRealHeight(129 + 35),
                                    LineColor = ZigbeeColor.Current.GXCBackgroundColor,
                                    Tag = deviceUI
                                };
                                deviceListScrolView.AddChidren(deviceTypeRowLayout);
                                var deviceRow = new CategoryFunctionRow(0, 35);
                                deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
                                deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
@@ -1618,61 +1690,210 @@
                                deviceRow.HideSwitchBtn(true);
                                deviceTypeRowLayout.AddChidren(deviceRow);
                                EventHandler<MouseEventArgs> deviceDetailHandler = (send2, e2) =>
                                {
                                    var detailInfo = new Device.CommonForm.DeviceDetailInfo { };
                                    UserView.HomePage.Instance.AddChidren(detailInfo);
                                    UserView.HomePage.Instance.PageIndex += 1;
                                    detailInfo.Show(deviceUI, Shared.Common.Room.CurrentRoom);
                                    detailInfo.EditAction += (curDevice, curRoom) =>
                                    {
                                        if (curRoom.Id != Common.Room.CurrentRoom.Id)
                                        {
                                            Shared.Common.Room.CurrentRoom.DeleteDevice(deviceUI.FileName);
                                            deviceRow.RemoveFromParent();
                                            sameTypeList.Remove(deviceUI);
                                            if (sameTypeList.Count == 0)
                                            {
                                                RefreshFunction(Common.Room.CurrentRoom);
                                            }
                                        }
                                        else
                                        {
                                            deviceRow.SetDeviceIcon(deviceUI.IconPath, deviceUI.OnlineIconPath);
                                            deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                                        }
                                    };
                                };
                                var editBtn = new CommonForm.RowLayoutEditButton()
                                {
                                    Tag = deviceUI
                                };
                                var delBtn = new Device.CommonForm.RowLayoutDeleteButton()
                                {
                                    Tag = deviceUI
                                };
                                if (curRoom.IsSharedRoom == false)
                                if (Common.Room.CurrentRoom.IsSharedRoom == false)
                                {
                                    deviceTypeRowLayout.AddRightView(editBtn);
                                    editBtn.MouseUpEventHandler += deviceDetailHandler;
                                    deviceTypeRowLayout.AddRightView(delBtn);
                                    delBtn.MouseUpEventHandler += delEvent;
                                }
                            }
                            else if (deviceUI.CommonDevice.Type == DeviceType.TemperatureSensor)
                            {
                                var tempera = deviceUI.CommonDevice as TemperatureSensor;
                                if (tempera.Gateway != null)
                                {
                                    new System.Threading.Thread(() =>
                                    {
                                        System.Threading.Thread.Sleep(100 * i);
                                        if (tempera.Gateway.IsVirtual)
                                        {
                                            UserHomeView.ReadStatus(tempera, () =>
                                            {
                                                if (tempera.SensorDiv == 1)
                                                {
                                                    ReadDeviceAttributeLogic.Instance.SendTemperatureStatuComand(deviceUI.CommonDevice);
                                                }
                                                else if (tempera.SensorDiv == 2)
                                                {
                                                    ReadDeviceAttributeLogic.Instance.SendHumidityStatuComand(deviceUI.CommonDevice);
                                                }
                                            });
                                        }
                                        else
                                        {
                                            if (CommonPage.ReadDeviceStatuSpan < (DateTime.Now - tempera.LastDateTime).TotalSeconds)
                                            {
                                                if (tempera.SensorDiv == 1)
                                                {
                                                    ReadDeviceAttributeLogic.Instance.SendTemperatureStatuComand(deviceUI.CommonDevice);
                                                }
                                                else if (tempera.SensorDiv == 2)
                                                {
                                                    ReadDeviceAttributeLogic.Instance.SendHumidityStatuComand(deviceUI.CommonDevice);
                                                }
                                            }
                                        }
                                    })
                                    { IsBackground = true }.Start();
                                    var deviceRow = new CategoryFunctionRow(0, 35);
                                    deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
                                    deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                                    deviceRow.SetStatuText(deviceUI.GetDeviceStatu());
                                    deviceRow.IsSelected = false;
                                    deviceRow.HideSwitchBtn(true);
                                    deviceTypeRowLayout.AddChidren(deviceRow);
                                    EventHandler<MouseEventArgs> deviceDetailHandler = (send2, e2) =>
                                    {
                                        var detailInfo = new Device.CommonForm.DeviceDetailInfo { };
                                        UserView.HomePage.Instance.AddChidren(detailInfo);
                                        UserView.HomePage.Instance.PageIndex += 1;
                                        detailInfo.Show(deviceUI, Shared.Common.Room.CurrentRoom);
                                        detailInfo.EditAction += (curDevice, curRoom) =>
                                        {
                                            if (curRoom.Id != Common.Room.CurrentRoom.Id)
                                            {
                                                Shared.Common.Room.CurrentRoom.DeleteDevice(deviceUI.FileName);
                                                deviceRow.RemoveFromParent();
                                                sameTypeList.Remove(deviceUI);
                                                if (sameTypeList.Count == 0)
                                                {
                                                    RefreshFunction(Common.Room.CurrentRoom);
                                                }
                                            }
                                            else
                                            {
                                                deviceRow.SetDeviceIcon(deviceUI.IconPath, deviceUI.OnlineIconPath);
                                                deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                                            }
                                        };
                                    };
                                    var editBtn = new CommonForm.RowLayoutEditButton()
                                    {
                                        Tag = deviceUI
                                    };
                                    if (Common.Room.CurrentRoom.IsSharedRoom == false)
                                    {
                                        deviceTypeRowLayout.AddRightView(editBtn);
                                        editBtn.MouseUpEventHandler += deviceDetailHandler;
                                    }
                                }
                            }
                            else
                            {
                                var deviceTypeRowLayout = new RowLayout()
                                {
                                    Height = Application.GetRealHeight(129 + 35),
                                    LineColor = ZigbeeColor.Current.GXCBackgroundColor,
                                    Tag = deviceUI
                                };
                                deviceListScrolView.AddChidren(deviceTypeRowLayout);
                                var deviceRow = new CategoryFunctionRow(0, 35);
                                deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
                                deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                                //deviceRow.SetOnLineStatu(deviceUI.CommonDevice.IsOnline == 1);
                                deviceRow.SetStatuText(deviceUI.GetDeviceStatu());
                                deviceRow.HideSwitchBtn(true);
                                deviceTypeRowLayout.AddChidren(deviceRow);
                                EventHandler<MouseEventArgs> deviceDetailHandler = (send2, e2) =>
                                {
                                    var detailInfo = new Device.CommonForm.DeviceDetailInfo { };
                                    UserView.HomePage.Instance.AddChidren(detailInfo);
                                    UserView.HomePage.Instance.PageIndex += 1;
                                    detailInfo.Show(deviceUI, Shared.Common.Room.CurrentRoom);
                                    detailInfo.EditAction += (curDevice, curRoom) =>
                                    {
                                        if (curRoom.Id != Common.Room.CurrentRoom.Id)
                                        {
                                            Shared.Common.Room.CurrentRoom.DeleteDevice(deviceUI.FileName);
                                            deviceRow.RemoveFromParent();
                                            sameTypeList.Remove(deviceUI);
                                            if (sameTypeList.Count == 0)
                                            {
                                                RefreshFunction(Common.Room.CurrentRoom);
                                            }
                                        }
                                        else
                                        {
                                            deviceRow.SetDeviceIcon(deviceUI.IconPath, deviceUI.OnlineIconPath);
                                            deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                                        }
                                    };
                                };
                                var editBtn = new CommonForm.RowLayoutEditButton()
                                {
                                    Tag = deviceUI
                                };
                                var delBtn = new Device.CommonForm.RowLayoutDeleteButton()
                                {
                                    Tag = deviceUI
                                };
                                if (curRoom.IsSharedRoom == false)
                                if (Common.Room.CurrentRoom.IsSharedRoom == false)
                                {
                                    deviceTypeRowLayout.AddRightView(editBtn);
                                    editBtn.MouseUpEventHandler += deviceDetailHandler;
                                    deviceTypeRowLayout.AddRightView(delBtn);
                                    delBtn.MouseUpEventHandler += delEvent;
                                }
                            }
                        }
                        catch
                        {
                            //删除设备
                            EventHandler<MouseEventArgs> delEvent = (delSender, delE) =>
                            {
                                var alert = new UserCenter.ShowMsgControl(ShowMsgType.Confirm, Language.StringByID(R.MyInternationalizationString.DeleteFunction));
                                alert.Show();
                                alert.ConfirmClickEvent += () =>
                                {
                                    if (Common.Room.CurrentRoom.IsLove)
                                    {
                                        Shared.Common.Room.CurrentRoom.DeleteDevice(deviceUI.FileName);
                                        deviceListScrolView.RemoveViewByTag((delSender as Button).Tag);
                                        sameTypeList.Remove(deviceUI);
                                    }
                                    else
                                    {
                                        Shared.Common.Room.CurrentRoom.DeleteDevice(deviceUI.CommonDevice);
                                        deviceListScrolView.RemoveViewByTag((delSender as Button).Tag);
                                        sameTypeList.Remove(deviceUI);
                                        if (Common.Room.CurrentRoom.GetLoveRoom().DeviceUIList.Find((obj) => obj.FileName == deviceUI.FileName) != null)
                                        {
                                            Common.Room.CurrentRoom.DeleteDevice(deviceUI.FileName);
                                        }
                                    }
                                    if (sameTypeList.Count == 0)
                                    {
                                        RefreshBodyView();
                                    }
                                };
                            };
                            var delBtn = new CommonForm.RowLayoutDeleteButton()
                            {
                                Tag = deviceUI
                            };
                            if (Common.Room.CurrentRoom.IsSharedRoom == false)
                            {
                                deviceTypeRowLayout.AddRightView(delBtn);
                                delBtn.MouseUpEventHandler += delEvent;
                            }
                        }
                        catch { }
                    });
                })
                { IsBackground = true }.Start();
@@ -1697,12 +1918,12 @@
            functionSceneBodyView = new FrameLayout()
            {
                Y = roomFL.Bottom,
                Height = Application.GetRealHeight(973+279),
                Height = Application.GetRealHeight(973 + 279),
                BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor
            };
            functionSceneAutoBodyView.AddChidren(functionSceneBodyView);
            RoomButton curBtn = new RoomButton(0,0);
            RoomButton curBtn = new RoomButton(0, 0);
            foreach (var room in Common.Room.CurrentRoom.GetRoomsByCurrentFloorIdAppendLoveRoom())
            {
                var row = new FrameLayout()
@@ -1718,12 +1939,11 @@
                roomBtn.SetTitle(room.Name);
                row.AddChidren(roomBtn);
                if (room.IsLove)
                if (room.Id == Common.Room.CurrentRoom.Id)
                {
                    roomBtn.IsSelected = true;
                    this.curRoom = room;
                    curBtn = roomBtn;
                    if(sceneBtn.IsSelected)
                    if (sceneBtn.IsSelected)
                    {
                        RefreshScene(room);
                    }
@@ -1732,16 +1952,17 @@
                        RefreshFunction(room);
                    }
                }
                roomBtn.ButtonClickEvent += (sender, e) =>
                {
                    if (sender  == curBtn)
                    if (sender == curBtn)
                    {
                        return;
                    }
                    sender.IsSelected = true;
                    curBtn.IsSelected = false;
                    curBtn = sender;
                    this.curRoom = room;
                    Common.Room.CurrentRoom = room;
                    if (sceneBtn.IsSelected)
                    {
                        RefreshScene(room);
@@ -1812,7 +2033,7 @@
                Height = Application.GetRealHeight(200),
                Width = Application.GetRealWidth(700),
                Gravity = Gravity.CenterHorizontal,
                Text = Language.StringByID(R.MyInternationalizationString.NoScene).Replace("{\\r\\n}","\r\n"),
                Text = Language.StringByID(R.MyInternationalizationString.NoScene).Replace("{\\r\\n}", "\r\n"),
                TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
                TextAlignment = TextAlignment.Center,
                IsMoreLines = true
@@ -1847,7 +2068,7 @@
                    if (delayScenesListResponseInfo.ScenesId == sceneView.scene.Id)
                    {
                        sceneView.scene.RemainTime = delayScenesListResponseInfo.RemainTime;
                        var remainTime= delayScenesListResponseInfo.RemainTime;
                        var remainTime = delayScenesListResponseInfo.RemainTime;
                        if (remainTime > 0)
                        {
                            new System.Threading.Thread(() =>
@@ -2023,7 +2244,8 @@
                            Common.Logic.CurrentLogic.IsEnable = 1;//默认为开
                            if (logiciocnBtn.Tag.ToString() == "3")
                            {
                                Common.Logic.CurrentLogic.LogicName = logicnameBtn.Text;// Language.StringByID(MyInternationalizationString.automation1);
                                Common.Logic.CurrentLogic.LogicName = logicnameBtn.Text;
                                Common.Logic.CurrentLogic.LogicCustomPushText = Common.Logic.CurrentLogic.LogicName + Language.StringByID(MyInternationalizationString.defaulttext);
                                var addLogicPage = new Logic.AddLogicPage();
                                HomePage.Instance.AddChidren(addLogicPage);
                                HomePage.Instance.PageIndex += 1;
@@ -2033,6 +2255,7 @@
                            {
                                Common.Logic.CurrentLogic.LogicName = logicnameBtn.Text;
                                Common.Logic.CurrentLogic.LogicCustomPushText = Common.Logic.CurrentLogic.LogicName + Language.StringByID(MyInternationalizationString.defaulttext);
                                Logic.TemplatePage templatePage = new Logic.TemplatePage();
                                Logic.TemplatePage.s = logiciocnBtn.Tag.ToString();
                                HomePage.Instance.AddChidren(templatePage);
ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs
@@ -4,6 +4,7 @@
using Shared.Common;
using Shared.Phone.Device.CommonForm;
using Shared.Phone.Device.Room;
using Shared.Phone.UserCenter;
using static ZigBee.Device.Scene;
namespace Shared.Phone.Device.Category
@@ -50,7 +51,7 @@
        /// <summary>
        /// 添加目标后的展示列表
        /// </summary>
        public VerticalScrolViewLayout TargetListScrolView;
        public FrameLayout TargetListScrolView;
        /// <summary>
        /// The confirm button.
        /// </summary>
@@ -90,9 +91,15 @@
        /// <summary>
        /// selectedTimeAction
        /// </summary>
        public Action<SceneTargetDeviceUI> selectedAction;
        private Action<SceneTargetDeviceUI> selectedAction;
        /// <summary>
        /// 修改场景action
        /// </summary>
        public Action<SceneUI, Common.Room> EditorAction;
        /// <summary>
        /// 添加场景action
        /// </summary>
        public Action AddAction;
        #endregion
@@ -108,7 +115,7 @@
        /// </summary>
        public override void RemoveFromParent()
        {
            Category.instance?.RefreshBodyView();
            UserView.HomePage.Instance.ScrollEnabled = true;
            base.RemoveFromParent();
        }
        /// <summary>
@@ -116,17 +123,34 @@
        /// </summary>
        public void RefreshTargetListView()
        {
            UserView.HomePage.Instance.ScrollEnabled = false;
            TargetListScrolView.RemoveAll();
            TargetListScrolView.Height = Application.GetRealHeight(173);
            var TargetListScrolBackView = new FrameLayout()
            {
                Height = Application.GetRealHeight(173),
                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
            };
            TargetListScrolView.AddChidren(TargetListScrolBackView);
            if (sceneTargetDevicesList.Count > 0)
            {
                foreach (var targetDevice in sceneTargetDevicesList)
                if (sceneTargetDevicesList.Count > 1)
                {
                    TargetListScrolView.Height = Application.GetRealHeight(140 * sceneTargetDevicesList.Count) + Application.GetRealHeight(200);
                    TargetListScrolBackView.Height = Application.GetRealHeight(140 * sceneTargetDevicesList.Count + 13);
                }
                for (int i = 0; i < sceneTargetDevicesList.Count; i++)
                {
                    var targetDevice = sceneTargetDevicesList[i];
                    var targetRowLayout = new RowLayout()
                    {
                        Height = Application.GetRealHeight(160),
                        LineColor = ZigbeeColor.Current.GXCBackgroundColor,
                        BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
                        Y = Application.GetRealHeight(i * 140),
                        Height = Application.GetRealHeight(140),
                        LineColor = ZigbeeColor.Current.GXCClearColor,
                        BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
                        SubViewWidth = Application.GetRealWidth(184)
                    };
                    TargetListScrolView.AddChidren(targetRowLayout);
                    string devImgPath = string.Empty;
@@ -137,51 +161,53 @@
                        devImgPath = targetDevice.DeviceUI.IconPath;
                        devNameText = targetDevice.DeviceUI.CommonDevice.DeviceEpointName;
                        var targetRow = new SceneTargetFunctionRow(23);
                        targetRowLayout.AddChidren(targetRow);
                        var targetRow = new SceneTargetFunctionRow(13);
                        targetRow.Init();
                        targetRow.SetIcon(devImgPath);
                        targetRow.SetNameText(devNameText);
                        targetRow.SetZoneText(targetDevice.DeviceUI.GetZone());
                        targetRow.SetStatuText(targetDevice.GetDeviceStatu());
                        targetRowLayout.AddChidren(targetRow);
                        if (i == sceneTargetDevicesList.Count - 1)
                        {
                            targetRow.HideLine(true);
                        }
                    }
                    else if (targetDevice.Type == 2)
                    {
                        devNameText = CommonFormResouce.GetTimeString(targetDevice.DelayTime);
                        devNameText += Language.StringByID(R.MyInternationalizationString.Later);
                        var targetRow = new SceneTargetTimeRow(23);
                        targetRowLayout.AddChidren(targetRow);
                        var targetRow = new SceneTargetTimeRow(13);
                        targetRow.Init();
                        targetRow.SetTitle(devNameText);
                        targetRowLayout.AddChidren(targetRow);
                        if (i == sceneTargetDevicesList.Count - 1)
                        {
                            targetRow.HideLine(true);
                        }
                    }
                    else if (targetDevice.Type == 1)
                    {
                        devImgPath = "Scene/SceneIcon.png";
                        devNameText = targetDevice.SceneName;
                        var targetRow = new SceneTargetFunctionRow(23);
                        targetRowLayout.AddChidren(targetRow);
                        var targetRow = new SceneTargetFunctionRow(13);
                        targetRow.Init();
                        targetRow.SetIcon(devImgPath);
                        targetRow.SetNameText(devNameText);
                        targetRow.SetZoneText(targetDevice.SceneUI.GetZone());
                        targetRowLayout.AddChidren(targetRow);
                        if (i == sceneTargetDevicesList.Count - 1)
                        {
                            targetRow.HideLine(true);
                        }
                    }
                    var editBtn = new Button()
                    {
                        BackgroundColor = ZigbeeColor.Current.GXCEditBackGroundColor,
                        TextID = R.MyInternationalizationString.Edit,
                        TextColor = ZigbeeColor.Current.GXCTextWhiteColor
                    };
                    var editBtn = new RowLayoutEditButton();
                    targetRowLayout.AddRightView(editBtn);
                    //编辑设备
                    editBtn.MouseUpEventHandler += detailMouseUpEventHandler;
                    var delBtn = new Button()
                    {
                        BackgroundColor = ZigbeeColor.Current.GXCRedColor,
                        TextID = R.MyInternationalizationString.Delete,
                        TextColor = ZigbeeColor.Current.GXCTextWhiteColor
                    };
                    var delBtn = new RowLayoutDeleteButton();
                    targetRowLayout.AddRightView(delBtn);
                    //删除设备
                    delBtn.MouseUpEventHandler += (sender, e) =>
@@ -254,17 +280,6 @@
                        }
                    }
                }
                if (sceneTargetDevicesList.Count > 1)
                {
                    var targetRowLayout = new RowLayout()
                    {
                        Height = Application.GetRealHeight(300),
                        LineColor = ZigbeeColor.Current.GXCBackgroundColor,
                        BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
                    };
                    TargetListScrolView.AddChidren(targetRowLayout);
                }
            }
        }
        /// <summary>
@@ -317,13 +332,20 @@
        /// </summary>
        private void AddBodyView()
        {
            bodyFrameLayout = new FrameLayout()
            var bodyScrolView=new VerticalScrolViewLayout()
            {
                Y = Application.GetRealHeight(184),
                Height = Application.GetRealHeight(1737),
                BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor,
            };
            AddChidren(bodyFrameLayout);
            AddChidren(bodyScrolView);
            bodyFrameLayout = new FrameLayout()
            {
                Height = Application.GetRealHeight(1086+127),
                BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor,
            };
            bodyScrolView.AddChidren(bodyFrameLayout);
            var imgFL = new FrameLayout
            {
@@ -345,8 +367,8 @@
            var infoFL = new FrameLayout
            {
                Y = imgFL.Bottom + Application.GetRealHeight(23),
                Height = Application.GetRealHeight(418),
                Y = Application.GetRealHeight(588),
                Height = Application.GetRealHeight(429),
                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
            };
            bodyFrameLayout.AddChidren(infoFL);
@@ -360,7 +382,7 @@
                TextColor = ZigbeeColor.Current.GXCTextDeepBlackColor,
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = 15,
                IsBold=true
                //IsBold=true
            };
            infoFL.AddChidren(infoEdit);
@@ -380,8 +402,8 @@
            var targetFL = new FrameLayout()
            {
                Y = infoFL.Bottom + Application.GetRealHeight(23),
                Height = Application.GetRealHeight(730)
                Y = Application.GetRealHeight(1040),
                Height = Application.GetRealHeight(346)
            };
            bodyFrameLayout.AddChidren(targetFL);
@@ -430,12 +452,13 @@
            };
            addTargetFL.AddChidren(targetLine);
            TargetListScrolView = new VerticalScrolViewLayout()
            TargetListScrolView = new FrameLayout()
            {
                Y = Application.GetRealHeight(49+127),
                Height = Application.GetRealHeight(730-127-49),
                Height = Application.GetRealHeight(173)
            };
            targetFL.AddChidren(TargetListScrolView);
            bodyScrolView.AddChidren(TargetListScrolView);
            confirmBtn = new CommonForm.CompleteButton(1656, 907, 127);
            confirmBtn.TextID = R.MyInternationalizationString.Next;
@@ -577,7 +600,7 @@
                {
                    selectFL.RemoveFromParent();
                    var tradeTime = DateTime.Now.ToString("yyyyMMddHHmmss", DateTimeFormatInfo.InvariantInfo);
                    var fileName = $"SceneIcon_{tradeTime}";
                    var fileName = $"SceneIcon_{tradeTime}.png";
                    //通过相机拍照裁剪
                    CropImage.TakePicture((imagePath) =>
                    {
@@ -586,6 +609,7 @@
                            if (IconPathType != 0)
                            {
                                Global.DeleteFilebyHomeId(backGround.ImagePath);
                                HdlAutoBackupLogic.DeleteFile(backGround.ImagePath);
                            }
                        }
@@ -601,7 +625,7 @@
                {
                    selectFL.RemoveFromParent();
                    var tradeTime = DateTime.Now.ToString("yyyyMMddHHmmss", DateTimeFormatInfo.InvariantInfo);
                    var fileName = $"SceneIcon_{tradeTime}";
                    var fileName = $"SceneIcon_{tradeTime}.png";
                    //从相册选择图片裁剪
                    CropImage.SelectPicture((imagePath) =>
                    {
@@ -610,6 +634,7 @@
                            if (IconPathType != 0)
                            {
                                Global.DeleteFilebyHomeId(backGround.ImagePath);
                                HdlAutoBackupLogic.DeleteFile(backGround.ImagePath);
                            }
                        }
@@ -851,7 +876,7 @@
                }
                if (curRoom.IsSharedRoom)
                {
                    RemoveFromParent();
                    RoomCommon.ShowTipRoomIsShared();
                    return;
                }
@@ -859,19 +884,15 @@
                {
                    if (string.IsNullOrEmpty(nameRow.NameText.Text))
                    {
                        var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.SceneNameCannotBeNull), Language.StringByID(R.MyInternationalizationString.Close));
                        alert.Show();
                        alert.ResultEventHandler += (sendAlert, eAlert) =>
                        {
                            return;
                        };
                        CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.SceneNameCannotBeNull));
                        return;
                    }
                    else
                    {
                        try
                        {
                            var tradeTime = DateTime.Now.ToString("yyyyMMddHHmmss", DateTimeFormatInfo.InvariantInfo);
                            var fileName = $"SceneIcon_{tradeTime}";
                            var fileName = $"SceneIcon_{tradeTime}.png";
                            if (modifySceneUI.Name != nameRow.NameText.Text.Trim())
                            {
                                if (Common.Room.CurrentRoom.GetSameFloorScenes(curRoom.FloorId).Find(s => s.Name == nameRow.NameText.Text.Trim()) != null)
@@ -898,10 +919,13 @@
                            if (OldIconPathType != 0)
                            {
                                Shared.IO.FileUtils.DeleteFile(System.IO.Path.Combine(Config.Instance.FullPath, OldBackgroundImagePath));
                                HdlAutoBackupLogic.DeleteFile(System.IO.Path.Combine(Config.Instance.FullPath, OldBackgroundImagePath));
                            }
                            if (IconPathType == 1 || IconPathType == 2)
                            {
                                Shared.IO.FileUtils.WriteFileByBytes(System.IO.Path.Combine(Config.Instance.FullPath, fileName), backGround.ImageBytes);
                                HdlAutoBackupLogic.AddOrEditorFile(System.IO.Path.Combine(Config.Instance.FullPath, fileName));
                                modifySceneUI.IconPath = fileName;
                            }
                            else
@@ -930,7 +954,7 @@
                                        Epoint = sceneTarget.DeviceUI.CommonDevice.DeviceEpoint,
                                        TaskList = sceneTarget.TaskList,
                                        DelayTime = 0,
                                        MemberNumber = i+1
                                        MemberNumber = i + 1
                                    };
                                    memberDataList.Add(memberData);
                                }
@@ -942,7 +966,7 @@
                                        ScenesId = 0,
                                        ElseScenesId = sceneTarget.ElseScenesId,
                                        DelayTime = 0,
                                        MemberNumber = i+1
                                        MemberNumber = i + 1
                                    };
                                    memberDataList.Add(memberData);
                                }
@@ -953,7 +977,7 @@
                                        Type = 2,
                                        ScenesId = 0,
                                        DelayTime = sceneTarget.DelayTime,
                                        MemberNumber = i+1
                                        MemberNumber = i + 1
                                    };
                                    memberDataList.Add(memberData);
                                }
@@ -994,8 +1018,8 @@
                                    var removeDevice = new ZigBee.Device.Scene.RemoveSceneDeviceListInfo
                                    {
                                        Type = 2,
                                        DelayTime=sceneTarget.DelayTime,
                                        MemberNumber=sceneTarget.DelayTimeSerialNumber
                                        DelayTime = sceneTarget.DelayTime,
                                        MemberNumber = sceneTarget.DelayTimeSerialNumber
                                    };
                                    removeSceneDeviceListInfoList.Add(removeDevice);
                                }
@@ -1014,15 +1038,16 @@
                                    modifyRoom.Save();
                                    curRoom.Save();
                                }
                                EditorAction?.Invoke(modifySceneUI, curRoom);
                                RemoveFromParent();
                            }
                            else if (result == 0)
                            {
                                Common.CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.FailedPleaseTryAgain);
                                CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.FailedPleaseTryAgain));
                            }
                            else if (result == -1)
                            {
                                Common.CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.TheSceneHadExist);
                                CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.TheSceneHadExist));
                            }
                        }
                        catch (Exception ex)
@@ -1040,12 +1065,8 @@
                    //新增
                    if (string.IsNullOrEmpty(nameRow.NameText.Text))
                    {
                        var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.SceneNameCannotBeNull), Language.StringByID(R.MyInternationalizationString.Close));
                        alert.Show();
                        alert.ResultEventHandler += (sendAlert, eAlert) =>
                        {
                            return;
                        };
                        CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.SceneNameCannotBeNull));
                        return;
                    }
                    else
                    {
@@ -1063,11 +1084,11 @@
                            {
                                imgPath = backGround.ImagePath;
                            }
                            if (Common.Room.CurrentRoom.GetSameFloorScenes(curRoom.FloorId).Find(s => s.Name == nameRow.NameText.Text.Trim()) != null)
                            {
                                Common.CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.TheSceneHadExist);
                                return;
                            }
                            //if (Common.Room.CurrentRoom.GetSameFloorScenes(curRoom.FloorId).Find(s => s.Name == nameRow.NameText.Text.Trim()) != null)
                            //{
                            //    CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.TheSceneHadExist));
                            //    return;
                            //}
                            CommonPage.Loading.Start();
                            var memberDataList = new List<ZigBee.Device.Scene.AddSceneMemberData>();
                            for (int i = 0; i < sceneTargetDevicesList.Count; i++)
@@ -1120,15 +1141,16 @@
                            var result = await curRoom.AddScene(nameRow.NameText.Text, imgPath, memberDataList);
                            if (result == 1)
                            {
                                AddAction?.Invoke();
                                RemoveFromParent();
                            }
                            else if (result == 0)
                            {
                                CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.AddSceneFail);
                                CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.AddSceneFail));
                            }
                            else if (result == -1)
                            {
                                CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.TheSceneHadExist);
                                CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.TheSceneHadExist));
                            }
                        }
                        catch (Exception ex)
@@ -1139,7 +1161,6 @@
                        {
                            CommonPage.Loading.Hide();
                        }
                    }
                }
ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs
@@ -31,6 +31,10 @@
        /// </summary>
        private Button floorBtn;
        /// <summary>
        /// 当前楼层id
        /// </summary>
        private string curFloorId;
        /// <summary>
        /// 选择楼层
        /// </summary>
        private Button selectFloorBtn;
@@ -226,9 +230,12 @@
        {
            var floors = new SelectFloor();
            AddChidren(floors);
            floors.changeFloor = false;
            floors.CurFloorId = curFloorId;
            floors.Init(580, 184, Direction.Right);
            floors.FloorAction += (floorId) =>
            {
                curFloorId = floorId;
                floorBtn.Text = Config.Instance.Home.GetFloorNameById(floorId);
                RefreshBodyView(floorId);
            };
@@ -426,7 +433,7 @@
            var sameTypeList = new List<DeviceUI> { };
            sameTypeList = typeDeviceDic[int.Parse((typeSender as Button).Tag.ToString())];
            foreach (var device in sameTypeList)
            {
                if (beforeSceneTargetDeviceUIs.Find((obj) => obj.DeviceUI.DeviceEpoint == device.DeviceEpoint && obj.DeviceUI.DeviceAddr == device.DeviceAddr) != null)
ZigbeeApp/Shared/Phone/Device/Category/SelectFloor.cs
@@ -8,23 +8,35 @@
    {
        public Action<string> FloorAction;
        /// <summary>
        /// 是否切换为当前楼层
        /// </summary>
        public bool changeFloor = true;
        /// <summary>
        /// 当前传过来的floorid
        /// </summary>
        public string CurFloorId = string.Empty;
        public bool changeFloor;
        Dialog dialogBackground;
        /// <summary>
        /// Init
        /// </summary>
        public void Init(int x,int y,CommonForm.Direction direction=CommonForm.Direction.Left)
        {
            var dialog = new FrameLayout()
            dialogBackground = new Dialog
            {
                BackgroundColor = ZigbeeColor.Current.GXCDailogBackGroundColor
            };
            AddChidren(dialog);
            dialogBackground.Show();
            var dialog = new FrameLayout()
            {
            };
            dialogBackground.AddChidren(dialog);
            dialog.MouseUpEventHandler += (sender, e) =>
            {
                RemoveFromParent();
                RemoveView();
            };
            var bg = new Button
@@ -91,12 +103,23 @@
            frow.Tag = floor.Key;
            frow.Init("Floor/Floor.png", "Floor/FloorSelected.png", floor.Value);
            verticalScrolView.AddChidren(frow);
            if (Config.Instance.Home.CurrentFloorId == floor.Key)
            if(string.IsNullOrEmpty(CurFloorId))
            {
                frow.IsSelected = true;
                if (Config.Instance.Home.CurrentFloorId == floor.Key)
                {
                    frow.IsSelected = true;
                }
            }
            else
            {
                if (CurFloorId == floor.Key)
                {
                    frow.IsSelected = true;
                }
            }
            frow.ClickBtn.MouseUpEventHandler += SelectFloor_MouseUpEvent;
            frow.ButtonClickEvent += SelectFloor_MouseUpEvent;
        }
        /// <summary>
@@ -106,15 +129,24 @@
        /// <param name="mouseEventArgs"></param>
        private void SelectFloor_MouseUpEvent(object sender,MouseEventArgs mouseEventArgs)
        {
            ((sender as Button).Parent as CommonForm.LeftIconButtonRow).IsSelected = true;
            (sender as CommonForm.LeftIconButtonRow).IsSelected = true;
            if(changeFloor)
            {
                Config.Instance.Home.CurrentFloorId = (sender as Button).Tag.ToString();
                Config.Instance.Home.CurrentFloorId = (sender as CommonForm.LeftIconButtonRow).Tag.ToString();
                Config.Instance.Home.Save();
                Common.Room.RefreshRoomListView();
            }
            FloorAction?.Invoke((sender as Button).Tag.ToString());
            RemoveView();
            FloorAction?.Invoke((sender as CommonForm.LeftIconButtonRow).Tag.ToString());
        }
        /// <summary>
        /// RemoveView
        /// </summary>
        private void RemoveView()
        {
            dialogBackground.Close();
            RemoveFromParent();
        }
    }
ZigbeeApp/Shared/Phone/Device/Category/SelectHouse.cs
New file
@@ -0,0 +1,129 @@
using System;
using System.Collections.Generic;
using Shared.Common;
namespace Shared.Phone.Device.Category
{
    public class SelectHouse : FrameLayout
    {
        public Action<string> HouseAction;
        Dialog dialogBackground;
        /// <summary>
        /// Init
        /// </summary>
        public void Init()
        {
            dialogBackground = new Dialog
            {
                BackgroundColor = ZigbeeColor.Current.GXCDailogBackGroundColor
            };
            dialogBackground.Show();
            var dialog = new FrameLayout()
            {
            };
            dialogBackground.AddChidren(dialog);
            dialog.MouseUpEventHandler += (sender, e) =>
            {
                RemoveView();
            };
            var bg = new Button
            {
                X = Application.GetRealWidth(35),
                Y = Application.GetRealHeight(256),
                Width = Application.GetMinRealAverage(449),
                Height = Application.GetMinRealAverage(475),
                UnSelectedImagePath = "Item/SelectHouse.png"
            };
            dialog.AddChidren(bg);
            var changeHomeFL = new FrameLayout()
            {
                X = Application.GetRealWidth(35),
                Y = Application.GetRealHeight(256),
                Height = Application.GetMinRealAverage(449),
                Width = Application.GetMinRealAverage(475),
                Radius = CommonPage.BigFormRadius,
                //BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
            };
            dialog.AddChidren(changeHomeFL);
            var changeHomeBtn = new Button()
            {
                X = Application.GetRealWidth(80),
                Y=Application.GetRealHeight(20),
                Width = Application.GetRealWidth(350),
                Height = Application.GetMinRealAverage(150),
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                TextID = R.MyInternationalizationString.ChangeHome,
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = 14,
                IsBold = true
            };
            changeHomeFL.AddChidren(changeHomeBtn);
            var scrolView = new VerticalScrolViewLayout()
            {
                Y = changeHomeBtn.Bottom,
                Height = Application.GetMinRealAverage(300),
                VerticalScrollBarEnabled = false
            };
            changeHomeFL.AddChidren(scrolView);
            if (Config.Instance.HomeFilePathList.Count > 0)
            {
                foreach (var housePath in Config.Instance.HomeFilePathList)
                {
                    var home = House.GetHouseByFilePath(housePath);
                    if (home == null)
                    {
                        continue;
                    }
                    AddFloor(scrolView, home);
                }
            }
        }
        /// <summary>
        /// AddFloor
        /// </summary>
        /// <param name="verticalScrolView"></param>
        private void AddFloor(VerticalScrolViewLayout verticalScrolView, House house)
        {
            var frow = new CommonForm.LeftIconButtonRow(449, 150);
            frow.Tag = house.FileName;
            frow.Init("Item/House.png", "Item/HouseSelected.png", house.Name);
            verticalScrolView.AddChidren(frow);
            if (Config.Instance.HomeId == house.Id)
            {
                frow.IsSelected = true;
            }
            frow.ButtonClickEvent += SelectFloor_MouseUpEvent;
        }
        /// <summary>
        /// SelectFloor_MouseUpEvent
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="mouseEventArgs"></param>
        private void SelectFloor_MouseUpEvent(object sender, MouseEventArgs mouseEventArgs)
        {
            (sender as CommonForm.LeftIconButtonRow).IsSelected = true;
            var home = House.GetHouseByFilePath((sender as CommonForm.LeftIconButtonRow).Tag.ToString());
            RemoveView();
            HouseAction?.Invoke(home.Id);
        }
        /// <summary>
        /// RemoveView
        /// </summary>
        private void RemoveView()
        {
            dialogBackground.Close();
            RemoveFromParent();
        }
    }
}
ZigbeeApp/Shared/Phone/Device/Category/SelectScene.cs
@@ -29,6 +29,10 @@
        /// </summary>
        private Button floorBtn;
        /// <summary>
        /// 当前楼层id
        /// </summary>
        private string curFloorId;
        /// <summary>
        /// 选择楼层
        /// </summary>
        private Button selectFloorBtn;
@@ -128,9 +132,12 @@
        {
            var floors = new SelectFloor();
            AddChidren(floors);
            floors.changeFloor = false;
            floors.CurFloorId = curFloorId;
            floors.Init(580, 184, Direction.Right);
            floors.FloorAction += (floorId) =>
            {
                curFloorId = floorId;
                floorBtn.Text = Config.Instance.Home.GetFloorNameById(floorId);
                RefreshBodyView(floorId);
            };
ZigbeeApp/Shared/Phone/Device/CommonForm/ACLeftIconButtonRowLayout.cs
@@ -59,7 +59,7 @@
                Height = Application.GetRealHeight(80),
                Width = this.Width - Application.GetRealWidth(80 + 80 + 30),
                TextColor = Shared.Common.ZigbeeColor.Current.GXCPlaceHolderTextColor,
                SelectedTextColor = Common.ZigbeeColor.Current.GXCACSelectedTextColor,
                SelectedTextColor = Common.ZigbeeColor.Current.GXCACSelectedTextColor_FanModel,
                Text = title,
                TextAlignment = TextAlignment.CenterLeft,
                Gravity = Gravity.CenterVertical,
ZigbeeApp/Shared/Phone/Device/CommonForm/CategoryFunctionForWinRow.cs
@@ -74,7 +74,7 @@
            X = Application.GetRealWidth(x);
            Y = Application.GetRealHeight(y);
            Width = Application.GetRealWidth(1022);
            Height = Application.GetRealHeight(127);
            Height = Application.GetRealHeight(127-2);
            //BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
        }
@@ -179,11 +179,11 @@
            var line = new Button()
            {
                X = Application.GetRealWidth(200),
                Y = Height - 2,
                X = Application.GetRealWidth(181),
                Y = Height - 1,
                Width = Application.GetRealWidth(821),
                Height = 2,
                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor,
                Height = 1,
                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2,
                Tag = Tag
            };
            AddChidren(line);
@@ -274,5 +274,18 @@
                CloseOrDownBtn.SelectedImagePath = "RollerShade/CloseSelected.png";
            }
        }
        /// <summary>
        /// SetDeviceIcon
        /// </summary>
        /// <param name="imagePath"></param>
        /// <param name="selectedImagePath"></param>
        public void SetDeviceIcon(string imagePath, string selectedImagePath)
        {
            ImageBtn.UnSelectedImagePath = imagePath;
            ImageBtn.SelectedImagePath = selectedImagePath;
        }
    }
}
ZigbeeApp/Shared/Phone/Device/CommonForm/CategoryFunctionRow.cs
@@ -65,7 +65,7 @@
            X = Application.GetRealWidth(x);
            Y = Application.GetRealHeight(y);
            Width = Application.GetRealWidth(1022);
            Height = Application.GetRealHeight(127);
            Height = Application.GetRealHeight(127-2);
            //BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
        }
@@ -141,7 +141,7 @@
            var line = new Button()
            {
                X = Application.GetRealWidth(200),
                X = Application.GetRealWidth(181),
                Y = Height - 1,
                Width = Application.GetRealWidth(821),
                Height = 1,
@@ -210,5 +210,16 @@
        {
            SwitchBtn.Visible = !statu;
        }
        /// <summary>
        /// SetDeviceIcon
        /// </summary>
        /// <param name="imagePath"></param>
        /// <param name="selectedImagePath"></param>
        public void SetDeviceIcon(string imagePath, string selectedImagePath)
        {
            ImageBtn.UnSelectedImagePath = imagePath;
            ImageBtn.SelectedImagePath = selectedImagePath;
        }
    }
}
ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceDetailInfo.cs
@@ -21,7 +21,7 @@
        /// <summary>
        /// action
        /// </summary>
        public Action action;
        public Action<DeviceUI,Common.Room> EditAction;
        /// <summary>
        /// curRoom
        /// </summary>
@@ -39,6 +39,7 @@
        /// </summary>
        private DeviceInfoRow functionTypeRow;
        #endregion
        #region ◆ 移除____________________________
@@ -47,7 +48,6 @@
        /// </summary>
        public override void RemoveFromParent()
        {
            action();
            base.RemoveFromParent();
        }
        #endregion
@@ -118,7 +118,7 @@
                Height = Application.GetMinRealAverage(207),
                Gravity = Gravity.CenterHorizontal,
                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
                Radius = (uint)Application.GetMinRealAverage(207)
                Radius = (uint)Application.GetMinRealAverage(207/2)
            };
            bodyFrameLayout.AddChidren(deviceBG);
@@ -129,7 +129,7 @@
                Height = Application.GetMinRealAverage(184),
                Gravity = Gravity.CenterHorizontal,
                BackgroundColor = ZigbeeColor.Current.GXCSelectedBackgroundColor,
                Radius = (uint)Application.GetMinRealAverage(184)
                Radius = (uint)Application.GetMinRealAverage(184/2)
            };
            bodyFrameLayout.AddChidren(deviceBG2);
@@ -143,14 +143,17 @@
            };
            bodyFrameLayout.AddChidren(deviceIMG);
            var info = Common.LocalDevice.Current.GetDeviceBelongEnumInfo(device.CommonDevice);
            var deviceTypeName = new Button()
            {
                Y = Application.GetRealHeight(360),
                Width = Application.GetRealWidth(900),
                Height = Application.GetRealHeight(80),
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                Text = DeviceUI.GetDeviceTypeName(device.CommonDevice.Type),
                Gravity = Gravity.CenterHorizontal
                TextID = info.BeloneTextId,
                Gravity = Gravity.CenterHorizontal,
                TextSize = 15
            };
            bodyFrameLayout.AddChidren(deviceTypeName);
@@ -318,7 +321,7 @@
                    {
                        curRoom = rooms[index1][index2];
                        zoneRow.SetTitle($"{Config.Instance.Home.GetFloorNameById(floorIds[index1])} , {rooms[index1][index2].Name}");
                    }, 0, 0, Language.StringByID(R.MyInternationalizationString.BelongFloor),
                    }, 0, 0, Language.StringByID(R.MyInternationalizationString.BelongZone),
                   Language.StringByID(R.MyInternationalizationString.Confrim),
                   Language.StringByID(R.MyInternationalizationString.Cancel));
                }
@@ -338,7 +341,7 @@
                    {
                        curRoom = rs[index1];
                        zoneRow.SetTitle(rs[index1].Name);
                    }, 0,Language.StringByID(R.MyInternationalizationString.BelongFloor),
                    }, 0,Language.StringByID(R.MyInternationalizationString.BelongZone),
                   Language.StringByID(R.MyInternationalizationString.Confrim),
                   Language.StringByID(R.MyInternationalizationString.Cancel));
                }
@@ -407,19 +410,15 @@
                            CommonPage.Loading.Hide();
                            if (result)
                            {
                                //var alertSuccess = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.Success), Language.StringByID(R.MyInternationalizationString.Confrim));
                                //alertSuccess.Show();
                                //alertSuccess.ResultEventHandler += (senderSuccess, eSuccess) =>
                                //{
                                    //改房间
                                    Shared.Common.Room.CurrentRoom.ChangedRoom(device.CommonDevice, curRoom.Id);
                                    device.CommonDevice.ReSave();
                                    RemoveFromParent();
                                //};
                                //改房间
                                Shared.Common.Room.CurrentRoom.ChangedRoom(device.CommonDevice, curRoom.Id);
                                device.CommonDevice.ReSave();
                                EditAction?.Invoke(device, curRoom);
                                RemoveFromParent();
                            }
                            else
                            {
                                CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.FailedPleaseTryAgain);
                                CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.FailedPleaseTryAgain));
                            }
                        });
                    })
ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceIconSelectedIMGByLocal.cs
@@ -113,7 +113,10 @@
            bodyFrameLayout.AddChidren(confirmBtn);
            confirmBtn.MouseUpEventHandler += (sender, e) =>
            {
                action(tempIcon.ImageBtn.UnSelectedImagePath, tempIcon.ImageBtn.SelectedImagePath);
                if (tempIcon.ImageBtn != null)
                {
                    action(tempIcon.ImageBtn.UnSelectedImagePath, tempIcon.ImageBtn.SelectedImagePath);
                }
                RemoveFromParent();
            };
        }
ZigbeeApp/Shared/Phone/Device/CommonForm/LeftIconButtonRow.cs
@@ -18,6 +18,10 @@
        /// </summary>
        public FrameLayout Line;
        /// <summary>
        /// 点击事件
        /// </summary>
        public Action<LeftIconButtonRow, MouseEventArgs> ButtonClickEvent;
        /// <summary>
        /// ClickBtn
        /// </summary>
        public Button ClickBtn;
@@ -45,7 +49,7 @@
        #endregion
        public LeftIconButtonRow(int width,int height, int x = 0, int y = 0)
        public LeftIconButtonRow(int width = 449, int height = 150, int x = 0, int y = 0)
        {
            X = x;
            Y = y;
@@ -103,9 +107,8 @@
                AddChidren(Line);
            }
            ClickBtn = new Button { Tag = this.Tag };
            AddChidren(ClickBtn);
            IconButton.MouseUpEventHandler += Button_MouseUpEventHandler;
            TitleButton.MouseUpEventHandler += Button_MouseUpEventHandler;
        }
        #endregion
@@ -115,12 +118,11 @@
        /// 设置状态
        /// </summary>
        /// <param name="statu"></param>
        public void SetStatu(bool statu)
        private void SetStatu(bool statu)
        {
            IconButton.IsSelected = statu;
            TitleButton.IsSelected = statu;
            TitleButton.IsBold = statu;
            ClickBtn.IsSelected = statu;
        }
        /// <summary>
        /// 选中
@@ -144,7 +146,35 @@
        {
            Line.Visible = !statu;
        }
        /// <summary>
        /// 设置标题颜色
        /// </summary>
        /// <param name="color"></param>
        /// <param name="selectedColor"></param>
        public void SetTitleColor(uint color,uint selectedColor)
        {
            TitleButton.TextColor = color;
            TitleButton.SelectedTextColor = selectedColor;
        }
        #endregion
        #region ◆ 点击事件_________________________
        /// <summary>
        /// 点击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Button_MouseUpEventHandler(object sender, MouseEventArgs e)
        {
            try
            {
                this.ButtonClickEvent?.Invoke(this, e);
            }
            catch (Exception ex)
            {
            }
        }
        #endregion
    }
}
ZigbeeApp/Shared/Phone/Device/CommonForm/RoomView.cs
@@ -24,7 +24,7 @@
        Button roomListBtn;
        Button temperatureText;
        Button temperatureText;
        Button humidityText;
@@ -85,55 +85,64 @@
                        {
                            //return;
                        }
                        //if (common.Type == DeviceType.TemperatureSensor)
                        //{
                            if (common.DeviceStatusReport.CluterID == 1026)
                        if (common.DeviceStatusReport.CluterID == 1026)
                        {
                            foreach (var data in common.DeviceStatusReport.AttriBute)
                            {
                                foreach (var data in common.DeviceStatusReport.AttriBute)
                                if (data.AttributeId == (int)ZigBee.Device.AttriButeId.MeasuredValue)
                                {
                                    if (data.AttributeId == (int)ZigBee.Device.AttriButeId.MeasuredValue)
                                    if (data.AttriButeData == 0)
                                    {
                                        if (data.AttriButeData == 0)
                                        {
                                            //0
                                            humidityText.Text = "--%";
                                            room.Humidity = 0;
                                        }
                                        else
                                        {
                                            //小数点需要一位(湿度没有负数)
                                            string strValue = data.AttriButeData.ToString();
                                            strValue = strValue.Substring(0, strValue.Length - 1);
                                            humidityText.Text = strValue.Insert(strValue.Length - 1, ".") + "%";
                                            room.Humidity = int.Parse(strValue) * 0.1;
                                        }
                                        //0℃
                                        temperatureText.Text = "0.0℃";
                                        room.Temperatrue = 0;
                                    }
                                    else if (data.AttriButeData > 32767)
                                    {
                                        //负数(特殊处理)
                                        string strValue = (data.AttriButeData - 65536).ToString();
                                        //小数点需要一位
                                        strValue = strValue.Substring(0, strValue.Length - 1);
                                        temperatureText.Text = strValue.Insert(strValue.Length - 1, ".") + "℃";
                                        room.Temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                                    }
                                    else
                                    {
                                        //小数点需要一位
                                        string strValue = data.AttriButeData.ToString();
                                        strValue = strValue.Substring(0, strValue.Length - 1);
                                        temperatureText.Text = strValue.Insert(strValue.Length - 1, ".") + "℃";
                                        room.Temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                                    }
                                }
                            }
                            else if (common.DeviceStatusReport.CluterID == 1029)
                        }
                        else if (common.DeviceStatusReport.CluterID == 1029)
                        {
                            foreach (var data in common.DeviceStatusReport.AttriBute)
                            {
                                foreach (var data in common.DeviceStatusReport.AttriBute)
                                if (data.AttributeId == (int)ZigBee.Device.AttriButeId.MeasuredValue)
                                {
                                    if (data.AttributeId == (int)ZigBee.Device.AttriButeId.MeasuredValue)
                                    if (data.AttriButeData == 0)
                                    {
                                        if (data.AttriButeData == 0)
                                        {
                                            //0
                                            humidityText.Text = "--%";
                                            room.Humidity = 0;
                                        }
                                        else
                                        {
                                            //小数点需要一位(湿度没有负数)
                                            string strValue = data.AttriButeData.ToString();
                                            strValue = strValue.Substring(0, strValue.Length - 1);
                                            humidityText.Text = strValue.Insert(strValue.Length - 1, ".") + "%";
                                            room.Humidity = int.Parse(strValue) * 0.1;
                                        }
                                        //0
                                        humidityText.Text = "--%";
                                        room.Humidity = 0;
                                    }
                                    else
                                    {
                                        //小数点需要一位(湿度没有负数)
                                        string strValue = data.AttriButeData.ToString();
                                        strValue = strValue.Substring(0, strValue.Length - 1);
                                        humidityText.Text = strValue.Insert(strValue.Length - 1, ".") + "%";
                                        room.Humidity = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                                    }
                                }
                            }
                        }
                        //}
                    }
                    catch (Exception ex)
@@ -204,15 +213,17 @@
            var roomName = new Button()
            {
                X = Application.GetRealWidth(5),
                X = Application.GetRealWidth(29),
                Width = Application.GetRealWidth(190),
                Text = room.Name,
                TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
                TextSize=10,
                IsBold=true
                TextSize = 10,
                TextAlignment=TextAlignment.CenterLeft,
                IsBold = true
            };
            roomNameBackground.AddChidren(roomName);
            roomNameBackground.Width = (roomName.GetTextWidth() + Application.GetRealWidth(100)) > Application.GetRealWidth(600) ? Application.GetRealWidth(600) : roomName.GetTextWidth() + Application.GetRealWidth(100);
            roomName.Width = roomNameBackground.Width - Application.GetRealWidth(40);
            roomTemperatureBackground = new FrameLayout
            {
@@ -239,16 +250,16 @@
            {
                X = Application.GetRealWidth(69),
                Width = Application.GetRealWidth(120),
                Height = Application.GetRealHeight(58),
                Gravity = Gravity.CenterVertical,
                Text = Math.Abs(room.Temperatrue) <= 0 ? "--℃" : $"{room.Temperatrue}℃",
                TextSize=14
                Text = room.Temperatrue == 0 ? "--℃" : $"{room.Temperatrue}℃",
                TextSize = 14,
                TextAlignment=TextAlignment.CenterLeft
            };
            roomTemperatureBackground.AddChidren(temperatureText);
            temperatureText.Width = temperatureText.GetTextWidth() + Application.GetRealWidth(60);
            var humidityIcon = new Button
            {
                X = Application.GetRealWidth(200),
                X = temperatureText.Right,
                Width = Application.GetMinRealAverage(58),
                Height = Application.GetMinRealAverage(58),
                Gravity = Gravity.CenterVertical,
@@ -258,15 +269,15 @@
            humidityText = new Button
            {
                X = Application.GetRealWidth(260),
                X = humidityIcon.Right,
                Width = Application.GetRealWidth(120),
                Height = Application.GetRealHeight(58),
                Gravity = Gravity.CenterVertical,
                Text = Math.Abs(room.Temperatrue) <= 0 ? "--%" : $"{room.Humidity}%",
                TextSize=14
                Text = room.Humidity == 0 ? "--%" : $"{room.Humidity}%",
                TextSize = 14,
                TextAlignment = TextAlignment.CenterLeft
            };
            roomTemperatureBackground.AddChidren(humidityText);
            humidityText.Width = humidityText.GetTextWidth() + Application.GetRealWidth(60);
            roomTemperatureBackground.Width = (humidityText.Width + temperatureText.Width + Application.GetRealWidth(150)) > Application.GetRealWidth(600) ? Application.GetRealWidth(600) : (humidityText.Width + temperatureText.Width + Application.GetRealWidth(150));
            if (string.IsNullOrEmpty(room.TemperatrueDevice) == false)
            {
@@ -280,7 +291,6 @@
                var dev = Common.LocalDevice.Current.GetDevice(room.HumidityDevice);
                ReadDeviceAttributeLogic.Instance.SendHumidityStatuComand(dev);
            }
            roomListBtn = new Button()
            {
ZigbeeApp/Shared/Phone/Device/CommonForm/RowLayoutDeleteButton.cs
@@ -18,7 +18,8 @@
            TextID = R.MyInternationalizationString.Delete;
            TextColor = ZigbeeColor.Current.GXCTextWhiteColor;
            TextAlignment = TextAlignment.Center;
            Radius = CommonPage.BigFormRadius;
            TextSize = 14;
            //Radius = CommonPage.BigFormRadius;
        }
    }
}
ZigbeeApp/Shared/Phone/Device/CommonForm/RowLayoutEditButton.cs
@@ -18,7 +18,8 @@
            TextID = R.MyInternationalizationString.Edit;
            TextColor = ZigbeeColor.Current.GXCTextWhiteColor;
            TextAlignment = TextAlignment.Center;
            Radius = CommonPage.BigFormRadius;
            TextSize = 14;
            //Radius = CommonPage.BigFormRadius;
        }
    }
}
ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs
@@ -1,5 +1,9 @@
using System;
using System.Collections.Generic;
using Shared.Common;
using Shared.Phone.Device.Category;
using Shared.Phone.UserCenter;
namespace Shared.Phone.Device.CommonForm
{
    public class SceneCategoryView : FrameLayout
@@ -56,6 +60,7 @@
        /// </summary>
        private void InitFrame()
        {
            RemoveAll();
            var sceneRowLayout = new RowLayout
            {
                Y = Application.GetRealHeight(46),
@@ -64,6 +69,7 @@
                Tag= scene
            };
            AddChidren(sceneRowLayout);
            sceneRowLayout.SubViewWidth = Application.GetRealWidth(199);
            sceneImg = new ImageView()
            {
@@ -164,8 +170,10 @@
            var delayBtn = new RowLayoutDeleteButton
            {
                TextID = R.MyInternationalizationString.Delay,
                Tag = scene.SceneDelayTime
                Tag = scene.SceneDelayTime,
                BackgroundColor=ZigbeeColor.Current.GXCTextSelectedColor,
            };
            delayBtn.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight | HDLUtils.RectCornerBottomRight);
            sceneRowLayout.AddLeftView(delayBtn);
            //编辑
            var settingBtn = new Device.CommonForm.RowLayoutEditButton()
@@ -173,12 +181,13 @@
                TextID = R.MyInternationalizationString.Editor,
                Tag = scene.SceneDelayTime
            };
            settingBtn.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerTopLeft);
            //删除
            var deleteBtn = new Device.CommonForm.RowLayoutDeleteButton
            {
                Tag = scene
            };
            deleteBtn.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerTopRight | HDLUtils.RectCornerBottomRight);
            if (room.IsSharedRoom)
            {
@@ -193,6 +202,7 @@
                {
                    sceneRowLayout.AddRightView(settingBtn);
                    sceneRowLayout.AddRightView(deleteBtn);
                }
            }
@@ -206,52 +216,146 @@
                }
                else
                {
                    var tip = new CustomAlert { };
                    Common.CommonPage.Instance.AddChidren(tip);
                    tip.Show(Language.StringByID(R.MyInternationalizationString.ConfirmDelete));
                    tip.ResultEventHandler += async (e1) =>
                    var alert = new UserCenter.ShowMsgControl(ShowMsgType.Confirm, Language.StringByID(R.MyInternationalizationString.ConfirmDelete));
                    alert.Show();
                    alert.ConfirmClickEvent += async () =>
                    {
                        if (e1)
                        //0 移除失败 1 移除成功 2 没有该场景
                        var removeSceneAllData = await ZigBee.Device.Scene.DeleteSceneAsync(scene.Id);
                        if (removeSceneAllData == null || removeSceneAllData.removeSceneData == null)
                        {
                            //0 移除失败 1 移除成功 2 没有该场景
                            var removeSceneAllData = await ZigBee.Device.Scene.DeleteSceneAsync(scene.Id);
                            if (removeSceneAllData == null || removeSceneAllData.removeSceneData == null)
                            {
                                CommonPage.Instance.FailureToServer();
                                return;
                            }
                            //1成功
                            if (removeSceneAllData.removeSceneData.Result == 1)
                            {
                                room.RemoveScene(scene);
                                //RefreshBodyView();
                                RemoveFromParent();
                            }
                            //0 移除失败
                            else if (removeSceneAllData.removeSceneData.Result == 0)
                            {
                                CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.FailedPleaseTryAgain);
                                return;
                            }
                            //2 没有该场景
                            else if (removeSceneAllData.removeSceneData.Result == 2)
                            {
                                room.RemoveScene(scene);
                                //RefreshBodyView();
                                RemoveFromParent();
                                CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.TheSceneIsNull);
                                return;
                            }
                            CommonPage.Instance.FailureToServer();
                            return;
                        }
                        //1成功
                        if (removeSceneAllData.removeSceneData.Result == 1)
                        {
                            room.RemoveScene(scene);
                            //RefreshBodyView();
                            RemoveFromParent();
                        }
                        //0 移除失败
                        else if (removeSceneAllData.removeSceneData.Result == 0)
                        {
                            CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.FailedPleaseTryAgain);
                            return;
                        }
                        //2 没有该场景
                        else if (removeSceneAllData.removeSceneData.Result == 2)
                        {
                            room.RemoveScene(scene);
                            //RefreshBodyView();
                            RemoveFromParent();
                            CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.TheSceneIsNull);
                            return;
                        }
                    };
                }
            };
            deleteBtn.MouseUpEventHandler += delEvent;
            //编辑场景
            settingBtn.MouseUpEventHandler += (sender, e) =>
            settingBtn.MouseUpEventHandler += async (sender, e) =>
            {
                SceneUI.EditScene(scene, room);
                try
                {
                    var targetList = new List<SceneTargetDeviceUI> { };
                    CommonPage.Loading.Start();
                    //从网关中反序列化出对应的房间设备
                    var sceneDeviceList = await ZigBee.Device.Scene.GetSceneDeviceListAsync(scene.Id);
                    if (sceneDeviceList == null)
                    {
                        CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.TheMainGatewayIsNotOnLine));
                        return;
                    }
                    if (sceneDeviceList.getSceneDeviceListInfo != null)
                    {
                        var deviceList = sceneDeviceList.getSceneDeviceListInfo.DeviceList;
                        var allDevice = Common.Room.AllRoomDeviceUIList;
                        var allScene = Common.Room.AllRoomSceneUIList;
                        if (deviceList != null && allDevice.Count != 0)
                        {
                            foreach (var sceneDev in deviceList)
                            {
                                if (sceneDev.Type == 0)
                                {
                                    var dev = allDevice.Find((obj) => obj.DeviceEpoint == sceneDev.Epoint && obj.DeviceAddr == sceneDev.DeviceAddr);
                                    if (dev != null)
                                    {
                                        var sceneTargetDevice = new SceneTargetDeviceUI
                                        {
                                            Type = 0,
                                            DeviceUI = dev,
                                            TaskList = sceneDev.TaskList,
                                            DelayTimeSerialNumber = deviceList.IndexOf(sceneDev) + 1
                                        };
                                        targetList.Add(sceneTargetDevice);
                                    }
                                }
                                else if (sceneDev.Type == 1)
                                {
                                    var localScene = allScene.Find((obj) => obj.Id == sceneDev.ElseScenesId);
                                    if (localScene != null)
                                    {
                                        var sceneTargetDeviceScene = new SceneTargetDeviceUI
                                        {
                                            Type = 1,
                                            ElseScenesId = sceneDev.ElseScenesId,
                                            SceneName = localScene.Name,
                                            SceneUI = localScene,
                                            DelayTimeSerialNumber = deviceList.IndexOf(sceneDev) + 1
                                        };
                                        targetList.Add(sceneTargetDeviceScene);
                                    }
                                }
                                else
                                {
                                    var sceneTargetDeviceScene = new SceneTargetDeviceUI
                                    {
                                        Type = 2,
                                        DelayTime = sceneDev.DelayTime,
                                        DelayTimeSerialNumber = deviceList.IndexOf(sceneDev) + 1
                                    };
                                    targetList.Add(sceneTargetDeviceScene);
                                }
                            }
                        }
                    }
                    else
                    {
                        CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.FailedPleaseTryAgain));
                    }
                    var sceneView = new CategoryAddScene();
                    Phone.UserView.HomePage.Instance.AddChidren(sceneView);
                    Phone.UserView.HomePage.Instance.PageIndex += 1;
                    sceneView.isModify = true;
                    sceneView.modifyRoom = room;
                    sceneView.modifySceneUI = scene;
                    sceneView.modifySceneTargetDevicesList = targetList;
                    sceneView.Show();
                    sceneView.EditorAction = (s, r) =>
                    {
                        if(r.Id!=room.Id)
                        {
                            RemoveFromParent();
                        }
                        else
                        {
                            Init(s, r);
                        }
                    };
                }
                catch (Exception ex)
                {
                    System.Console.WriteLine($"编辑场景出错---{ex.Message}");
                }
                finally
                {
                    CommonPage.Loading.Hide();
                }
            };
            //编辑延时
            delayBtn.MouseUpEventHandler += (sender, e) =>
ZigbeeApp/Shared/Phone/Device/CommonForm/SceneMainView.cs
@@ -149,8 +149,8 @@
                TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
                SelectedTextColor = ZigbeeColor.Current.GXCTextSelectedColor,
                TextAlignment = TextAlignment.CenterLeft,
                TextSize=14,
                IsBold=true
                TextSize = 14,
                IsBold = true
            };
            AddChidren(SceneNameButton);
        }
@@ -182,6 +182,8 @@
            TimeButton.Height = Application.GetMinRealAverage(63);
            TimeButton.UnSelectedImagePath = string.Empty;
            TimeButton.Text = name;
            TimeButton.TextSize = 14;
            TimeButton.IsBold = true;
        }
        /// <summary>
@@ -334,7 +336,7 @@
            }
            var timeSelect = new SelectTime();
            CommonPage.Instance.AddChidren(timeSelect);
            timeSelect.TempTime = scene.DelayTime;
            timeSelect.TempTime = scene.SceneDelayTime;
            timeSelect.Init();
            timeSelect.TimeAction = (t) =>
            {
ZigbeeApp/Shared/Phone/Device/CommonForm/SceneTargetFunctionRow.cs
@@ -33,7 +33,7 @@
            X = Application.GetRealWidth(0);
            Y = Application.GetRealHeight(y);
            Width = Application.GetRealWidth(1080);
            Height = Application.GetRealHeight(127);
            Height = Application.GetRealHeight(127 - 2);
        }
        /// <summary>
@@ -54,11 +54,12 @@
            {
                X = Application.GetRealWidth(219),
                Y = Application.GetRealHeight(14),
                Width = Application.GetRealWidth(500),
                Width = Application.GetRealWidth(400),
                Height = Application.GetRealHeight(58),
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                TextAlignment = TextAlignment.CenterLeft,
                TextID = R.MyInternationalizationString.Delay
                TextID = R.MyInternationalizationString.Delay,
                TextSize = 14
            };
            AddChidren(NameBtn);
@@ -66,30 +67,32 @@
            {
                X = Application.GetRealWidth(219),
                Y = Application.GetRealHeight(72),
                Width = Application.GetRealWidth(200),
                Width = Application.GetRealWidth(400),
                Height = Application.GetRealHeight(49),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor2
                TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor2,
                TextSize = 12
            };
            AddChidren(ZoneBtn);
            StatuBtn = new Button
            {
                X = Application.GetRealWidth(510),
                Width = Application.GetRealWidth(500),
                X = Application.GetRealWidth(650),
                Width = Application.GetRealWidth(350),
                Height = Application.GetRealHeight(100),
                Gravity = Gravity.CenterVertical,
                TextAlignment = TextAlignment.CenterRight,
                TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor2
                TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor2,
                TextSize = 14
            };
            AddChidren(StatuBtn);
            line = new Button()
            {
                X = Application.GetRealWidth(222),
                Y = Height - 2,
                Y = Height - 1,
                Width = Application.GetRealWidth(800),
                Height = 2,
                Height = 1,
                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2,
            };
            AddChidren(line);
@@ -137,7 +140,7 @@
        /// <param name="hiden"></param>
        public void HideLine(bool hiden)
        {
            line.Visible = hiden;
            line.Visible = !hiden;
        }
    }
}
ZigbeeApp/Shared/Phone/Device/CommonForm/SceneTargetTimeRow.cs
@@ -2,7 +2,7 @@
using Shared.Common;
namespace Shared.Phone.Device.CommonForm
{
    public class SceneTargetTimeRow:FrameLayout
    public class SceneTargetTimeRow : FrameLayout
    {
        /// <summary>
        /// TipBtn
@@ -29,7 +29,7 @@
            X = Application.GetRealWidth(0);
            Y = Application.GetRealHeight(y);
            Width = Application.GetRealWidth(1080);
            Height = Application.GetRealHeight(127);
            Height = Application.GetRealHeight(127-2);
        }
        /// <summary>
@@ -43,7 +43,7 @@
                Width = Application.GetMinRealAverage(80),
                Height = Application.GetMinRealAverage(80),
                Gravity = Gravity.CenterVertical,
                UnSelectedImagePath="Item/Timer.png"
                UnSelectedImagePath = "Item/Timer.png"
            };
            AddChidren(Icon);
@@ -55,7 +55,8 @@
                Gravity = Gravity.CenterVertical,
                TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor2,
                TextAlignment = TextAlignment.CenterLeft,
                TextID=R.MyInternationalizationString.Delay
                TextID = R.MyInternationalizationString.Delay,
                TextSize = 14
            };
            AddChidren(TipBtn);
@@ -65,17 +66,18 @@
                Width = Application.GetRealWidth(500),
                Height = Application.GetRealHeight(100),
                Gravity = Gravity.CenterVertical,
                TextAlignment=TextAlignment.CenterRight,
                TextColor=  ZigbeeColor.Current.GXCPlaceHolderTextColor2
                TextAlignment = TextAlignment.CenterRight,
                TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor2,
                TextSize = 14
            };
            AddChidren(TitleBtn);
            line = new Button()
            {
                X = Application.GetRealWidth(222),
                Y = Height - 2,
                Y = Height - 1,
                Width = Application.GetRealWidth(800),
                Height = 2,
                Height = 1,
                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2,
            };
            AddChidren(line);
@@ -96,7 +98,7 @@
        /// <param name="hiden"></param>
        public void HideLine(bool hiden)
        {
            line.Visible = hiden;
            line.Visible = !hiden;
        }
    }
}
ZigbeeApp/Shared/Phone/Device/CommonForm/SelectTime.cs
@@ -33,10 +33,10 @@
            var backgroundFL = new FrameLayout
            {
                Y = Application.GetRealHeight(596),
                Height = Application.GetRealHeight(1425),
                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
                Radius=(uint)Application.GetRealHeight(20)
                Height = Application.GetRealHeight(1325),
                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
            };
            backgroundFL.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
            dialog.AddChidren(backgroundFL);
            var topView = new FrameLayout
@@ -52,7 +52,7 @@
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = ZigbeeColor.Current.GXCTextGrayColor,
                TextID=R.MyInternationalizationString.Cancel,
                TextSize=16
                TextSize=14
            };
            topView.AddChidren(cancle);
@@ -72,39 +72,44 @@
                Width = Application.GetRealWidth(300),
                TextAlignment = TextAlignment.CenterRight,
                TextColor = ZigbeeColor.Current.GXCTextSelectedColor2,
                TextID = R.MyInternationalizationString.Confrim,
                TextSize = 16
                TextID = R.MyInternationalizationString.Complete,
                TextSize = 14
            };
            topView.AddChidren(confrim);
            var Line = new FrameLayout()
            {
                Y = topView.Height - 1,
                Height = 1,
                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2
            };
            topView.AddChidren(Line);
            var timeLayout = new VerticalScrolViewLayout
            {
                Y = Application.GetRealHeight(207),
                Height = Application.GetRealHeight(703+127*2+12*2)
                Height = Application.GetRealHeight(703 + 127 * 2 + 12+12),
                ScrollEnabled = false,
                VerticalScrollBarEnabled = false,
            };
            backgroundFL.AddChidren(timeLayout);
            TempSelectBtn = new Button();
            TempTimeBtn = new Button();
            var unKe = new FrameLayout
            {
                Y = timeLayout.Bottom,
                Height = Application.GetRealHeight(161),
                BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
            };
            backgroundFL.AddChidren(unKe);
            var notOpen = new Button
            {
                X = Application.GetRealWidth(80),
                Y=Application.GetRealHeight(1200),
                Width=Application.GetRealWidth(400),
                Height=Application.GetRealHeight(80),
                TextColor = ZigbeeColor.Current.GXCTextGrayColor4,
                TextID = R.MyInternationalizationString.NotOpen,
                TextAlignment = TextAlignment.CenterLeft,
                Gravity = Gravity.CenterVertical,
                TextSize=16
                TextSize=14
            };
            unKe.AddChidren(notOpen);
            backgroundFL.AddChidren(notOpen);
            cancle.MouseUpEventHandler += Close;
            confrim.MouseUpEventHandler += Confrim_MouseEvent;
@@ -153,7 +158,8 @@
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = ZigbeeColor.Current.GXCTextGrayColor4,
                SelectedTextColor = ZigbeeColor.Current.GXCTextBlackColor,
                IsSelected=false
                IsSelected=false,
                TextSize=14
            };
            trow.AddChidren(timeBtn);
@@ -170,13 +176,13 @@
            var Line = new FrameLayout()
            {
                Y = trow.Height - 1,
                Y = row.Height - 1,
                Width = Application.GetRealWidth(919),
                Height = 1,
                Gravity=Gravity.CenterHorizontal,
                BackgroundColor = Common.ZigbeeColor.Current.GXCGrayLineColor2
            };
            trow.AddChidren(Line);
            row.AddChidren(Line);
           
            EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
ZigbeeApp/Shared/Phone/Device/CommonForm/SelectZone.cs
@@ -4,7 +4,7 @@
namespace Shared.Phone.Device.CommonForm
{
    public class SelectZone : FrameLayout
    public class SelectZone
    {
        public Action<Common.Room> ZoneAction;
@@ -49,7 +49,7 @@
                {
                    curRoom = rooms[index1][index2];
                    ZoneAction?.Invoke(curRoom);
                    RemoveFromParent();
                    //RemoveFromParent();
                }, 0, 0, Language.StringByID(R.MyInternationalizationString.BelongFloor),
               Language.StringByID(R.MyInternationalizationString.Confrim),
               Language.StringByID(R.MyInternationalizationString.Cancel));
@@ -70,8 +70,8 @@
                {
                    curRoom = rs[index1];
                    ZoneAction?.Invoke(curRoom);
                    RemoveFromParent();
                }, 0, Language.StringByID(R.MyInternationalizationString.BelongFloor),
                    //RemoveFromParent();
                }, 0, Language.StringByID(R.MyInternationalizationString.AddTo),
               Language.StringByID(R.MyInternationalizationString.Confrim),
               Language.StringByID(R.MyInternationalizationString.Cancel));
            }
@@ -89,7 +89,7 @@
                roomList.Add(room.Name);
                roomIdList.Add(room.Id);
            }
        }
        /// <summary>
@@ -99,7 +99,7 @@
        /// <param name="mouseEventArgs"></param>
        private void Close(object sender, MouseEventArgs mouseEventArgs)
        {
            RemoveFromParent();
            //RemoveFromParent();
        }
        /// <summary>
@@ -109,8 +109,8 @@
        /// <param name="mouseEventArgs"></param>
        private void Confrim_MouseEvent(object sender, MouseEventArgs mouseEventArgs)
        {
            ZoneAction?.Invoke(curRoom);
            RemoveFromParent();
            //ZoneAction?.Invoke(curRoom);
            //RemoveFromParent();
        }
    }
}
ZigbeeApp/Shared/Phone/Device/Curtain/RollerShadeControl.cs
@@ -88,6 +88,10 @@
        /// ProgressBtnY
        /// </summary>
        int ProgressBtnY;
        /// <summary>
        /// ProgressBtnX
        /// </summary>
        int ProgressBtnX;
        #endregion
@@ -383,7 +387,8 @@
                Gravity = Gravity.CenterHorizontal,
                Text = device.CommonDevice.DeviceEpointName,
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                TextSize = 15
                TextSize = 15,
                IsBold=true
            };
            itemView.AddChidren(deviceNameBtn);
@@ -394,7 +399,8 @@
                Height = Application.GetRealHeight(60),
                Gravity = Gravity.CenterHorizontal,
                TextColor = ZigbeeColor.Current.GXCTextGrayColor,
                Text = $"{Language.StringByID(R.MyInternationalizationString.Current)} {device.GetDeviceStatu()}"
                Text = $"{Language.StringByID(R.MyInternationalizationString.Current)} {device.GetDeviceStatu()}",
                TextSize = 10
            };
            itemView.AddChidren(StatuBtn);
@@ -458,7 +464,7 @@
            }
            SetCurtainType(itemView, (device.CommonDevice as Rollershade).WcdType);
            var roomBG = new Button
            {
                Y = Application.GetRealHeight(1178 - 50),
@@ -494,7 +500,8 @@
                Height = Application.GetRealHeight(50),
                Text = room.Name,
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = ZigbeeColor.Current.GXCTextWhiteColor
                TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
                TextSize = 12
            };
            itemView.AddChidren(roomName);
        }
@@ -647,7 +654,7 @@
            UserView.HomePage.Instance.AddChidren(detailInfo);
            UserView.HomePage.Instance.PageIndex += 1;
            detailInfo.Show(device, room);
            detailInfo.action = () =>
            detailInfo.EditAction = (d,r) =>
            {
                Show(device, room);
            };
@@ -741,6 +748,7 @@
                curtainSeekBar.Width = Application.GetRealWidth(570);
                curtainSeekBar.Height = Application.GetRealHeight(513);
                curtainSeekBar.Gravity = Gravity.CenterHorizontal;
                curtainSeekBar.IsProgressTextShow = false;
                curtainSeekBar.Progress = (device.CommonDevice as Rollershade).WcdCurrentPositionLiftPercentage;
                layout.AddChidren(curtainSeekBar);
@@ -748,6 +756,29 @@
                {
                    (device.CommonDevice as Rollershade).WcdGoToTiltValue(curtainSeekBar.Progress);
                };
                curtainSeekBar.OnStartTrackingTouchEvent += (sender, e) =>
                {
                    OnProgressButtonMoveForCurtain(curtainSeekBar.Progress);
                    ProgressBtn.Visible = true;
                };
                curtainSeekBar.OnStopTrackingTouchEvent += (sender, e) =>
                {
                    ProgressBtn.Visible = false;
                };
                curtainSeekBar.OnProgressChangedEvent += (send2, e2) =>
                {
                    OnProgressButtonMoveForCurtain(e2);
                    //判断是否300ms屏蔽
                    //if (curtainRollSeekBar.IsProgressChangeDelay()) return;
                    //(device.CommonDevice as Rollershade).WcdGoToTiltValue(curtainRollSeekBar.Progress);
                };
                InitProgressBtnForCurtain(layout);
            }
        }
@@ -764,7 +795,10 @@
                Height = Application.GetMinReal(104),
                UnSelectedImagePath = "Item/ProgressBubbles.png",
                Visible = false,
                Gravity = Gravity.CenterHorizontal
                Gravity = Gravity.CenterHorizontal,
                TextSize=14,
                IsBold=true,
                TextColor=ZigbeeColor.Current.GXCTextWhiteColor
            };
            layout.AddChidren(ProgressBtn);
        }
@@ -778,6 +812,37 @@
            ProgressBtn.Text = mProgress + "%";
        }
        /// <summary>
        /// 添加进度按钮
        /// </summary>
        private void InitProgressBtnForCurtain(FrameLayout layout)
        {
            ProgressBtnX = curtainSeekBar.X - Application.GetMinReal(20);
            ProgressBtn = new Button()
            {
                X = ProgressBtnX,
                Y = curtainSeekBar.Y + curtainSeekBar.Height / 2 - Application.GetMinReal(180),
                Width = Application.GetMinReal(135),
                Height = Application.GetMinReal(104),
                UnSelectedImagePath = "Item/ProgressBubbles.png",
                Visible = false,
                TextSize = 14,
                IsBold = true,
                TextColor = ZigbeeColor.Current.GXCTextWhiteColor
            };
            layout.AddChidren(ProgressBtn);
        }
        /// <summary>
        /// OnProgressButtonMove
        /// </summary>
        private void OnProgressButtonMoveForCurtain(int mProgress)
        {
            ProgressBtn.X = ProgressBtnX + curtainSeekBar.NowProgressX- Application.GetMinReal(5);
            ProgressBtn.Text = mProgress + "%";
        }
        #endregion
        #region ◆ 收藏到主页_______________________
ZigbeeApp/Shared/Phone/Device/Light/AirSwitchControl.cs
@@ -457,7 +457,7 @@
            UserView.HomePage.Instance.AddChidren(detailInfo);
            UserView.HomePage.Instance.PageIndex += 1;
            detailInfo.Show(device, room);
            detailInfo.action = () =>
            detailInfo.EditAction = (d,r) =>
            {
                Show(device, room);
            };
ZigbeeApp/Shared/Phone/Device/Light/DimmableLightControl.cs
@@ -38,7 +38,7 @@
        /// 收藏按钮
        /// </summary>
        private Button collectionBtn;
        /// <summary>
        /// 开关
        /// </summary>
@@ -47,7 +47,7 @@
        /// 滑条
        /// </summary>
        private WaveSeekBar levelSeekBar;
        private Button StatuBtn;
        /// <summary>
@@ -185,7 +185,7 @@
                                        break;
                                }
                            }
                        }
                    }
                    catch (Exception ex)
@@ -196,7 +196,7 @@
            }
            else if (typeTag == "OnlineStatusChange")
            {
            }
        }
@@ -314,7 +314,7 @@
            UserView.HomePage.Instance.AddChidren(detailInfo);
            UserView.HomePage.Instance.PageIndex += 1;
            detailInfo.Show(device, room);
            detailInfo.action = () =>
            detailInfo.EditAction = (d,r) =>
            {
                Show(device, room);
            };
@@ -448,6 +448,8 @@
            InitProgressBtn(itemView);
            InitProgressBtn(itemView);
            switchBtn = new Button()
            {
                Y = Application.GetRealHeight(1005),
ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs
@@ -482,7 +482,7 @@
            UserView.HomePage.Instance.AddChidren(detailInfo);
            UserView.HomePage.Instance.PageIndex += 1;
            detailInfo.Show(device, room);
            detailInfo.action = () =>
            detailInfo.EditAction = (d,r) =>
            {
                Show(device, room);
            };
ZigbeeApp/Shared/Phone/Device/Light/OnOffControl.cs
@@ -564,7 +564,7 @@
            UserView.HomePage.Instance.AddChidren(detailInfo);
            UserView.HomePage.Instance.PageIndex += 1;
            detailInfo.Show(device, room);
            detailInfo.action = () =>
            detailInfo.EditAction = (d,r) =>
            {
                Show(device, room);
            };
ZigbeeApp/Shared/Phone/Device/Light/PlugControl.cs
@@ -480,7 +480,7 @@
            UserView.HomePage.Instance.AddChidren(detailInfo);
            UserView.HomePage.Instance.PageIndex += 1;
            detailInfo.Show(device, room);
            detailInfo.action = () =>
            detailInfo.EditAction = (d,r) =>
            {
                Show(device, room);
            };
ZigbeeApp/Shared/Phone/Device/Logic/CustomText.cs
@@ -84,6 +84,57 @@
            middle.AddChidren(textBox);
            textBox.HideSoftInput();
            var textBtn = new Button
            {
                Width = Application.GetRealWidth(80),
                Height = Application.GetRealHeight(50),
                X = Application.GetRealWidth(1080 - 80 - 50),
                Y = Application.GetRealHeight(550 - 25),
                TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
                Text = "50",
            };
            middle.AddChidren(textBtn);
            string s1 = "";
            string s2 = "";
            textBox.TextChangeEventHandler += (sender, e) =>
            {
                var leng = e.Length;
                if (leng > 50)
                {
                    var substring = e.Substring(0, 50);
                    s1 = substring;
                    if (s1 == s2)
                    {
                        s2 = s1;
                    }
                    else
                    {
                        if (s2 == "")
                        {
                            s2 = s1;
                        }
                        else
                        {
                            s1 = s2;
                        }
                    }
                    textBox.Text = s2;
                }
                else
                {
                    if (leng == 50)
                    {
                        s2 = e.Substring(0, 50);
                    }
                    else
                    {
                        s1 = "";
                        s2 = "";
                    }
                    textBtn.Text = (50 - leng).ToString();
                }
            };
            var btnsave = new Button
            {
                Y = middle.Height - Application.GetRealHeight(260),
@@ -111,15 +162,14 @@
                           alert.Show();
                           return;
                 }
                 if (Common.Logic.CurrentLogic.LogicId != 0)
                 {
                     ///只改推送内容;
                     Send.LogicControlSwitch(Common.Logic.CurrentLogic);
                     Send.Data("添加/更新", "/App/HomeLogicConfig", "POST");
                 }
                 Send.Zj(true, Common.Logic.CurrentLogic);
                 RemoveFromParent();
             };
        }
    }
}
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/AddCondition.cs
@@ -284,11 +284,11 @@
            lockcolorfra1.Y = Application.GetRealHeight(1920 - 140 - (160 * membershipIfon.UserIdMode.Count) - 20 - 50);
            lockcolorfra1.Height = Application.GetRealHeight(140 + (160 * membershipIfon.UserIdMode.Count) + 20 + 50);
            if (membershipIfon.UserIdMode.Count > 10)
            if (membershipIfon.UserIdMode.Count > 9)
            {
                ///元素超出10个,暂时默认显示10;
                lockcolorfra1.Y = Application.GetRealHeight(1920 - 140 - (160 * 10) - 20 - 50);
                lockcolorfra1.Height = Application.GetRealHeight(140 + (160 * 10) + 20 + 50);
                lockcolorfra1.Y = Application.GetRealHeight(1920 - 140 - (160 * 9) - 20 - 50);
                lockcolorfra1.Height = Application.GetRealHeight(140 + (160 * 9) + 20 + 50);
            }
            string SelectedLockStatus = "";
            ///定义两个变量记录选中状态;
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs
@@ -1070,10 +1070,6 @@
                    tag = true;
                    custompushFrameLayout.Height = Application.GetRealHeight(160);
                    Common.Logic.CurrentLogic.LogicIsCustomPushText = 1;
                    if (Common.Logic.CurrentLogic.LogicId != 0)
                    {
                        Send.Data("添加/更新", "/App/HomeLogicConfig", "POST");
                    }
                }
                else
@@ -1081,20 +1077,20 @@
                    tag = false;
                    custompushFrameLayout.Height = Application.GetRealHeight(0);
                    Common.Logic.CurrentLogic.LogicIsCustomPushText = 0;
                    if (Common.Logic.CurrentLogic.LogicId != 0)
                    {
                        Send.Data("删除", "/App/DelHomeLogicConfig", "POST");
                    }
                }
                Send.Zj(tag, Common.Logic.CurrentLogic);
            };
            if (Common.Logic.CurrentLogic.LogicIsCustomPushText == 0)
            {
                tag = false;
                btnswitch.IsSelected = false;
                custompushFrameLayout.Height = Application.GetRealHeight(0);
            }
            else
            {
                tag = true;
                btnswitch.IsSelected = true;
                custompushFrameLayout.Height = Application.GetRealHeight(160);
            }
            var saveFrameLayout = new FrameLayout
            {
@@ -1148,7 +1144,7 @@
                        Common.Logic.LockLogicList.Add(Common.Logic.CurrentLogic);
                        if (tag)
                        {
                            Send.Data("添加/更新", "/App/HomeLogicConfig", "POST");
                            Send.Zj(tag, Common.Logic.CurrentLogic);
                        }
                    }
                }
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs
@@ -83,6 +83,7 @@
                Common.Logic.CurrentLogic.LogicType = 1;
                Common.Logic.CurrentLogic.Relationship = 1;
                Common.Logic.CurrentLogic.LogicName = Language.StringByID(MyInternationalizationString.automation1);
                Common.Logic.CurrentLogic.LogicCustomPushText = Common.Logic.CurrentLogic.LogicName + Language.StringByID(MyInternationalizationString.defaulttext);
                var lockLogicCommunalPage = new LockLogicCommunalPage();
                UserView.HomePage.Instance.AddChidren(lockLogicCommunalPage);
                UserView.HomePage.Instance.PageIndex += 1;
@@ -182,7 +183,7 @@
                    Height = Application.GetRealHeight(200) + Application.GetRealHeight(32),
                    Width = Application.GetRealWidth(700),
                    //Gravity = Gravity.CenterHorizontal,
                    Text = Language.StringByID(MyInternationalizationString.automationaddtext).Replace("{\\r\\n}", "\r\n"),
                    Text = Language.StringByID(MyInternationalizationString.tiplocktextnull).Replace("{\\r\\n}", "\r\n"),
                    TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
                    TextAlignment = TextAlignment.Center,
                    IsMoreLines = true,
ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs
@@ -1984,7 +1984,7 @@
            custompushback.MouseUpEventHandler += customclick;
            custompushRowLayout.MouseUpEventHandler += customclick;
            bool tag = false;//标记开关状态;
            btnswitch.MouseUpEventHandler += (sender1, e1) =>
            btnswitch.MouseUpEventHandler +=(sender1, e1) =>
              {
                  btnswitch.IsSelected = !btnswitch.IsSelected;
                  if (btnswitch.IsSelected)
@@ -1992,10 +1992,6 @@
                      tag = true;
                      custompushFrameLayout.Height = Application.GetRealHeight(160);
                      Common.Logic.CurrentLogic.LogicIsCustomPushText = 1;
                      if (Common.Logic.CurrentLogic.LogicId != 0)
                      {
                          Send.Data("添加/更新", "/App/HomeLogicConfig", "POST");
                      }
                  }
                  else
@@ -2003,20 +1999,21 @@
                      tag = false;
                      custompushFrameLayout.Height = Application.GetRealHeight(0);
                      Common.Logic.CurrentLogic.LogicIsCustomPushText = 0;
                      if (Common.Logic.CurrentLogic.LogicId != 0)
                      {
                          Send.Data("删除", "/App/DelHomeLogicConfig", "POST");
                      }
                  }
                  Send.Zj(tag,Common.Logic.CurrentLogic);
              };
            if (Common.Logic.CurrentLogic.LogicIsCustomPushText == 0)
            {
                tag = false;
                btnswitch.IsSelected = false;
                custompushFrameLayout.Height = Application.GetRealHeight(0);
            }
            else
            {
                tag = true;
                btnswitch.IsSelected = true;
                custompushFrameLayout.Height = Application.GetRealHeight(160);
            }
            #endregion
@@ -2056,7 +2053,7 @@
                        Common.Logic.LogicList.Add(Common.Logic.CurrentLogic);
                        if (tag)
                        {
                            Send.Data("添加/更新", "/App/HomeLogicConfig", "POST");
                            Send.Zj(tag, Common.Logic.CurrentLogic);
                        }
                    }
                }
ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs
@@ -296,11 +296,11 @@
            string SelectedDeviceStatuscondition = "";
            lockcolorfra1.Y = Application.GetRealHeight(1920 - 140 - (160 * user.UserIdMode.Count) - 20 - 50);
            lockcolorfra1.Height = Application.GetRealHeight(140 + (160 * user.UserIdMode.Count) + 20 + 50);
            if (user.UserIdMode.Count > 10)
            if (user.UserIdMode.Count > 9)
            {
                ///元素超出10个,暂时默认显示10;
                lockcolorfra1.Y = Application.GetRealHeight(1920 - 140 - (160 * 10) - 20 - 50);
                lockcolorfra1.Height = Application.GetRealHeight(140 + (160 * 10) + 20 + 50);
                lockcolorfra1.Y = Application.GetRealHeight(1920 - 140 - (160 * 9) - 20 - 50);
                lockcolorfra1.Height = Application.GetRealHeight(140 + (160 * 9) + 20 + 50);
            }
         
            for (int i = 0; i < user.UserIdMode.Count; i++)
ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
@@ -1130,7 +1130,30 @@
        /// </summary>
        public static UserCenter.MemberInfoRes UserMemberInfoRes = null;
        #endregion
        /// <summary>
        ///  自己用
        /// </summary>
        public static void Zj(bool tag, Common.Logic logic)
        {
            new System.Threading.Thread(() =>
            {
                if (logic.LogicId != 0)
                {
                    if (tag)
                    {
                        Data("添加/更新", "/App/HomeLogicConfig", "POST");
                    }
                    else
                    {
                        Data("删除", "/App/DelHomeLogicConfig", "POST");
                    }
                    ///只改推送内容;
                    LogicControlSwitch(logic);
                }
            })
            { IsBackground = true }.Start();
        }
        #region  请求服务器方法---
        /// <summary>
        /// 请求数据的封装方法
@@ -1140,9 +1163,9 @@
        /// <param name="method">请求方式为POST/GET</param>
        /// <param name="obj">存储发送数据的对象</param>
        /// <returns></returns>
        public static async System.Threading.Tasks.Task<string>Data(string command, string url, string method, object obj = null)
        public static async System.Threading.Tasks.Task<string> Data(string command, string url, string method, object obj = null)
        {
            var getUrl ="";
            var getUrl = "";
            var jObject = new JObject();
            if (UserCenter.UserCenterResourse.UserInfo.AuthorityNo == 1)
            {
ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceCondition.cs
@@ -46,7 +46,7 @@
                Width = Application.GetRealWidth(600),
                Height = Application.GetRealHeight(69),
                Y = Application.GetRealHeight(92),
                TextID = MyInternationalizationString.devicestate,
                TextID = MyInternationalizationString.addsensor,
                IsBold = true,
            };
            topRowLayout.AddChidren(titleName);
ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs
@@ -1200,10 +1200,6 @@
                    tag = true;
                    custompushFrameLayout.Height = Application.GetRealHeight(160);
                    Common.Logic.CurrentLogic.LogicIsCustomPushText = 1;
                    if (Common.Logic.CurrentLogic.LogicId != 0)
                    {
                        Send.Data("添加/更新", "/App/HomeLogicConfig", "POST");
                    }
                }
                else
@@ -1211,20 +1207,21 @@
                    tag = false;
                    custompushFrameLayout.Height = Application.GetRealHeight(0);
                    Common.Logic.CurrentLogic.LogicIsCustomPushText = 0;
                    if (Common.Logic.CurrentLogic.LogicId != 0)
                    {
                        Send.Data("删除", "/App/DelHomeLogicConfig", "POST");
                    }
                }
                Send.Zj(tag, Common.Logic.CurrentLogic);
            };
            if (Common.Logic.CurrentLogic.LogicIsCustomPushText == 0)
            {
                tag = false;
                btnswitch.IsSelected = false;
                custompushFrameLayout.Height = Application.GetRealHeight(0);
            }
            else
            {
                tag = true;
                btnswitch.IsSelected = true;
                custompushFrameLayout.Height = Application.GetRealHeight(160);
            }
            var saveFrameLayout = new FrameLayout
            {
@@ -1281,7 +1278,7 @@
                        Common.Logic.LogicList.Add(Common.Logic.CurrentLogic);
                        if (tag)
                        {
                            Send.Data("添加/更新", "/App/HomeLogicConfig", "POST");
                            Send.Zj(tag, Common.Logic.CurrentLogic);
                        }
                    }
                }
ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs
@@ -131,7 +131,7 @@
                                        //小数点需要一位
                                        strValue = strValue.Substring(0, strValue.Length - 1);
                                        temperatureRow.NameText.Text = strValue.Insert(strValue.Length - 1, ".") + "℃";
                                        room.Temperatrue = int.Parse(strValue) * 0.1;
                                        room.Temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                                    }
                                    else
                                    {
@@ -139,7 +139,7 @@
                                        string strValue = data.AttriButeData.ToString();
                                        strValue = strValue.Substring(0, strValue.Length - 1);
                                        temperatureRow.NameText.Text = strValue.Insert(strValue.Length - 1, ".") + "℃";
                                        room.Temperatrue = int.Parse(strValue) * 0.1;
                                        room.Temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                                    }
                                }
                            }
@@ -162,7 +162,7 @@
                                        string strValue = data.AttriButeData.ToString();
                                        strValue = strValue.Substring(0, strValue.Length - 1);
                                        humidityRow.NameText.Text = strValue.Insert(strValue.Length - 1, ".") + "%";
                                        room.Humidity = int.Parse(strValue) * 0.1;
                                        room.Humidity = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                                    }
                                }
                            }
@@ -193,7 +193,7 @@
        {
            room = r;
            IconPathType = r.BackgroundImageType;
            OldIconPathType= r.BackgroundImageType;
            OldIconPathType = r.BackgroundImageType;
            if (IconPathType != 0)
            {
                OldBackgroundImagePath = r.BackgroundImage;
@@ -241,17 +241,28 @@
            };
            AddChidren(bodyFrameLayout);
            var backGround1 = new ImageView()
            {
                Y = Application.GetRealHeight(60),
                Width = Application.GetMinRealAverage(916),
                Height = Application.GetMinRealAverage(487),
                Gravity = Gravity.CenterHorizontal,
                ImagePath = "Room/Room_Rectangle.png"
            };
            bodyFrameLayout.AddChidren(backGround1);
            backGround = new ImageView()
            {
                Y = Application.GetRealHeight(60),
                Width = Application.GetMinRealAverage(887),
                Height = Application.GetMinRealAverage(444),
                Gravity = Gravity.CenterHorizontal,
                Radius = (uint)Application.GetRealHeight(CommonFormResouce.BigFormRadius),
                Radius = (uint)Application.GetMinRealAverage(CommonFormResouce.BigFormRadius),
                ImagePath = room.BackgroundImageType == 0 ? room.BackgroundImage : System.IO.Path.Combine(Config.Instance.FullPath, room.BackgroundImage)
            };
            bodyFrameLayout.AddChidren(backGround);
            backGround.SetViewShadow(true);
            if (room.BackgroundImageType != 0)
            {
                backGround.ImageBytes = Shared.IO.FileUtils.ReadFile(backGround.ImagePath);
@@ -286,7 +297,7 @@
            nameRow.SetTipTitle($"{Language.StringByID(R.MyInternationalizationString.RoomName)} :");
            nameRow.SetTitle(room.Name);
            infoFL.AddChidren(nameRow);
            if(room.IsLove)
            if (room.IsLove)
            {
                nameRow.NameText.Enable = false;
            }
@@ -346,7 +357,7 @@
            };
            if (string.IsNullOrEmpty(room.TemperatrueDevice) == false)
            {
                temperatureRow.SetTitle(R.MyInternationalizationString.Getting);
                temperatureRow.SetTitle(room.Temperatrue == 0 ? "--℃" : $"{room.Temperatrue}℃");
                //发送获取温度的命令
                var dev = Common.LocalDevice.Current.GetDevice(room.TemperatrueDevice);
                ReadDeviceAttributeLogic.Instance.SendTemperatureStatuComand(dev);
@@ -384,7 +395,7 @@
            };
            if (string.IsNullOrEmpty(room.HumidityDevice) == false)
            {
                humidityRow.SetTitle(R.MyInternationalizationString.Getting);
                humidityRow.SetTitle(room.Humidity == 0 ? "--%" : $"{room.Humidity}%");
                //发送获取湿度的命令
                var dev = Common.LocalDevice.Current.GetDevice(room.HumidityDevice);
                ReadDeviceAttributeLogic.Instance.SendHumidityStatuComand(dev);
@@ -401,7 +412,7 @@
            }
            var confirm = new Device.CommonForm.CompleteButton(1700, 900, 127);
            confirm.SetTitle(R.MyInternationalizationString.Confrim);
            confirm.SetTitle(R.MyInternationalizationString.Save);
            AddChidren(confirm);
            confirm.MouseUpEventHandler += (sender, e) =>
            {
@@ -410,7 +421,8 @@
                room.Name = nameRow.NameText.Text.Trim();
                if (OldIconPathType != 0)
                {
                    Shared.IO.FileUtils.DeleteFile(System.IO.Path.Combine(Config.Instance.FullPath,OldBackgroundImagePath));
                    Shared.IO.FileUtils.DeleteFile(System.IO.Path.Combine(Config.Instance.FullPath, OldBackgroundImagePath));
                    HdlAutoBackupLogic.DeleteFile(OldBackgroundImagePath);
                }
                if (IconPathType == 0)
                {
@@ -419,6 +431,7 @@
                else
                {
                    Shared.IO.FileUtils.WriteFileByBytes(System.IO.Path.Combine(Config.Instance.FullPath, fileName), backGround.ImageBytes);
                    HdlAutoBackupLogic.AddOrEditorFile(fileName);
                    room.BackgroundImage = fileName;
                }
                room.BackgroundImageType = IconPathType;
ZigbeeApp/Shared/Phone/Device/Room/RoomCommon.cs
@@ -1,4 +1,6 @@
using System;
using Shared.Phone.Device.CommonForm;
namespace Shared.Phone.Device.Room
{
    public class RoomCommon
@@ -10,8 +12,7 @@
        {
            Application.RunOnMainThread(() =>
            {
                var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.TheRoomIsSharedNotAllowedToOperate), Language.StringByID(R.MyInternationalizationString.Close));
                alert.Show();
                CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.TheRoomIsSharedNotAllowedToOperate));
            });
        }
@@ -22,10 +23,8 @@
        {
            Application.RunOnMainThread(() =>
            {
                var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.NotSelectZone), Language.StringByID(R.MyInternationalizationString.Close));
                alert.Show();
                CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.NotSelectZone));
            });
        }
    }
}
ZigbeeApp/Shared/Phone/Device/Room/RoomManagement.cs
@@ -17,6 +17,10 @@
        private FrameLayout bodyFrameLayout;
        private Button floorBtn;
        /// <summary>
        /// 当前楼层id
        /// </summary>
        private string curFloorId;
        public FrameLayout itemView;
@@ -102,6 +106,7 @@
            floorBtn.Text = Config.Instance.Home.GetCurrentFloorName;
            if(Config.Instance.Home.FloorDics.Count>0)
            {
                curFloorId = Config.Instance.Home.CurrentFloorId;
                top.topView.AddChidren(floorBtn);
                top.topView.AddChidren(selectFloorBtn);
            }
@@ -118,9 +123,12 @@
        {
            var floors = new SelectFloor();
            AddChidren(floors);
            floors.changeFloor = false;
            floors.CurFloorId = curFloorId;
            floors.Init(599, 161,Direction.Right);
            floors.FloorAction += (floorId) =>
            {
                curFloorId = floorId;
                floorBtn.Text = Config.Instance.Home.GetFloorNameById(floorId);
                AddBodyView(floorId);
            };
@@ -142,6 +150,10 @@
            var roomScrolView = new VerticalScrolViewLayout { };
            bodyFrameLayout.AddChidren(roomScrolView);
            var roomList = Common.Room.CurrentRoom.GetRoomsByFloorId(floorId);
            if (roomList == null)
            {
                return;
            }
            for (int i = 0; i < roomList.Count+1; i++)
            {
                int xx = 43 + i % 2 * (20 + 487);
ZigbeeApp/Shared/Phone/Device/Room/UnallocatedRoom.cs
@@ -94,7 +94,7 @@
            InitData();
            AddTop();
            AddBodyView();
        }
        /// <summary>
@@ -250,7 +250,7 @@
        public void RefreshBodyView()
        {
            functionSceneBodyView.RemoveAll();
            if (functionBtn.IsSelected)
            {
                ShowFunction();
@@ -305,7 +305,7 @@
                    Width = Application.GetRealWidth(1028)
                };
                functionSceneBodyView.AddChidren(functionTypeScrowView);
                deviceListScrolView = new VerticalScrolViewLayout
                {
                    X = Application.GetRealWidth(CommonFormResouce.X_Left),
@@ -468,7 +468,7 @@
            add.MouseUpEventHandler += (sender, e) =>
            {
                var selectZone = new SelectZone();
                AddChidren(selectZone);
                //AddChidren(selectZone);
                selectZone.Init();
                selectZone.ZoneAction = (r) =>
                {
@@ -477,7 +477,7 @@
                        r.AddDevice(d.CommonDevice, true);
                        deviceListScrolView.RemoveViewByTag(d);
                    }
                    if (sameTypeList.Count == selectedList.Count)
                    {
                        RefreshData();
@@ -656,7 +656,7 @@
                            var frame = sceneScrolView.GetChildren(i) as FrameLayout;
                            (frame.GetChildren(1) as Button).IsSelected = (sender as Button).IsSelected;
                        }
                        if ((sender as Button).IsSelected)
                        {
                            (sender as Button).TextID = R.MyInternationalizationString.Cancel;
@@ -699,7 +699,7 @@
                add.MouseUpEventHandler += (sender, e) =>
                {
                    var selectZone = new SelectZone();
                    CommonPage.Instance.AddChidren(selectZone);
                    //CommonPage.Instance.AddChidren(selectZone);
                    selectZone.Init();
                    selectZone.ZoneAction = (r) =>
                    {
ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs
@@ -45,7 +45,7 @@
        /// </summary>
        public AbountForm()
        {
        }
        /// <summary>
        /// 画面显示(底层会固定调用此方法,借以完成画面创建)
@@ -180,7 +180,7 @@
                UpdateVersion();
            };
            updatingBtn = new Button()
            {
                Y = Application.GetRealHeight(994),
@@ -194,7 +194,7 @@
                Gravity=Gravity.CenterHorizontal
            };
            bodyFrameLayout.AddChidren(updatingBtn);
            SetDownLoadBtnNoVisible();
            CheckVersion();
        }
@@ -247,7 +247,6 @@
#if iOS
            try
            {
                    CommonPage.Loading.Start();
                    var versionResult = await RequestHttpsiOSAppVersionAsync();
                    if (versionResult == null || versionResult.Results == null)
                    {
@@ -264,14 +263,13 @@
                    {
                        return true;
                    }
                    retuun false;
                    return false;
                }
                catch
                {
            return false;
                   return false;
                }
#elif Android
            try
            {
@@ -300,7 +298,7 @@
        private async void UpdateVersion()
        {
#if iOS
            CommonPage.Instance.OpenUrl();
            OpenUrl();
#elif Android
            try
            {
@@ -351,7 +349,7 @@
        /// 获取iOS-APP版本信息
        /// </summary>
        /// <returns>The https app version async.</returns>
        public async System.Threading.Tasks.Task<ResponseEntity.ResultPack> RequestHttpsiOSAppVersionAsync()
        public async System.Threading.Tasks.Task<Common.ResponseEntity.ResultPack> RequestHttpsiOSAppVersionAsync()
        {
            try
            {
@@ -361,7 +359,7 @@
                {
                    return null;
                }
                return Newtonsoft.Json.JsonConvert.DeserializeObject<ResponseEntity.ResultPack>(Encoding.UTF8.GetString(result));
                return Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.ResultPack>(Encoding.UTF8.GetString(result));
            }
            catch
            {
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/GatewayBackupEnum.cs
@@ -34,9 +34,9 @@
        /// </summary>
        A干接点节能模式 = 6,
        /// <summary>
        /// 干接点私有属性
        /// 干接点第三级别私有属性
        /// </summary>
        A干接点私有属性 = 7,
        A干接点第三级别私有属性 = 7,
        /// <summary>
        /// 窗帘上下限位(这个东西需要在第一)
        /// </summary>
@@ -52,6 +52,10 @@
        /// <summary>
        /// 空调自定义模式
        /// </summary>
        A空调自定义模式 = 11
        A空调自定义模式 = 11,
        /// <summary>
        /// 简约面板震动功能
        /// </summary>
        A简约面板震动功能 = 12
    }
}
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs
old mode 100755 new mode 100644
@@ -1100,7 +1100,7 @@
        public MessageInfoPra()
        {
            PageSetting.PageSize = 10;
            PageSetting.PageSize = 50;
        }
    }
@@ -1222,6 +1222,10 @@
        /// 是否出力详细Log 1 -> 出力
        /// </summary>
        public int DetailedLog = 0;
        /// <summary>
        /// 显示设备历史版本 1 -> 显示
        /// </summary>
        public int DeviceHistory = 0;
    }
    #endregion
}
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameCaptionInputControl.cs
@@ -71,5 +71,22 @@
        }
        #endregion
        #region ■ 添加底线___________________________
        /// <summary>
        /// <para>添加底线(如果左边有图标,则先添加图标,再添加底线)</para>
        /// <para>它的长度为:当前控件宽度-左右固定间距-左边图片宽度(如果有)-右边的偏移量</para>
        /// </summary>
        public override NormalViewControl AddBottomLine()
        {
            var btnLine = base.AddBottomLine();
            //联动线的状态
            txtInput.btnLine = btnLine;
            return btnLine;
        }
        #endregion
    }
}
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs
@@ -53,7 +53,7 @@
        /// <para>添加底线(如果左边有图标,则先添加图标,再添加底线)</para>
        /// <para>它的长度为:当前控件宽度-左右固定间距-左边图片宽度(如果有)-右边的偏移量</para>
        /// </summary>
        public NormalViewControl AddBottomLine()
        public virtual NormalViewControl AddBottomLine()
        {
            int lineWidth = this.Width - ControlCommonResourse.XXLeft * 2 - LeftOffset - RightOffset;
            int XX = ControlCommonResourse.XXLeft + LeftOffset;
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs
@@ -649,6 +649,12 @@
                IMessageCommon.Current.IgnoreError = false;
                return false;
            }
            if (listFile.Count == 0)
            {
                //恢复
                IMessageCommon.Current.IgnoreError = false;
                return true;
            }
            //检测
            string checkKeys = UserCenterLogic.EncryptPassword(UserCenterResourse.FileEncryptKey, DirNameResourse.ShowOptionMenuFile + UserCenterResourse.UserInfo.Account);
@@ -663,6 +669,12 @@
                //出力详细Log(Debug用)
                UserCenterResourse.HideOption.DetailedLog = 1;
            }
            checkKeys = UserCenterLogic.EncryptPassword(UserCenterResourse.FileEncryptKey, DirNameResourse.DeviceHistoryFile + UserCenterResourse.UserInfo.Account);
            if (listFile.Contains(checkKeys) == true)
            {
                //显示设备历史版本(Debug用)
                UserCenterResourse.HideOption.DeviceHistory = 1;
            }
            //恢复
            IMessageCommon.Current.IgnoreError = false;
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAirConditionerLogic.cs
@@ -72,10 +72,10 @@
        #endregion
        #region ■ 打开空调___________________________
        #region ■ 关闭空调___________________________
        /// <summary>
        /// 打开空调
        /// 关闭空调
        /// </summary>
        /// <param name="device">空调对象</param>
        /// <returns></returns>
@@ -120,7 +120,7 @@
        /// <returns></returns>
        public async Task<bool> SetAcModeSupport(AC device, int data)
        {
            var result = await HdlDeviceAttributeLogic.Current.WriteDeviceAttribute(device, 513, 4099, 25, data);
            var result = await HdlDeviceAttributeLogic.Current.WriteDeviceAttribute(device, 513, 4099, 25, data.ToString());
            //检测网关返回的共通错误状态码
            string error = HdlCheckLogic.Current.CheckCommonErrorCode(result);
            if (error != null)
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAttributeLogic.cs
@@ -49,7 +49,7 @@
        /// <param name="attributeDataType">数据类型</param>
        /// <param name="attributeData">需要写入的数据</param>
        /// <returns></returns>
        public async System.Threading.Tasks.Task<CommonDevice.SetWritableValueResponAllData> WriteDeviceAttribute(CommonDevice device, int clusterId, int attributeId, int attributeDataType, int attributeData)
        public async System.Threading.Tasks.Task<CommonDevice.SetWritableValueResponAllData> WriteDeviceAttribute(CommonDevice device, int clusterId, int attributeId, int attributeDataType, string attributeData)
        {
            var MyGateway = device.Gateway;
            if (MyGateway == null)
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceCurtainLogic.cs
@@ -141,7 +141,29 @@
        /// <returns></returns>
        public async Task<bool> CommitCurtainLimitPoint(Rollershade rollershade, Rollershade.CurtainPrivateInstalledLimi limiType, int upLimit, int downLimit)
        {
            var result = await rollershade.SetCurtainInstalledLimitAsync(limiType);
            CommonDevice.SetWritableValueResponAllData result = null;
            if (upLimit == -1 && upLimit == -1)
            {
                //这个是卷帘
                result = await rollershade.SetCurtainInstalledLimitAsync(limiType);
            }
            else
            {
                if (upLimit < 0) { upLimit = 0; }
                if (downLimit < 0) { downLimit = 100; }
                //这个是开合帘 "2,0x00ff,0x00ff"格式
                string convertData = "\"2,0x" + Convert.ToString(upLimit, 16).PadLeft(4, '0');
                convertData += ",0x" + Convert.ToString(downLimit, 16).PadLeft(4, '0') + "\"";
                //然后将它们转为ASK码数值,然后再转为16进制
                //总计长度为17(这里是16进制)
                string sendData = "11";
                foreach (char c in convertData)
                {
                    sendData += Convert.ToString((int)c, 16).PadLeft(2, '0');
                }
                result = await HdlDeviceAttributeLogic.Current.WriteDeviceAttribute(rollershade, 258, 24, 65, sendData);
            }
            //检测网关返回的共通错误状态码
            string error = HdlCheckLogic.Current.CheckCommonErrorCode(result);
            if (error != null)
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs
@@ -479,12 +479,12 @@
        #region ■ 修改干接点私有属性_________________
        /// <summary>
        /// 修改干接点私有属性
        /// 修改干接点第三级别的私有属性
        /// </summary>
        /// <param name="panel">干接点对象</param>
        /// <param name="i_value">干接点的第三级别属性的值,具体请参照第三级别属性</param>
        /// <returns></returns>
        public async Task<bool> EditorDryContactFunction(Panel panel, int i_value)
        public async Task<bool> EditorDryContactThirdFunction(Panel panel, int i_value)
        {
            var result = await panel.ConfigureHdlKeyValueAsync((Panel.KeyMode)i_value);
            //共通错误检测
@@ -537,7 +537,7 @@
                return false;
            }
            //备份设备
            await HdlGatewayLogic.Current.UpLoadDeviceBackupDataToGateway(panel, GatewayBackupEnum.A干接点私有属性, i_value);
            await HdlGatewayLogic.Current.UpLoadDeviceBackupDataToGateway(panel, GatewayBackupEnum.A干接点第三级别私有属性, i_value);
            return true;
        }
@@ -707,7 +707,13 @@
                    errorMsg = UserCenterLogic.CombineGatewayTimeOutMsg(errorMsg, null, "回复超时", false);
                }
                this.ShowTipMsg(errorMsg);
                return false;
            }
            //备份设备
            HdlThreadLogic.Current.RunThread(async () =>
            {
                await HdlGatewayLogic.Current.UpLoadDeviceBackupDataToGateway(device, GatewayBackupEnum.A简约面板震动功能, datainfo);
            }, ShowErrorMode.NO);
            return success;
        }
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePirSensorLogic.cs
@@ -90,16 +90,13 @@
            return data.configureParamates;
        }
        #endregion
        #region ■ 获取配置信息_______________________
        /// <summary>
        /// 获取PIR传感器的【lux值】,错误时返回-1
        /// </summary>
        /// <param name="iASZone"></param>
        /// <param name="mode"></param>
        /// <returns></returns>
        public async Task<int> GetPirSensorLux(IASZone iASZone)
        public async Task<int> GetPirSensorLux(IASZone iASZone, ShowErrorMode mode = ShowErrorMode.YES)
        {
            var data = await iASZone.GetPirLuxAbilitySizeAsync();
            if (data == null || data.pirLux == -1)
@@ -108,8 +105,10 @@
                string msg = Language.StringByID(R.MyInternationalizationString.uGetPirSensorLuxFail);
                //拼接上【网关回复超时】的Msg
                msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, data);
                this.ShowErrorMsg(msg);
                if (mode == ShowErrorMode.YES)
                {
                    this.ShowErrorMsg(msg);
                }
                return -1;
            }
            return data.pirLux;
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
@@ -2379,27 +2379,27 @@
        /// <returns></returns>
        public async Task<bool> UpLoadDeviceBackupDataToGateway(CommonDevice device, GatewayBackupEnum backupEnum, object upLaodData)
        {
            //ZbGateway realWay = null;
            //if (HdlGatewayLogic.Current.GetRealGateway(ref realWay, device.CurrentGateWayId) == false)
            //{
            //    //没有找到真实物理网关
            //    return false;
            //}
            //string fileName = device.FilePath + ((int)backupEnum).ToString().PadLeft(5, '0');
            ////创建文件对象
            //var result = await realWay.CreateFileAsync(fileName);
            //if (result == null || result.Result != 0)
            //{
            //    return false;
            //}
            ////发送数据流
            //var data = Newtonsoft.Json.JsonConvert.SerializeObject(upLaodData);
            //var byteData = System.Text.Encoding.UTF8.GetBytes(data);
            //var result2 = await realWay.SendFileAsync(byteData);
            //if (result2 == null || result2.Result != 0)
            //{
            //    return false;
            //}
            ZbGateway realWay = null;
            if (HdlGatewayLogic.Current.GetRealGateway(ref realWay, device.CurrentGateWayId) == false)
            {
                //没有找到真实物理网关
                return false;
            }
            string fileName = device.FilePath + ((int)backupEnum).ToString().PadLeft(5, '0');
            //创建文件对象
            var result = await realWay.CreateFileAsync(fileName);
            if (result == null || result.Result != 0)
            {
                return false;
            }
            //发送数据流
            var data = Newtonsoft.Json.JsonConvert.SerializeObject(upLaodData);
            var byteData = System.Text.Encoding.UTF8.GetBytes(data);
            var result2 = await realWay.SendFileAsync(byteData);
            if (result2 == null || result2.Result != 0)
            {
                return false;
            }
            return true;
        }
@@ -2568,10 +2568,10 @@
                int level = Convert.ToInt32(recoverData["level"]);
                result = await HdlDevicePanelLogic.Current.SetDeviceEnergyConservationMode((Panel)device, modeEnable, modeTime, level);
            }
            else if (backType == GatewayBackupEnum.A干接点私有属性)
            else if (backType == GatewayBackupEnum.A干接点第三级别私有属性)
            {
                var recoverData = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(System.Text.Encoding.UTF8.GetString(byteData));
                result = await HdlDevicePanelLogic.Current.EditorDryContactFunction((Panel)device, recoverData);
                result = await HdlDevicePanelLogic.Current.EditorDryContactThirdFunction((Panel)device, recoverData);
            }
            else if (backType == GatewayBackupEnum.A窗帘方向)
            {
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs
@@ -51,8 +51,8 @@
        /// <param name="gatewayId">网关ID</param>
        /// <param name="topic">整个主题</param>
        /// <param name="reportTopic">上报数据的主题</param>
        /// <param name="receiveData">接收的数据</param>
        public void GatewayOverallMsgReceive(string gatewayId, string topic, string reportTopic, JObject receiveData)
        /// <param name="msgData">接收的数据</param>
        public void GatewayOverallMsgReceive(string gatewayId, string topic, string reportTopic, string msgData)
        {
            if (topic == "AppNoLogin")
            {
@@ -67,7 +67,7 @@
                });
                return;
            }
            else if (topic == "BeingSqueezedOffline")
            else if (topic == "ZigbeeGateWayToClient/" + Common.Config.Instance.ConnEmqClientId + "/Push/NotifySqueeze")
            {
                HdlThreadLogic.Current.RunMain(() =>
                {
@@ -93,8 +93,8 @@
                });
                return;
            }
            else if (topic == "/ZigbeeGateWayToClient/" + Common.Config.Instance.Guid + "/Push/Deleted"
                || topic == "/ZigbeeGateWayToClient/" + Common.Config.Instance.Guid + "/Push/DeletedShareData")
            else if (topic == "ZigbeeGateWayToClient/" + Common.Config.Instance.Guid + "/Push/Deleted"
                || topic == "ZigbeeGateWayToClient/" + Common.Config.Instance.Guid + "/Push/DeletedShareData")
            {
                if (UserCenterResourse.UserInfo.AuthorityNo == 3)
                {
@@ -117,52 +117,51 @@
                    //不是自己绑定的网关,则不处理
                    return;
                }
                //设备属性上报
                if (reportTopic == "DeviceStatusReport")
                {
                    //设备属性上报
                    this.DeviceAttributeReportPush(receiveData);
                    this.DeviceAttributeReportPush(JObject.Parse(msgData));
                }
                //传感器上报
                else if (reportTopic == "IASInfoReport")
                {
                    this.SensorDeviceReportPush(receiveData);
                    this.SensorDeviceReportPush(JObject.Parse(msgData));
                }
                //门锁上报
                else if (topic == gatewayId + "/Alarms/SendAlarmInform")
                {
                    this.DoorLockDeviceReportPush(receiveData);
                    this.DoorLockDeviceReportPush(null);
                }
                //通过外部方式布防撤防成功时报告
                else if (topic == gatewayId + "/Security/EnOrWithdrawSucceedReport")
                {
                    this.SecurityEnOrWithdrawSucceedReport(receiveData);
                    this.SecurityEnOrWithdrawSucceedReport(JObject.Parse(msgData));
                }
                //设备在线状态更新反馈
                else if (reportTopic == "OnlineStatusChange_Respon")
                {
                    this.DeviceOnlineChangePush(receiveData);
                    this.DeviceOnlineChangePush(JObject.Parse(msgData));
                }
                //撤防
                else if (topic == gatewayId + "/Security/WithdrawMode_Respon")
                {
                    this.RemoveSafetyGarrisonPush(receiveData);
                    this.RemoveSafetyGarrisonPush(JObject.Parse(msgData));
                }
                //布防
                else if (topic == gatewayId + "/Security/EnableMode_Respon")
                {
                    this.SetSafetyGarrisonPush(receiveData);
                    this.SetSafetyGarrisonPush(JObject.Parse(msgData));
                }
                //逻辑触发上报
                else if (topic == gatewayId + "/Logic/Execute_Respon")
                {
                    this.LogicExecutePush(receiveData);
                    this.LogicExecutePush(null);
                }
                //场景触发上报
                else if (topic == gatewayId + "/Scene/Exec_Respon")
                {
                    this.SceneExecPush(receiveData);
                    this.SceneExecPush(null);
                }
            }
            catch (Exception ex)
@@ -233,7 +232,7 @@
        private void DoorLockDeviceReportPush(JObject receiveData)
        {
            //保存门锁信息到本地
            HdlAlarmsLogic.Current.SaveDoorLockAlarmInfo(receiveData);
            //HdlAlarmsLogic.Current.SaveDoorLockAlarmInfo(receiveData);
            //显示有新消息的特效
            this.ShowHadNewMessageAppeal();
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
@@ -824,6 +824,16 @@
                //消息记录重新读取及检测
                ControlCommonResourse.ReadMessageAgain = true;
                ControlCommonResourse.HadNewMessage = false;
                HdlThreadLogic.Current.RunMain(() =>
                {
                    for (int i = 0; i < ControlCommonResourse.listMessageManaContr.Count; i++)
                    {
                        //显示角标特效
                        ControlCommonResourse.listMessageManaContr[i].IsSelected = false;
                    }
                });
                //加载账号配置信息
                var optionInfo = UserCenterResourse.Option.Load();
                UserCenterResourse.Option = optionInfo;
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs
@@ -132,6 +132,10 @@
        /// </summary>
        public const string DetailedLogFile = "DetailedLogFile";
        /// <summary>
        /// 显示设备历史版本的【标识文件】,不加密
        /// </summary>
        public const string DeviceHistoryFile = "DeviceHistoryFile";
        /// <summary>
        /// 功能备份的名字  这个东西不加密
        /// </summary>
        public const string OptionBackupName = "##Option##";
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs
@@ -45,19 +45,17 @@
        FrameLayout blankFrameLayout;//空数据显示布局
        List<int> typeModeList;//动态获取按键支持的模式大类型
        public List<ScenesListInfo> gwScenesList = new List<ScenesListInfo>();//网关中的场景列表
        bool IsRead = false;
        #endregion
        //初始化按键数据
        private void InitListInfo()
        void InitListInfo()
        {
            System.Threading.Tasks.Task.Run(async () =>
            {
                try
                {
                    Application.RunOnMainThread(() =>
                    {
                    });
                    localDeviceList.Clear();
                    scList.Clear();
                    //获取本地设备列表
@@ -73,15 +71,8 @@
                    {
                        gwScenesList = gwSceneObj.getSceneInfo.ScenesList;
                    }
                    else
                    {
                        Application.RunOnMainThread(() =>
                        {
                            CommonPage.Loading.Hide();
                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                        });
                    }
                    //动态获取按键支持的大类
                    typeModeList = await GetTypeMode();
                    #region 读取面板当前模式
                    //读取按键当前模式
                    var tempDeata = await currentKey.ReadPanelConfigureInfoAsync();
@@ -108,76 +99,78 @@
                            }
                            currentKey.ReSave();
                            //读取按键当前绑定目标
                            var getBindList = await currentKey.GetDeviceBindAsync();
                            var bindDeviceListTemp = new System.Collections.Generic.List<BindListResponseObj> { };
                            var bindSceneListTemp = new System.Collections.Generic.List<BindListResponseObj> { };
                            if (getBindList != null && getBindList.getAllBindResponseData != null)
                            GetDeviceBindResponseAllData getBindList = null;
                            if (IsRead)
                            {
                                currentKey.bindList.Clear();
                                foreach (var b in getBindList.getAllBindResponseData.BindList)
                                getBindList = await currentKey.GetDeviceBindAsync();
                                var bindDeviceListTemp = new System.Collections.Generic.List<BindListResponseObj> { };
                                var bindSceneListTemp = new System.Collections.Generic.List<BindListResponseObj> { };
                                if (getBindList != null && getBindList.getAllBindResponseData != null)
                                {
                                    if (b.BindCluster == currentClusterID)
                                    currentKey.bindList.Clear();
                                    foreach (var b in getBindList.getAllBindResponseData.BindList)
                                    {
                                        if (b.BindCluster == 6)
                                        if (b.BindCluster == currentClusterID)
                                        {
                                            if (b.BindCluster == 6)
                                            {
                                            if (b.BindType == 2)
                                            {
                                                bindSceneListTemp.Add(b);
                                            }
                                            else
                                            {
                                                bindDeviceListTemp.Add(b);
                                            }
                                        }
                                        else
                                        {
                                            if (currentClusterID == 8)
                                            {
                                                if (b.BindCluster == 8)
                                                if (b.BindType == 2)
                                                {
                                                    currentKey.bindList.Add(b);
                                                    bindSceneListTemp.Add(b);
                                                }
                                                else
                                                {
                                                    bindDeviceListTemp.Add(b);
                                                }
                                            }
                                            else
                                            {
                                                currentKey.bindList.Add(b);
                                                if (currentClusterID == 8)
                                                {
                                                    if (b.BindCluster == 8)
                                                    {
                                                        currentKey.bindList.Add(b);
                                                    }
                                                }
                                                else
                                                {
                                                    currentKey.bindList.Add(b);
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                            else
                            {
                                Application.RunOnMainThread(() =>
                                else
                                {
                                    new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                });
                            }
                            if (currentKey.panelMode == 1)
                            {
                                currentKey.bindList = bindSceneListTemp;
                                currentKey.currentKeySelectModeText = Language.StringByID(R.MyInternationalizationString.AddScene);
                            }
                            else if (currentKey.panelMode == 100 || currentKey.panelMode == 101 || currentKey.panelMode == 102)
                            {
                                currentKey.bindList = bindDeviceListTemp;
                                currentKey.currentKeySelectModeText = Language.StringByID(R.MyInternationalizationString.AddSwitch);
                            }
                            else if (currentKey.panelMode == 200 || currentKey.panelMode == 201 || currentKey.panelMode == 203 || currentKey.panelMode == 204 || currentKey.panelMode == 205)
                            {
                                currentKey.currentKeySelectModeText = Language.StringByID(R.MyInternationalizationString.AddDimmer);
                            }
                            else if (currentKey.panelMode == 300 || currentKey.panelMode == 301 || currentKey.panelMode == 302 || currentKey.panelMode == 303 || currentKey.panelMode == 304)
                            {
                                currentKey.currentKeySelectModeText = Language.StringByID(R.MyInternationalizationString.AddCurtain);
                                    Application.RunOnMainThread(() =>
                                    {
                                        CommonPage.Loading.Hide();
                                        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                                        return;
                                    });
                                }
                                if (currentKey.panelMode == 1)
                                {
                                    currentKey.bindList = bindSceneListTemp;
                                    currentKey.currentKeySelectModeText = Language.StringByID(R.MyInternationalizationString.AddScene);
                                }
                                else if (currentKey.panelMode == 100 || currentKey.panelMode == 101 || currentKey.panelMode == 102)
                                {
                                    currentKey.bindList = bindDeviceListTemp;
                                    currentKey.currentKeySelectModeText = Language.StringByID(R.MyInternationalizationString.AddSwitch);
                                }
                                else if (currentKey.panelMode == 200 || currentKey.panelMode == 201 || currentKey.panelMode == 203 || currentKey.panelMode == 204 || currentKey.panelMode == 205)
                                {
                                    currentKey.currentKeySelectModeText = Language.StringByID(R.MyInternationalizationString.AddDimmer);
                                }
                                else if (currentKey.panelMode == 300 || currentKey.panelMode == 301 || currentKey.panelMode == 302 || currentKey.panelMode == 303 || currentKey.panelMode == 304)
                                {
                                    currentKey.currentKeySelectModeText = Language.StringByID(R.MyInternationalizationString.AddCurtain);
                                }
                            }
                        }
                        #endregion
                        //动态获取按键支持的大类
                        typeModeList = await GetTypeMode();
                        #endregion
                        Application.RunOnMainThread(() =>
                        {
                            RefreshList();
@@ -189,7 +182,6 @@
                        Application.RunOnMainThread(() =>
                        {
                            CommonPage.Loading.Hide();
                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                        });
                        return;
@@ -310,6 +302,14 @@
            #endregion
            CommonPage.Loading.Start("");
            middleFrameLayout();
            if (currentKey.bindList.Count == 0)
            {
                IsRead = true;
            }
            else
            {
                IsRead = false;
            }
            InitListInfo();
        }
@@ -325,6 +325,7 @@
            midVerticalRefreshLayout.BeginHeaderRefreshingAction += () =>
            {
                midVerticalRefreshLayout.BeginHeaderRefreshing();
                IsRead = true;
                InitListInfo();
                midVerticalRefreshLayout.EndHeaderRefreshing();
            };
@@ -639,7 +640,7 @@
                         }
                         CommonPage.Loading.Hide();
                     }
                 };
                 };
            };
        }
@@ -856,7 +857,7 @@
                                         currentKey.currentKeySelectModeText = oldKeySelectModeText;
                                         dialog.Close();
                                     }
                                 };
                                 };
                            }
                        }
                        else
@@ -909,7 +910,7 @@
                                         currentKey.currentKeySelectModeText = oldKeySelectModeText;
                                         dialog.Close();
                                     }
                                 };
                                 };
                            }
                        }
                        else
ZigbeeApp/Shared/Phone/UserCenter/Device/Curtain/AutoOpenDirectionAndLimitSettionForm.cs
@@ -118,9 +118,13 @@
                    HdlLogLogic.Current.WriteLog(ex, msg);
                    //出现未知错误
                    this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnKnownError));
                    this.listView.RemoveAll();
                    //设备异常补救 -> 添加重置电机行
                    this.AddElectricalMachineryRow();
                    try
                    {
                        this.listView.RemoveAll();
                        //设备异常补救 -> 添加重置电机行
                        this.AddElectricalMachineryRow();
                    }
                    catch (Exception ex2) { HdlLogLogic.Current.WriteLog(ex2, "开合帘补救异常"); }
                }
            });
        }
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceDryContactSettionForm.cs
@@ -335,7 +335,7 @@
                            //选择的是传感器输入
                            value = 65535;
                        }
                        var result = await HdlDevicePanelLogic.Current.EditorDryContactFunction((Panel)nowSelectDevice, value);
                        var result = await HdlDevicePanelLogic.Current.EditorDryContactThirdFunction((Panel)nowSelectDevice, value);
                        if (result == true)
                        {
                            //重新初始化菜单行,隐藏或者开放绑定目标菜单
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFirmwareUpdateForm.cs
@@ -81,6 +81,10 @@
        /// </summary>
        private void InitTopRightMenu()
        {
            if (UserCenterResourse.HideOption.DeviceHistory != 1)
            {
                return;
            }
            var btnIcon = new MostRightIconControl(69, 69);
            btnIcon.UnSelectedImagePath = "Item/More.png";
            topFrameLayout.AddChidren(btnIcon);
ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorBindTargetSettionForm.cs
@@ -94,11 +94,29 @@
            this.ClearBodyFrame();
            //当前亮度值
            string txtValue = Language.StringByID(R.MyInternationalizationString.uNowBrightnessValue);
            var frameNowLinght = new FrameRowControl();
            frameNowLinght.UseClickStatu = false;
            frameNowLinght.BackgroundColor = UserCenterColor.Current.White;
            bodyFrameLayout.AddChidren(frameNowLinght);
            frameNowLinght.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uNowBrightnessValue) + ":" + pirLuxValue + "lux", 900);
            var btnLux = frameNowLinght.AddLeftCaption(txtValue + ":" + pirLuxValue + "lux", 900);
            HdlThreadLogic.Current.RunThread(async () =>
            {
                while (this.Parent != null)
                {
                    //他们说这个东西要2秒刷新一次  获取PIR传感器的【lux值】
                    this.pirLuxValue = await HdlDevicePirSensorLogic.Current.GetPirSensorLux(deviceIASZone, ShowErrorMode.NO);
                    if (pirLuxValue != -1)
                    {
                        HdlThreadLogic.Current.RunMain(() =>
                        {
                            btnLux.Text = txtValue + ":" + pirLuxValue + "lux";
                        }, ShowErrorMode.NO);
                    }
                    await Task.Delay(2000);
                }
            }, ShowErrorMode.NO);
            var listView = new VerticalListControl(0);
            listView.Y = Application.GetRealHeight(150);
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UnLockMethod.cs
@@ -25,10 +25,6 @@
                        var doorLock = tempDevice as ZigBee.Device.DoorLock;
                        if (doorLock.doorLockProgrammingEventNotificationCommand != null)
                        {
                            Application.RunOnMainThread(() =>
                            {
                            });
                        }
                    }
                }
@@ -446,8 +442,8 @@
                                             }
                                             else
                                             {
                                                //开关图标
                                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.RemoveFailed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnDoorlockUser);
                                                 //开关图标
                                                 new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.RemoveFailed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnDoorlockUser);
                                             }
                                         }
                                         else
@@ -522,7 +518,7 @@
                             {
                                 CommonPage.Loading.Hide();
                             }
                         };
                         };
                    };
                    #endregion
@@ -612,10 +608,10 @@
                             new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnDoorlockUser);
                         }
                     };
                    btnDoorlockUser.EditorEnterAction += action;
                    btnDoorlockUser.EditorEnterAction += action;
                    #endregion
                    i++;
                }
                }
            }
        }
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserManagement.cs
@@ -27,11 +27,17 @@
        public UserManagement(ZigBee.Device.DoorLock doorLock)
        {
            this.doorLock = doorLock;
            localAllAccountListTemp = doorLock.localAllAccountList;
            localDoorLockUserListTemp = doorLock.localDoorLockUserList;
        }
        #region ◆ 变量申明__________________________
        ZigBee.Device.DoorLock doorLock;
        VerticalRefreshLayout midVerticalScrolViewLayout;
        public List<Shared.Phone.UserCenter.MemberInfoRes> localAllAccountListTemp = new List<Shared.Phone.UserCenter.MemberInfoRes> { };
        public Dictionary<int, DoorLockCommonInfo.LocaDoorLockObj> localDoorLockUserListTemp = new Dictionary<int, DoorLockCommonInfo.LocaDoorLockObj>();
        #endregion
        /// <summary>
@@ -48,6 +54,7 @@
                    {
                        doorLock.localAllAccountList.Clear();
                        doorLock.localAllAccountList = localAccountListTemp;
                        localAllAccountListTemp = doorLock.localAllAccountList;
                        //初始化权限信息
                        foreach (var sub in localAccountListTemp)
@@ -67,7 +74,11 @@
                        }
                        //获取本地门锁列表
                        var list = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetDoorLockAllAcountUserlist(doorLock);
                        if (localDoorLockUserListTemp.Count == 0)
                        {
                            var list = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetDoorLockAllAcountUserlist(doorLock);
                            localDoorLockUserListTemp = doorLock.localDoorLockUserList;
                        }
                        doorLock.ReSave();
                    }
                    else
@@ -129,10 +140,10 @@
                TextID = R.MyInternationalizationString.Undistributed,
                TextColor = Shared.Common.ZigbeeColor.Current.XMTopTitleText,
                X = btnUndistributeIcon.Right,
                IsBold =true,
                TextSize =13,
                TextAlignment = TextAlignment.CenterLeft,
             };
                IsBold = true,
                TextSize = 13,
                TextAlignment = TextAlignment.CenterLeft,
            };
            btnAddFrameLayout.AddChidren(btnUndistributeText);
            if (UserCenterResourse.UserInfo.AuthorityNo != 1)
            {
@@ -154,8 +165,15 @@
            };
            this.midFrameLayout.AddChidren(midVerticalScrolViewLayout);
            CommonPage.Loading.Start("Loading...");
            ReadAccountDoorLockInfoList();
            if (localAllAccountListTemp.Count == 0)
            {
                CommonPage.Loading.Start("Loading...");
                ReadAccountDoorLockInfoList();
            }
            else
            {
                MidFrameLayoutContent();
            }
            midVerticalScrolViewLayout.BeginHeaderRefreshingAction += () =>
            {
ZigbeeApp/Shared/Phone/UserCenter/Gateway/Update/GatewayFirmwareUpdateForm.cs
@@ -261,6 +261,10 @@
        /// </summary>
        private void InitTopRightMenu()
        {
            if (UserCenterResourse.HideOption.DeviceHistory != 1)
            {
                return;
            }
            var btnIcon = new MostRightIconControl(69, 69);
            btnIcon.UnSelectedImagePath = "Item/More.png";
            topFrameLayout.AddChidren(btnIcon);
ZigbeeApp/Shared/Phone/UserCenter/Suggestion/FeedbackForm.cs
@@ -54,7 +54,7 @@
            //字数
            var btnFild = new NormalViewControl(120, 60, true);
            btnFild.X = frameInput.Width - ControlCommonResourse.XXLeft - Application.GetRealWidth(80);
            btnFild.X = frameInput.Width - ControlCommonResourse.XXLeft - Application.GetRealWidth(120);
            btnFild.Y = Application.GetRealHeight(503);
            btnFild.TextColor = UserCenterColor.Current.TextGrayColor1;
            btnFild.TextSize = 12;
@@ -285,14 +285,58 @@
                    HdlThreadLogic.Current.RunMain(() =>
                    {
                        this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.uSubmitSuccessMsg));
                        //关闭界面
                        this.CloseForm();
                        //显示成功的界面
                        this.ShowSuccessMsg();
                    });
                }
            });
        }
        /// <summary>
        /// 显示成功的界面
        /// </summary>
        private void ShowSuccessMsg()
        {
            var frameBack = new FrameLayout();
            frameBack.BackgroundColor = 0x80000000;
            this.AddChidren(frameBack);
            var frameMsg = new FrameLayout();
            frameMsg.BackgroundColor = UserCenterColor.Current.White;
            frameMsg.Width = Application.GetRealWidth(622);
            frameMsg.Height = Application.GetRealHeight(317);
            frameMsg.Radius = (uint)Application.GetRealHeight(17);
            frameMsg.Gravity = Gravity.CenterHorizontal;
            frameMsg.Y = Application.GetRealHeight(792);
            frameBack.AddChidren(frameMsg);
            //提示
            var btnTitle = new NormalViewControl(492, 65, true);
            btnTitle.Y = Application.GetRealHeight(68);
            btnTitle.Gravity = Gravity.CenterHorizontal;
            btnTitle.TextID = R.MyInternationalizationString.NormalTip;
            btnTitle.TextAlignment = TextAlignment.Center;
            btnTitle.TextColor = 0xFF333443;
            frameMsg.AddChidren(btnTitle);
            //您的反馈已成功提交
            var btnSuccess = new NormalViewControl(frameMsg.Width, Application.GetRealHeight(60), false);
            btnSuccess.Y = Application.GetRealHeight(166);
            btnSuccess.TextAlignment = TextAlignment.Center;
            btnSuccess.TextColor = UserCenterColor.Current.TextGrayColor1;
            btnSuccess.TextID = R.MyInternationalizationString.uSubmitSuccessMsg;
            frameMsg.AddChidren(btnSuccess);
            HdlThreadLogic.Current.RunThread(() =>
            {
                System.Threading.Thread.Sleep(2000);
                HdlThreadLogic.Current.RunMain(() =>
                {
                    this.CloseForm();
                });
            });
        }
        #endregion
    }
}
ZigbeeApp/Shared/Phone/UserCenter/UserMain/MessageManagementForm.cs
old mode 100755 new mode 100644
@@ -91,7 +91,23 @@
                //数据异常
                return;
            }
            HdlThreadLogic.Current.RunMain(() =>
            {
                //清空
                listView.RemoveAll();
            });
            if (dicData.Count == 0)
            {
                //关闭进度条
                this.CloseProgressBar();
                HdlThreadLogic.Current.RunMain(() =>
                {
                    //关闭刷新特效
                    listView.EndHeaderRefreshing();
                    listView.frameTable.Height = listView.Height;
                });
                return;
            }
            //初始化中部控件
            this.InitMiddleFrame(dicData);
        }
@@ -114,7 +130,7 @@
                maxCount += data.Count;
            }
            int waiTime = 1000;
            int waiTime = 500;
            foreach (var keys in dicData.Keys)
            {
                var listGroup = dicData[keys];
@@ -168,7 +184,7 @@
                    });
                    //第一次的时候,等待的时候久一点
                    System.Threading.Thread.Sleep(waiTime);
                    waiTime = 500;
                    waiTime = 300;
                }
            }
        }
ZigbeeApp/Shared/Phone/UserView/SafetyShortcutControl.cs
@@ -43,7 +43,7 @@
            var bg = new Button
            {
                X = Application.GetRealWidth(485),
                X = Application.GetRealWidth(495),
                Y = Application.GetRealHeight(161),
                Width = Application.GetRealWidth(449),
                Height = Application.GetRealHeight(495),
@@ -53,7 +53,7 @@
            var bg1 = new FrameLayout
            {
                X = Application.GetRealWidth(485),
                X = Application.GetRealWidth(495),
                Y = Application.GetRealHeight(161),
                Width = Application.GetRealWidth(449),
                Height = Application.GetRealHeight(495),
@@ -110,9 +110,9 @@
                atHome.IsSelected = true;
                tempRow = atHome;
            }
            atHome.ClickBtn.MouseUpEventHandler += (sender, e) =>
            atHome.ButtonClickEvent += (sender, e) =>
            {
                if((sender as Button).IsSelected)
                if(sender.IsSelected)
                {
                    dialog.Close();
                    return;
@@ -127,10 +127,10 @@
                        dialog.Close();
                        if(result == GarrisonMode.AtHome)
                        {
                        }
                    });
                })
                { IsBackground = true }.Start();
            };
@@ -146,9 +146,9 @@
                withdrawGarriso.IsSelected = true;
                tempRow = withdrawGarriso;
            }
            withdrawGarriso.ClickBtn.MouseUpEventHandler += (sender, e) =>
            withdrawGarriso.ButtonClickEvent += (sender, e) =>
            {
                if ((sender as Button).IsSelected)
                if (sender.IsSelected)
                {
                    dialog.Close();
                    return;
@@ -179,9 +179,9 @@
            {
                atHome.IsSelected = true;
            }
            atHome.ClickBtn.MouseUpEventHandler += (sender, e) =>
            atHome.ButtonClickEvent += (sender, e) =>
            {
                if ((sender as Button).IsSelected)
                if (sender.IsSelected)
                {
                    dialog.Close();
                    return;
@@ -206,9 +206,9 @@
            {
                removeHome.IsSelected = true;
            }
            removeHome.ClickBtn.MouseUpEventHandler += (sender, e) =>
            removeHome.ButtonClickEvent += (sender, e) =>
            {
                if ((sender as Button).IsSelected)
                if (sender.IsSelected)
                {
                    dialog.Close();
                    return;
@@ -233,9 +233,9 @@
            {
                withdrawGarriso.IsSelected = true;
            }
            withdrawGarriso.ClickBtn.MouseUpEventHandler += (sender, e) =>
            withdrawGarriso.ButtonClickEvent += (sender, e) =>
            {
                if ((sender as Button).IsSelected)
                if (sender.IsSelected)
                {
                    dialog.Close();
                    return;
ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs
@@ -329,6 +329,65 @@
                                            }
                                        }
                                        break;
                                    case DeviceType.TemperatureSensor:
                                        //温度
                                        if (common.DeviceStatusReport.CluterID == 1026)
                                        {
                                            var tempera = deviceUI.CommonDevice as TemperatureSensor;
                                            foreach (var data in common.DeviceStatusReport.AttriBute)
                                            {
                                                if (data.AttributeId == (int)ZigBee.Device.AttriButeId.MeasuredValue)
                                                {
                                                    if (data.AttriButeData == 0)
                                                    {
                                                        tempera.Temperatrue = 0;
                                                    }
                                                    else if (data.AttriButeData > 32767)
                                                    {
                                                        //负数(特殊处理)
                                                        string strValue = (data.AttriButeData - 65536).ToString();
                                                        //小数点需要一位
                                                        strValue = strValue.Substring(0, strValue.Length - 1);
                                                        tempera.Temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                                                    }
                                                    else
                                                    {
                                                        //小数点需要一位
                                                        string strValue = data.AttriButeData.ToString();
                                                        strValue = strValue.Substring(0, strValue.Length - 1);
                                                        tempera.Temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                                                    }
                                                    tempera.LastDateTime = DateTime.Now;
                                                    (rowFL.GetChildren(j) as FunctionMainView).StatuButton.Text = deviceUI.GetDeviceStatu();
                                                }
                                            }
                                        }
                                        //湿度
                                        if (common.DeviceStatusReport.CluterID == 1029)
                                        {
                                            var tempera = deviceUI.CommonDevice as TemperatureSensor;
                                            foreach (var data in common.DeviceStatusReport.AttriBute)
                                            {
                                                if (data.AttributeId == (int)ZigBee.Device.AttriButeId.MeasuredValue)
                                                {
                                                    if (data.AttriButeData == 0)
                                                    {
                                                        tempera.Humidity = 0;
                                                    }
                                                    else
                                                    {
                                                        //小数点需要一位(湿度没有负数)
                                                        string strValue = data.AttriButeData.ToString();
                                                        strValue = strValue.Substring(0, strValue.Length - 1);
                                                        tempera.Humidity = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                                                    }
                                                    tempera.LastDateTime = DateTime.Now;
                                                    (rowFL.GetChildren(j) as FunctionMainView).StatuButton.Text = deviceUI.GetDeviceStatu();
                                                }
                                            }
                                        }
                                        break;
                                }
                            }
                        }
@@ -472,7 +531,8 @@
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = ZigbeeColor.Current.GXCTextColor,
                Text = Config.Instance.Home.GetCurrentFloorName,
                IsBold=true
                IsBold = true,
                TextSize = 14
            };
            if (Config.Instance.Home.FloorDics.Count > 0)
            {
@@ -532,143 +592,13 @@
                }
                else
                {
                    var residenceListView = new Dialog();
                    residenceListView.Show();
                    var closeBGview = new FrameLayout();
                    residenceListView.AddChidren(closeBGview);
                    closeBGview.MouseUpEventHandler += (send1, e1) =>
                    var selectHouse = new Device.Category.SelectHouse();
                    selectHouse.Init();
                    selectHouse.HouseAction = (houseId) =>
                    {
                        residenceListView.Close();
                        ChangeResidence(House.GetHouseByHouseId(houseId));
                    };
                    var bg = new Button
                    {
                        X = Application.GetRealWidth(35),
                        Y = Application.GetRealHeight(248),
                        Width = Application.GetMinRealAverage(449),
                        Height = Application.GetMinRealAverage(478),
                        UnSelectedImagePath = "Item/SelectHouse.png"
                    };
                    closeBGview.AddChidren(bg);
                    var changeHomeFL = new FrameLayout()
                    {
                        X = Application.GetRealWidth(35),
                        Y = Application.GetRealHeight(271),
                        Height = Application.GetMinRealAverage(449),
                        Width = Application.GetMinRealAverage(440),
                        Radius = CommonPage.BigFormRadius,
                        BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
                    };
                    closeBGview.AddChidren(changeHomeFL);
                    var changeHomeBtn = new Button()
                    {
                        X = Application.GetRealWidth(80),
                        Width = Application.GetRealWidth(350),
                        Height = Application.GetRealHeight(150),
                        TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                        TextID = R.MyInternationalizationString.ChangeHome,
                        TextAlignment = TextAlignment.CenterLeft
                    };
                    changeHomeFL.AddChidren(changeHomeBtn);
                    var scrolView = new VerticalScrolViewLayout()
                    {
                        Y = changeHomeBtn.Bottom,
                        Height = Application.GetMinRealAverage(305 - 10)
                    };
                    changeHomeFL.AddChidren(scrolView);
                    var clickCheckBtn = new Device.CommonForm.SelectedStatuButton();
                    var clickNameBtn = new Device.CommonForm.SelectedStatuButton();
                    foreach (var homeFilePath in Config.Instance.HomeFilePathList)
                    {
                        var home = House.GetHouseByFilePath(homeFilePath);
                        if (home == null)
                        {
                            continue;
                        }
                        var rowView = new RowLayout()
                        {
                            Height = Application.GetRealHeight(150)
                        };
                        scrolView.AddChidren(rowView);
                        var pointBtn = new Device.CommonForm.SelectedStatuButton()
                        {
                            X = Application.GetRealWidth(80),
                            Width = Application.GetMinRealAverage(80),
                            Height = Application.GetMinRealAverage(80),
                            Gravity = Gravity.CenterVertical,
                            UnSelectedImagePath = "Item/House.png",
                            SelectedImagePath = "Item/HouseSelected.png",
                            IsSelected = home.Id == Config.Instance.Home.Id
                        };
                        rowView.AddChidren(pointBtn);
                        var nameBtn = new Device.CommonForm.SelectedStatuButton()
                        {
                            X = Application.GetRealWidth(173),
                            Width = Application.GetRealWidth(280),
                            TextAlignment = TextAlignment.CenterLeft,
                            Text = home.Name,
                            TextColor = ZigbeeColor.Current.GXCTextGrayColor,
                            SelectedTextColor = ZigbeeColor.Current.GXCTextBlackColor,
                            IsSelected = home.Id == Config.Instance.Home.Id
                        };
                        if (home.IsOthreShare)
                        {
                            nameBtn.Text = $"{home.Name}";
                        }
                        rowView.AddChidren(nameBtn);
                        EventHandler<MouseEventArgs> selectedResidenceHandler = (send1, e1) =>
                        {
                            if (Config.Instance.Home.FileName == homeFilePath)
                            {
                                return;
                            }
                            clickCheckBtn.IsSelected = false;
                            clickNameBtn.IsSelected = false;
                            pointBtn.IsSelected = true;
                            nameBtn.IsSelected = true;
                            residecneName.Text = home.Name;
                            if (home.IsOthreShare)
                            {
                                nameBtn.Text = $"{home.Name}";
                            }
                            clickCheckBtn = pointBtn;
                            clickNameBtn = nameBtn;
                            residenceListView.Close();
                            ChangeResidence(home);
                        };
                        nameBtn.MouseUpEventHandler += selectedResidenceHandler;
                        pointBtn.MouseUpEventHandler += selectedResidenceHandler;
                        rowView.MouseUpEventHandler += selectedResidenceHandler;
                        if (home.Id == Config.Instance.Home.Id)
                        {
                            pointBtn.IsSelected = true;
                            nameBtn.IsSelected = true;
                            clickCheckBtn = pointBtn;
                            clickNameBtn = nameBtn;
                            residecneName.Text = home.Name;
                            if (home.IsOthreShare)
                            {
                                residecneName.Text = nameBtn.Text = $"{home.Name}";
                            }
                        }
                        else
                        {
                            pointBtn.IsSelected = false;
                            nameBtn.IsSelected = false;
                        }
                    }
                }
            };
            //消息
            messageBtn.MouseUpEventHandler += (send, e) =>
            {
            };
            #endregion
@@ -707,7 +637,7 @@
                if (roomPageView.GetChildren(roomPageView.PageIndex) != null)
                {
                    (roomPageView.GetChildren(roomPageView.PageIndex) as RoomView).HideName(false);
                }
                var functionSceneView = new FrameLayout()
@@ -803,7 +733,7 @@
                    //切换当前房间
                    Room.CurrentRoom = rList[roomPageView.PageIndex];
                    RefreshBodyView();
                };
            }
            else
@@ -846,6 +776,7 @@
            floorFL.FloorAction = (floorId) =>
            {
                floorBtn.Text = Config.Instance.Home.GetFloorNameById(floorId);
                Common.Room.CurrentRoom = Common.Room.CurrentRoom?.GetLoveRoom();
                Show();
            };
        }
@@ -1103,7 +1034,7 @@
                                                (device.CommonDevice as Rollershade).CurtainUpDownStopControl(0);
                                                ((sender as Button).Parent as FunctionMainView).SetStatuText(CommonFormResouce.GetSwitchStatu(true));
                                                ((sender as Button).Parent as FunctionMainView).SetStatuText(Language.StringByID(R.MyInternationalizationString.Open));
                                                ((sender as Button).Parent as FunctionMainView).IsSelected = true;
                                                //控制延时回调
@@ -1129,7 +1060,7 @@
                                                (device.CommonDevice as Rollershade).CurtainUpDownStopControl(1);
                                                ((sender as Button).Parent as FunctionMainView).SetStatuText(CommonFormResouce.GetSwitchStatu(false));
                                                ((sender as Button).Parent as FunctionMainView).SetStatuText(Language.StringByID(R.MyInternationalizationString.Close));
                                                ((sender as Button).Parent as FunctionMainView).IsSelected = false;
                                                //控制延时回调
@@ -1653,6 +1584,68 @@
                                    }
                                    lightView.CollectButton.MouseUpEventHandler += collectionEvent;
                                }
                                else if (device.CommonDevice.Type == DeviceType.TemperatureSensor)
                                {
                                    var tempera = device.CommonDevice as TemperatureSensor;
                                    if (tempera.Gateway != null)
                                    {
                                        new System.Threading.Thread(() =>
                                        {
                                            System.Threading.Thread.Sleep(100 * i);
                                            if (tempera.Gateway.IsVirtual)
                                            {
                                                ReadStatus(tempera, () =>
                                                {
                                                    if (tempera.SensorDiv == 1)
                                                    {
                                                        ReadDeviceAttributeLogic.Instance.SendTemperatureStatuComand(device.CommonDevice);
                                                    }
                                                    else if (tempera.SensorDiv == 2)
                                                    {
                                                        ReadDeviceAttributeLogic.Instance.SendHumidityStatuComand(device.CommonDevice);
                                                    }
                                                });
                                            }
                                            else
                                            {
                                                if (CommonPage.ReadDeviceStatuSpan < (DateTime.Now - tempera.LastDateTime).TotalSeconds)
                                                {
                                                    if (tempera.SensorDiv == 1)
                                                    {
                                                        ReadDeviceAttributeLogic.Instance.SendTemperatureStatuComand(device.CommonDevice);
                                                    }
                                                    else if (tempera.SensorDiv == 2)
                                                    {
                                                        ReadDeviceAttributeLogic.Instance.SendHumidityStatuComand(device.CommonDevice);
                                                    }
                                                }
                                            }
                                        })
                                        { IsBackground = true }.Start();
                                        var lightView = new FunctionMainView(xx, yy);
                                        itemView.AddChidren(lightView);
                                        lightView.Init();
                                        lightView.Tag = device;
                                        lightView.SetDeviceImage(device.IconPath, device.OnlineIconPath);
                                        lightView.SetStatuText(device.GetDeviceStatu());
                                        lightView.SetDeviceName(device.CommonDevice.DeviceEpointName);
                                        lightView.IsSelected = false;
                                        lightView.SetCollect(Room.CurrentRoom.IsCollectInRoom(Room.CurrentRoom, device.FileName));
                                        lightView.CanControl(false);
                                        var dev = Room.LoveRoomDeviceUIFilePathList.Find((obj) => obj == device.FileName);
                                        if (dev == null)
                                        {
                                            lightView.CollectButton.IsSelected = false;
                                        }
                                        else
                                        {
                                            lightView.CollectButton.IsSelected = true;
                                        }
                                        lightView.CollectButton.MouseUpEventHandler += collectionEvent;
                                    }
                                }
                                else if (device.CommonDevice.Type == DeviceType.DoorLock)
                                {
                                    //门锁
ZigbeeApp/Shared/Phone/UserView/UserPage.cs
@@ -248,6 +248,62 @@
                                myDevice.LastDateTime = DateTime.Now;
                            }
                            break;
                        case DeviceType.TemperatureSensor:
                            //温度
                            if (common.DeviceStatusReport.CluterID == 1026)
                            {
                                var tempera = (TemperatureSensor)myDevice;
                                foreach (var data in common.DeviceStatusReport.AttriBute)
                                {
                                    if (data.AttributeId == (int)ZigBee.Device.AttriButeId.MeasuredValue)
                                    {
                                        if (data.AttriButeData == 0)
                                        {
                                            tempera.Temperatrue = 0;
                                        }
                                        else if (data.AttriButeData > 32767)
                                        {
                                            //负数(特殊处理)
                                            string strValue = (data.AttriButeData - 65536).ToString();
                                            //小数点需要一位
                                            strValue = strValue.Substring(0, strValue.Length - 1);
                                            tempera.Temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                                        }
                                        else
                                        {
                                            //小数点需要一位
                                            string strValue = data.AttriButeData.ToString();
                                            strValue = strValue.Substring(0, strValue.Length - 1);
                                            tempera.Temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                                        }
                                    }
                                }
                            }
                            //湿度
                            if (common.DeviceStatusReport.CluterID == 1029)
                            {
                                var tempera = (TemperatureSensor)myDevice;
                                foreach (var data in common.DeviceStatusReport.AttriBute)
                                {
                                    if (data.AttributeId == (int)ZigBee.Device.AttriButeId.MeasuredValue)
                                    {
                                        if (data.AttriButeData == 0)
                                        {
                                            tempera.Humidity = 0;
                                        }
                                        else
                                        {
                                            //小数点需要一位(湿度没有负数)
                                            string strValue = data.AttriButeData.ToString();
                                            strValue = strValue.Substring(0, strValue.Length - 1);
                                            tempera.Humidity = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                                            tempera.LastDateTime = DateTime.Now;
                                        }
                                    }
                                }
                            }
                            break;
                    }
                }
                catch (Exception ex)
ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs
@@ -90,6 +90,11 @@
        /// 成员请求控制主帐号此住宅时请求基地址的LoginAccessToken的值
        /// </summary>
        public string AdminRequestToken = string.Empty;
        /// <summary>
        /// 远程连接的Mqtt的客户端ID
        /// </summary>
        [Newtonsoft.Json.JsonIgnore]
        public string ConnEmqClientId = string.Empty;
        [Newtonsoft.Json.JsonIgnore]
        /// <summary>
ZigbeeApp/Shared/Phone/ZigBee/Device/BindObj.cs
@@ -44,7 +44,6 @@
                    else if (topic == gatewayID + "/" + "Bind/SetBind_Respon")
                    {
                        var gatewayTemp = new ZbGateway() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = ZbGateway.MainGateWay.getGatewayBaseInfo.gwID };
                        //var tempBindList = Newtonsoft.Json.Linq.JArray.Parse(jobject["Data"]["BindList"].ToString());
                        var tempResult = Newtonsoft.Json.JsonConvert.DeserializeObject<AddedDeviceBindResponseData>(jobject["Data"].ToString());
                        if (tempResult == null)
                        {
@@ -52,30 +51,10 @@
                        }
                        else
                        {
                            //var dataBindRes = new AddedDeviceBindResponseData();
                            //for (int m = 0; tempBindList != null && m < tempBindList.Count; m++)
                            //{
                            //    var tempBind = tempBindList[m];
                            //    dataBindRes.BindList.Add(Newtonsoft.Json.JsonConvert.DeserializeObject<AddBindListResponseObj>(tempBind.ToString()));
                            //}
                            //if (dataBindRes != null)
                            //{
                            result = new AddedDeviceBindResponseAllData { addedDeviceBindResponseData = tempResult };
                            DebugPrintLog($"UI收到通知后的主题_{topic}");
                            //}
                        }
                    }
                    //else if (topic == gatewayID + "/" + "Bind/BindResult")
                    //{
                    //    var gatewayTemp = new ZbGateway() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = ZbGateway.MainGateWay.getGatewayBaseInfo.gwID };
                    //    var tempData = Newtonsoft.Json.JsonConvert.DeserializeObject<AddBindResultResponseData>(jobject["Data"].ToString());
                    //    if (tempData != null)
                    //    {
                    //        result = new AddedDeviceBindResponseAllData { addBindResultResponseData = tempData };
                    //    }
                    //    DebugPrintLog($"UI收到通知后的主题_{topic}");
                    //}
                };
                mainGateway.Actions += action;
                DebugPrintLog("Bind/SetBind_Actions 启动" + "_" + System.DateTime.Now.ToLongTimeString() + " " + System.DateTime.Now.Millisecond);
@@ -128,43 +107,6 @@
                        break;
                    }
                }
                if ((DateTime.Now - dateTime).TotalMilliseconds > WaitReceiveDataTime)
                {
                    result = new AddedDeviceBindResponseAllData { errorMessageBase = " 回复超时,请重新操作" };
                }
                //while ((DateTime.Now - dateTime).TotalMilliseconds < 20*1000)
                //{
                //await System.Threading.Tasks.Task.Delay(100);
                //if (result == null || result.addedDeviceBindResponseData == null)
                //{
                //    continue;
                //}
                //if (0 < result.addedDeviceBindResponseData.BindList.FindAll((obj) => obj.BindType == 0 && obj.Result == 1).Count)
                //{
                //    if (result.addBindResultResponseData != null)
                //    {
                //        break;
                //    }
                //}
                //else if (0 < result.addedDeviceBindResponseData.BindList.FindAll((obj) => obj.BindType == 0 && obj.Result == 2).Count)
                //{
                //    if (result.addBindResultResponseData != null)
                //    {
                //        break;
                //    }
                //}
                //else if (0 < result.addedDeviceBindResponseData.BindList.FindAll((obj) => obj.BindType == 0 && obj.Result == 3).Count)
                //{
                //    if (result.addBindResultResponseData != null)
                //    {
                //        break;
                //    }
                //}
                //else
                //{
                //    break;
                //}
                //}
                if ((DateTime.Now - dateTime).TotalMilliseconds > 20 * 1000)
                {
                    result = new AddedDeviceBindResponseAllData { errorMessageBase = " 回复超时,请重新操作" };
ZigbeeApp/Shared/Phone/ZigBee/Device/TemperatureSensor.cs
@@ -10,6 +10,15 @@
        /// </summary>
        public int SensorDiv = 1;
        /// <summary>
        /// 温度
        /// </summary>
        public decimal Temperatrue;
        /// <summary>
        /// 湿度
        /// </summary>
        public decimal Humidity;
        public TemperatureSensor()
        {
            this.Type = DeviceType.TemperatureSensor ;
ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs
@@ -3391,6 +3391,8 @@
                                    //订阅一个分享数据已经变更的主题
                                    await RemoteMqttClient.SubscribeAsync("/ZigbeeGateWayToClient/" + myGuid + "/Push/DeletedShareData");
                                }
                                //订阅一个挤下线的主题
                                await RemoteMqttClient.SubscribeAsync("/ZigbeeGateWayToClient/" + Config.Instance.ConnEmqClientId + "/Push/NotifySqueeze");
                                await initGateWayBaseInfomation();
                                Shared.Phone.UserCenter.HdlGatewayLogic.Current.CheckGatewayByConnectChanged(Shared.Phone.UserCenter.GatewayConnectMode.Remote);
@@ -3482,6 +3484,8 @@
                                var connEmqClientId = responseData["ConnEmqClientId"]?.ToString();
                                var connEmqUserName = responseData["ConnEmqUserName"]?.ToString();
                                var connEmqPwd = responseData["ConnEmqPwd"]?.ToString();
                                //记录起当前的客户端ID
                                Config.Instance.ConnEmqClientId = connEmqClientId;
                                var connEmqDomainPorts = connEmqDomainPort.Replace("//", "").Split(':');
                                var domain = connEmqDomainPorts[1];
@@ -3884,7 +3888,10 @@
                    epoint = topic.Split('/')[3];
                    cluID = topic.Split('/')[4];
                    attrId = topic.Split('/')[5];
                }
                }
                //全局接收网关推送的的逻辑(为了执行速度,尽可能的别加耗时的操作)
                Shared.Phone.UserCenter.HdlGatewayReceiveLogic.Current.GatewayOverallMsgReceive(gatewayID, topic, reportStatus, message);
                var gwa = GateWayList.Find(obj => obj.getGatewayBaseInfo.gwID == gatewayID);
                if (gwa == null)
@@ -3916,9 +3923,6 @@
                {
                    jobject = Newtonsoft.Json.Linq.JObject.Parse(message);
                }
                //全局接收网关推送的的逻辑(为了执行速度,尽可能的别加耗时的操作)
                Shared.Phone.UserCenter.HdlGatewayReceiveLogic.Current.GatewayOverallMsgReceive(gatewayID, topic, reportStatus, jobject);
                #region 远程,主网关上报通知
                if (IsRemote)
ZigbeeApp/Shared/R.cs
@@ -379,7 +379,7 @@
        public readonly static int Sunrisesunset = 5134;
        public readonly static int cycle = 5135;
        public readonly static int completeNext = 5136;
        public readonly static int Selectedtimetype = 5137;
        public readonly static int Selectedtimetype= 5137;
        public readonly static int Timecondition = 5138;
        public readonly static int condition = 5139;
        public readonly static int pushset = 5140;
@@ -591,6 +591,7 @@
        public readonly static int application = 5376;
        public readonly static int automationaddtext = 5377;
        public readonly static int tiptextnull = 5378;
        public readonly static int tiplocktextnull = 5379;
        #region 登录注册
        /// <summary>
@@ -893,7 +894,7 @@
        /// <summary>
        /// 没有功能 请在个人中心中--设备管理处添加
        /// 没有功能 请在个人中心--设备管理处添加
        /// </summary>
        public const int NoFunction = 11010;
        /// <summary>
@@ -4722,7 +4723,7 @@
        /// </summary>
        public const int uSubmit = 15922;
        /// <summary>
        /// 提交成功,感谢您的意见
        /// 您的反馈已成功提交
        /// </summary>
        public const int uSubmitSuccessMsg = 15923;
        /// <summary>
ZigbeeApp/Shared/Shared.projitems
@@ -33,6 +33,7 @@
    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Category\SelectDelayTime.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Category\SelectDevice.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Category\SelectFloor.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Category\SelectHouse.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Category\SelectScene.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\ACLeftIconButtonRowLayout.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\BackButton.cs" />