From 66a9965c44ecc32a6696abca876ab9d1cd091584 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 28 二月 2020 15:25:13 +0800
Subject: [PATCH] 2020.2.28

---
 ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs |   28 ++++++++++++++++------------
 1 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs b/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs
index 8cacd09..44eaab9 100644
--- a/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs
+++ b/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs
@@ -1010,7 +1010,7 @@
                                         functionView.Init();
                                         functionView.SetDeviceImage(device.IconPath, device.OnlineIconPath);
                                         functionView.SetStatuText(device.GetDeviceStatu());
-                                        functionView.SetDeviceName(rollerShade.DeviceEpointName);
+                                        functionView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(rollerShade));
                                         functionView.IsSelected = rollerShade.WcdCurrentPositionLiftPercentage == 100;
                                         functionView.SetCollect(true);
 
@@ -1078,6 +1078,7 @@
                                             UserView.HomePage.Instance.AddChidren(rollerShadeControl);
                                             UserView.HomePage.Instance.PageIndex += 1;
                                             UserView.HomePage.Instance.ScrollEnabled = false;
+                                            rollerShadeControl.IsDrawerLockMode = true;
                                             rollerShadeControl.Show(device, Room.CurrentRoom);
                                             rollerShadeControl.action += (curDev, curRoom) =>
                                             {
@@ -1120,7 +1121,7 @@
                                         functionView.Tag = device;
                                         functionView.SetDeviceImage(device.IconPath, device.OnlineIconPath);
                                         functionView.SetStatuText(device.GetDeviceStatu());
-                                        functionView.SetDeviceName(device.CommonDevice.DeviceEpointName);
+                                        functionView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice));
                                         functionView.IsSelected = light.OnOffStatus == 1;
                                         functionView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName));
 
@@ -1197,6 +1198,7 @@
                                             var lightControl = new Phone.Device.Light.OnOffControl();
                                             UserView.HomePage.Instance.AddChidren(lightControl);
                                             UserView.HomePage.Instance.PageIndex += 1;
+                                            lightControl.IsDrawerLockMode = true;
                                             lightControl.Show(device, Room.CurrentRoom);
                                             lightControl.action += (curDev, curRoom) =>
                                             {
@@ -1239,7 +1241,7 @@
                                         functionView.Tag = device;
                                         functionView.SetDeviceImage(device.IconPath, device.OnlineIconPath);
                                         functionView.SetStatuText(device.GetDeviceStatu());
-                                        functionView.SetDeviceName(airSwitch.DeviceEpointName);
+                                        functionView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(airSwitch));
                                         functionView.IsSelected = airSwitch.OnOffStatus == 1;
                                         functionView.SetCollect(Room.CurrentRoom.IsCollectInRoom( device.FileName));
 
@@ -1306,6 +1308,7 @@
                                             var lightControl = new Phone.Device.Light.AirSwitchControl();
                                             UserView.HomePage.Instance.AddChidren(lightControl);
                                             UserView.HomePage.Instance.PageIndex += 1;
+                                            lightControl.IsDrawerLockMode = true;
                                             lightControl.Show(device, Room.CurrentRoom);
                                             lightControl.action += (curDev, curRoom) =>
                                             {
@@ -1349,7 +1352,7 @@
                                         functionView.Tag = device;
                                         functionView.SetDeviceImage(device.IconPath, device.OnlineIconPath);
                                         functionView.SetStatuText(device.GetDeviceStatu());
-                                        functionView.SetDeviceName(device.CommonDevice.DeviceEpointName);
+                                        functionView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice));
                                         functionView.IsSelected = ac.currentSystemMode != 0;
                                         functionView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName));
 
@@ -1416,6 +1419,7 @@
                                             var lightControl = new Phone.Device.AC.ACControl();
                                             UserView.HomePage.Instance.AddChidren(lightControl);
                                             UserView.HomePage.Instance.PageIndex += 1;
