gxc
2020-01-06 509e7b543f8a8770cf09dff97000acf78140c119
2019、1、6
22个文件已修改
1056 ■■■■■ 已修改文件
ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/GateWay.Droid/Application.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Common/Room.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Common/ZigbeeColor.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/AC/ACControl.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Category/Category.cs 500 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs 159 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/CategoryFunctionForWinRow.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/CategoryFunctionRow.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceDetailInfo.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs 173 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/SceneTargetFunctionRow.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/SceneTargetTimeRow.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Curtain/RollerShadeControl.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Light/AirSwitchControl.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Light/DimmableLightControl.cs 2 ●●● 补丁 | 查看 | 原始文档 | 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 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Room/RoomCommon.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml
@@ -6,32 +6,45 @@
    <Files>
      <File FileName="Shared/R.cs" Line="872" Column="17" />
      <File FileName="GateWay.Droid/Assets/Language.ini" />
      <File FileName="Shared/Phone/Device/Category/Category.cs" Line="1016" Column="67" />
      <File FileName="Shared/Phone/Device/Category/Category.cs" Line="1841" Column="104" />
      <File FileName="Shared/Phone/UserView/UserHomeView.cs" />
      <File FileName="Shared/Phone/Device/CommonForm/SceneCategoryView.cs" />
      <File FileName="Shared/Common/SceneUI.cs" Line="152" Column="1" />
      <File FileName="Shared/Phone/Device/Category/CategoryAddScene.cs" />
      <File FileName="Shared/Common/CommonPage.cs" />
      <File FileName="Shared/Phone/ZigBee/Device/ThirdPartyModuleUpgrade.cs" Line="185" Column="79" />
      <File FileName="Shared/Phone/Device/Room/EditRoom.cs" Line="603" Column="2" />
      <File FileName="Shared/Phone/Device/Room/UnallocatedRoom.cs" Line="337" Column="67" />
      <File FileName="Shared/Phone/Device/Category/SelectDevice.cs" Line="406" Column="67" />
      <File FileName="Shared/Common/Device.cs" Line="1029" Column="34" />
      <File FileName="Shared/Phone/Device/CommonForm/SceneCategoryView.cs" Line="343" Column="45" />
      <File FileName="Shared/Phone/Device/Category/CategoryAddScene.cs" Line="95" Column="1" />
      <File FileName="Shared/Common/Room.cs" />
      <File FileName="Shared/Phone/Device/CommonForm/DeviceDetailInfo.cs" Line="382" Column="41" />
      <File FileName="Shared/Phone/Device/CommonForm/CategoryFunctionRow.cs" Line="209" Column="46" />
      <File FileName="Shared/Common/DeviceUI.cs" Line="1" Column="1" />
      <File FileName="Shared/Phone/Device/CommonForm/CategoryFunctionForWinRow.cs" Line="278" Column="1" />
    </Files>
    <Pads>
      <Pad Id="ProjectPad">
        <State name="__root__">
          <Node name="GateWay" expanded="True">
            <Node name="GateWay.Droid" expanded="True" />
            <Node name="Home.IOS" expanded="True" />
            <Node name="Shared" expanded="True">
              <Node name="Common" expanded="True" />
              <Node name="Phone" expanded="True">
                <Node name="Device" expanded="True">
                  <Node name="AC" expanded="True" />
                  <Node name="Category" expanded="True">
                    <Node name="Category.cs" selected="True" />
                  </Node>
                  <Node name="CommonForm" expanded="True" />
                  <Node name="Curtain" expanded="True" />
                  <Node name="Light" expanded="True" />
                  <Node name="Room" expanded="True" />
                </Node>
                <Node name="UserCenter" expanded="True">
                  <Node name="Abount" expanded="True" />
                  <Node name="CommonBase" expanded="True">
                    <Node name="Common" expanded="True" />
                    <Node name="Controls" expanded="True">
                      <Node name="MessageControls" expanded="True" />
                    </Node>
                  </Node>
                </Node>
                <Node name="UserView" expanded="True" />
              </Node>
            </Node>
          </Node>
ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide
Binary files differ
ZigbeeApp/GateWay.Droid/Application.cs
@@ -98,7 +98,7 @@
            api.SendReq(req);
        }
        /// <summary>
        /// 所有初始化全部在这个方法实现
        /// </summary>
        void initAll()
        {
            Shared.Application.IsGpsEnable = false;
            //Shared.Application.IsGpsEnable = false;
            //设置极光调试模式,为false时只打印警告信息
            // System.Console.WriteLine($"AAA : {System.DateTime.Now.ToString()}");
#if Release
            JPushInterface.SetDebugMode(false);
ZigbeeApp/Shared/Common/Room.cs
@@ -1246,10 +1246,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;
            //移除成员 返回结果
@@ -1323,6 +1323,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
@@ -294,15 +294,13 @@
        public uint GXCACSelectedTextColor_Fan = 0xFF99D619;
        /// <summary>
        /// 开始颜色
        /// 开始颜色 0xFF495AF4
        /// </summary>
        public uint GXCArcScaleSeekBarStartColor = 0xFF495AF4;
        /// <summary>
        /// 结束颜色
        /// 结束颜色 0xFFAE50A8
        /// </summary>
        public uint GXCArcScaleSeekBarEndColor = 0xFFAE50A8;
        public uint GXCButtonBlueColor = 0xFF00AAF0;
ZigbeeApp/Shared/Phone/Device/AC/ACControl.cs
@@ -1393,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/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
{
@@ -808,6 +809,10 @@
            UserView.HomePage.Instance.AddChidren(scene);
            UserView.HomePage.Instance.PageIndex += 1;
            scene.Show();
            scene.AddAction = () =>
            {
                ShowScene();
            };
        }
        /// <summary>
@@ -1053,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 (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 (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)
                            {
@@ -1117,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);
@@ -1165,7 +1132,6 @@
                                            }
                                        });
                                    };
                                    deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) =>
                                    {
                                        if (deviceUI.CommonDevice.DfunctionType == DeviceFunctionType.A开关)
@@ -1194,22 +1160,39 @@
                                        }
                                    };
                                    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
                                    };
                                    var delBtn = new CommonForm.RowLayoutDeleteButton()
                                    {
                                        Tag = deviceUI,
                                        Radius = 0
                                        Tag = deviceUI
                                    };
                                    if (Common.Room.CurrentRoom.IsSharedRoom == false)
                                    {
                                        deviceTypeRowLayout.AddRightView(editBtn);
                                        editBtn.MouseUpEventHandler += deviceDetailHandler;
                                        deviceTypeRowLayout.AddRightView(delBtn);
                                        delBtn.MouseUpEventHandler += delEvent;
                                    }
                                }
                            }