+                                            lightControl.IsDrawerLockMode = true;
                                             lightControl.Show(device, Room.CurrentRoom);
                                             lightControl.action += (curDev, curRoom) =>
                                             {
@@ -1460,7 +1464,7 @@
                                         functionView.Tag = device;
                                         functionView.SetDeviceImage(device.IconPath, device.OnlineIconPath);
                                         functionView.SetStatuText(device.GetDeviceStatu());
-                                        functionView.SetDeviceName(device.CommonDevice.DeviceEpointName);
+                                        functionView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice));
                                         functionView.IsSelected = dimmableLight.OnOffStatus == 1;
                                         functionView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName));
 
@@ -1536,6 +1540,7 @@
                                             var dimmableLightControl = new Phone.Device.Light.DimmableLightControl();
                                             UserView.HomePage.Instance.AddChidren(dimmableLightControl);
                                             UserView.HomePage.Instance.PageIndex += 1;
+                                            dimmableLightControl.IsDrawerLockMode = true;
                                             dimmableLightControl.Show(device, Room.CurrentRoom);
                                             dimmableLightControl.action += (curDev, curRoom) =>
                                             {
@@ -1556,7 +1561,7 @@
                                     lightView.Tag = device;
                                     lightView.SetDeviceImage(device.IconPath, device.OnlineIconPath);
                                     lightView.SetStatuText(device.GetDeviceStatu());
-                                    lightView.SetDeviceName(device.CommonDevice.DeviceEpointName);
+                                    lightView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice));
                                     lightView.IsSelected = ias.iASInfo?.Alarm1 == 1;
                                     lightView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName));
                                     lightView.CanControl(false);
@@ -1616,7 +1621,7 @@
                                         lightView.Tag = device;
                                         lightView.SetDeviceImage(device.IconPath, device.OnlineIconPath);
                                         lightView.SetStatuText(device.GetDeviceStatu());
-                                        lightView.SetDeviceName(device.CommonDevice.DeviceEpointName);
+                                        lightView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice));
                                         lightView.IsSelected = false;
                                         lightView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName));
                                         lightView.CanControl(false);
@@ -1642,7 +1647,7 @@
                                     lightView.Tag = device;
                                     lightView.SetDeviceImage(device.IconPath, device.OnlineIconPath);
                                     lightView.SetStatuText(device.GetDeviceStatu());
-                                    lightView.SetDeviceName(device.CommonDevice.DeviceEpointName);
+                                    lightView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice));
                                     lightView.IsSelected = false;
                                     lightView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName));
                                     lightView.CanControl(false);
@@ -1673,9 +1678,8 @@
                                     lightView.Tag = device;
                                     lightView.SetDeviceImage(device.IconPath, device.OnlineIconPath);
                                     lightView.SetStatuText(device.GetDeviceStatu());
-                                    lightView.SetDeviceName(device.CommonDevice.DeviceEpointName);
+                                    lightView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice));
                                     lightView.CanControl(false);
-                                    //lightView.IsSelected = device.CommonDevice.IsOnline == 1;
                                     lightView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName));
 
                                     if (Common.Room.CurrentRoom.IsCollectInRoom(device.FileName) == false)
@@ -1711,7 +1715,7 @@
             if (Common.Room.CurrentRoom.IsLove)
             {
                 functionView.SetDeviceImage(device.IconPath, device.OnlineIconPath);
-                functionView.SetDeviceName(device.CommonDevice.DeviceEpointName);
+                functionView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice));
                 if (Room.CurrentRoom.IsCollectInRoom(device.FileName) == false)
                 {
                     ShowFunction();
@@ -1728,7 +1732,7 @@
                 else
                 {
                     functionView.SetDeviceImage(device.IconPath, device.OnlineIconPath);
-                    functionView.SetDeviceName(device.CommonDevice.DeviceEpointName);
+                    functionView.SetDeviceName(Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice));
                     functionView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName));
                 }
             }

--
Gitblit v1.8.0