@@ -1239,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;
@@ -1286,7 +1259,6 @@
                                            }
                                        });
                                    };
                                    deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) =>
                                    {
@@ -1297,22 +1269,39 @@
                                        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
                                    };
                                    var delBtn = new CommonForm.RowLayoutDeleteButton()
                                    {
                                        Tag = deviceUI,
                                        Radius = 0
                                        Tag = deviceUI
                                    };
                                    if (Common.Room.CurrentRoom.IsSharedRoom == false)
                                    {
                                        deviceTypeRowLayout.AddRightView(editBtn);
                                        editBtn.MouseUpEventHandler += deviceDetailHandler;
                                        deviceTypeRowLayout.AddRightView(delBtn);
                                        delBtn.MouseUpEventHandler += delEvent;
                                    }
                                }
                            }
@@ -1342,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);
@@ -1400,22 +1380,39 @@
                                        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
                                    };
                                    var delBtn = new Device.CommonForm.RowLayoutDeleteButton()
                                    {
                                        Tag = deviceUI,
                                        Radius = 0
                                        Tag = deviceUI
                                    };
                                    if (Common.Room.CurrentRoom.IsSharedRoom == false)
                                    {
                                        deviceTypeRowLayout.AddRightView(editBtn);
                                        editBtn.MouseUpEventHandler += deviceDetailHandler;
                                        deviceTypeRowLayout.AddRightView(delBtn);
                                        delBtn.MouseUpEventHandler += delEvent;
                                    }
                                }
                            }
@@ -1446,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);
@@ -1495,25 +1484,6 @@
                                            }
                                        });
                                    };
                                    var editBtn = new CommonForm.RowLayoutEditButton()
                                    {
                                        Tag = deviceUI,
                                        Radius = 0
                                    };
                                    var delBtn = new CommonForm.RowLayoutDeleteButton()
                                    {
                                        Tag = deviceUI,
                                        Radius = 0
                                    };
                                    if (Common.Room.CurrentRoom.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();
@@ -1523,6 +1493,41 @@
                                        //rollerShadeControl.action = RefreshBodyView;
                                        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)
@@ -1552,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);
@@ -1586,22 +1582,6 @@
                                        { IsBackground = true }.Start();
                                    }
                                    var editBtn = new CommonForm.RowLayoutEditButton()
                                    {
                                        Tag = deviceUI,
                                    };
                                    var delBtn = new Device.CommonForm.RowLayoutDeleteButton()
                                    {
                                        Tag = deviceUI,
                                    };
                                    if (Common.Room.CurrentRoom.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();
@@ -1611,22 +1591,49 @@
                                        //rollerShadeControl.action = RefreshBodyView;
                                        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);
@@ -1638,12 +1645,32 @@
                                    HomePage.Instance.PageIndex += 1;
                                    userDoorLockPage.Show();
                                };
                                var editBtn = new CommonForm.RowLayoutEditButton()
                                EventHandler<MouseEventArgs> deviceDetailHandler = (send2, e2) =>
                                {
                                    Tag = deviceUI
                                    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 delBtn = new Device.CommonForm.RowLayoutDeleteButton()
                                var editBtn = new CommonForm.RowLayoutEditButton()
                                {
                                    Tag = deviceUI
                                };
@@ -1651,20 +1678,10 @@
                                {
                                    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);
@@ -1673,11 +1690,32 @@
                                deviceRow.HideSwitchBtn(true);
                                deviceTypeRowLayout.AddChidren(deviceRow);
                                var editBtn = new CommonForm.RowLayoutEditButton()
                                EventHandler<MouseEventArgs> deviceDetailHandler = (send2, e2) =>
                                {
                                    Tag = deviceUI
                                    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 delBtn = new Device.CommonForm.RowLayoutDeleteButton()
                                var editBtn = new CommonForm.RowLayoutEditButton()
                                {
                                    Tag = deviceUI
                                };
@@ -1685,8 +1723,6 @@
                                {
                                    deviceTypeRowLayout.AddRightView(editBtn);
                                    editBtn.MouseUpEventHandler += deviceDetailHandler;
                                    deviceTypeRowLayout.AddRightView(delBtn);
                                    delBtn.MouseUpEventHandler += delEvent;
                                }
                            }
                            else if (deviceUI.CommonDevice.Type == DeviceType.TemperatureSensor)
@@ -1727,13 +1763,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);
@@ -1743,11 +1772,32 @@
                                    deviceRow.HideSwitchBtn(true);
                                    deviceTypeRowLayout.AddChidren(deviceRow);
                                    var editBtn = new CommonForm.RowLayoutEditButton()
                                    EventHandler<MouseEventArgs> deviceDetailHandler = (send2, e2) =>
                                    {
                                        Tag = deviceUI
                                        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 delBtn = new Device.CommonForm.RowLayoutDeleteButton()
                                    var editBtn = new CommonForm.RowLayoutEditButton()
                                    {
                                        Tag = deviceUI
                                    };
@@ -1755,35 +1805,44 @@
                                    {
                                        deviceTypeRowLayout.AddRightView(editBtn);
                                        editBtn.MouseUpEventHandler += deviceDetailHandler;
                                        deviceTypeRowLayout.AddRightView(delBtn);
                                        delBtn.MouseUpEventHandler += delEvent;
                                    }
                                }
                            }
                            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);
                                var editBtn = new CommonForm.RowLayoutEditButton()
                                EventHandler<MouseEventArgs> deviceDetailHandler = (send2, e2) =>
                                {
                                    Tag = deviceUI
                                    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 delBtn = new Device.CommonForm.RowLayoutDeleteButton()
                                var editBtn = new CommonForm.RowLayoutEditButton()
                                {
                                    Tag = deviceUI
                                };
@@ -1791,15 +1850,50 @@
                                {
                                    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();
ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs
@@ -51,7 +51,7 @@
        /// <summary>
        /// 添加目标后的展示列表
        /// </summary>
        public VerticalScrolViewLayout TargetListScrolView;
        public FrameLayout TargetListScrolView;
        /// <summary>
        /// The confirm button.
        /// </summary>
@@ -96,6 +96,10 @@
        /// 修改场景action
        /// </summary>
        public Action<SceneUI, Common.Room> EditorAction;
        /// <summary>
        /// 添加场景action
        /// </summary>
        public Action AddAction;
        #endregion
@@ -111,6 +115,7 @@
        /// </summary>
        public override void RemoveFromParent()
        {
            UserView.HomePage.Instance.ScrollEnabled = true;
            base.RemoveFromParent();
        }
        /// <summary>
@@ -118,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;
@@ -139,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) =>
@@ -256,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>
@@ -319,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
            {
@@ -347,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);
@@ -362,7 +382,7 @@
                TextColor = ZigbeeColor.Current.GXCTextDeepBlackColor,
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = 15,
                IsBold=true
                //IsBold=true
            };
            infoFL.AddChidren(infoEdit);
@@ -382,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);
@@ -432,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;
@@ -855,7 +876,7 @@
                }
                if (curRoom.IsSharedRoom)
                {
                    RemoveFromParent();
                    RoomCommon.ShowTipRoomIsShared();
                    return;
                }
@@ -863,12 +884,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
                    {
@@ -937,7 +954,7 @@
                                        Epoint = sceneTarget.DeviceUI.CommonDevice.DeviceEpoint,
                                        TaskList = sceneTarget.TaskList,
                                        DelayTime = 0,
                                        MemberNumber = i+1
                                        MemberNumber = i + 1
                                    };
                                    memberDataList.Add(memberData);
                                }
@@ -949,7 +966,7 @@
                                        ScenesId = 0,
                                        ElseScenesId = sceneTarget.ElseScenesId,
                                        DelayTime = 0,
                                        MemberNumber = i+1
                                        MemberNumber = i + 1
                                    };
                                    memberDataList.Add(memberData);
                                }
@@ -960,7 +977,7 @@
                                        Type = 2,
                                        ScenesId = 0,
                                        DelayTime = sceneTarget.DelayTime,
                                        MemberNumber = i+1
                                        MemberNumber = i + 1
                                    };
                                    memberDataList.Add(memberData);
                                }
@@ -1001,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);
                                }
@@ -1021,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)
@@ -1047,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
                    {
@@ -1070,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++)
@@ -1127,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)
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;
        }
@@ -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;
        }
@@ -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
@@ -410,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/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),
@@ -211,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/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/Curtain/RollerShadeControl.cs
@@ -654,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);
            };
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
@@ -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);
            };
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
old mode 100755 new mode 100644
@@ -84,6 +84,58 @@
            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),
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));
            });
        }
    }
}