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 | 41 +++++++++++++++++++----------------------
1 files changed, 19 insertions(+), 22 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs b/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs
index 3accaa7..44eaab9 100644
--- a/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs
+++ b/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs
@@ -255,14 +255,6 @@
ac.currentSystemMode = attList.AttriButeData;
ac.LastDateTime = DateTime.Now;
break;
- case 4099:
- var value = Convert.ToString(attList.AttriButeData, 2).PadLeft(16, '0');
- var modeStr = value.Substring(value.Length - 5, 5);
- for (int k = 0; k < modeStr.Length; k++)
- {
- ac.listSupportMode[k] = Convert.ToInt32(modeStr[k]) == 49 ? 1 : 0;
- }
- break;
}
}
(rowFL.GetChildren(j) as FunctionMainView).IsSelected = ac.currentSystemMode != 0;
@@ -936,7 +928,7 @@
var dList = new List<DeviceUI> { };
foreach(var device in deviceList)
{
- var info = Common.LocalDevice.Current.GetNotHdlMyDeviceEnumInfo(new List<CommonDevice> { device.CommonDevice });
+ var info = Common.LocalDevice.Current.GetDeviceBelongEnumInfo(device.CommonDevice);
if (info.BeloneType == DeviceBeloneType.A骞叉帴鐐� || info.BeloneType == DeviceBeloneType.A涓户鍣�)
{
continue;
@@ -1018,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);
@@ -1086,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) =>
{
@@ -1128,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));
@@ -1205,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) =>
{
@@ -1247,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));
@@ -1314,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) =>
{
@@ -1357,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));
@@ -1424,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) =>
{
@@ -1468,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));
@@ -1544,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) =>
{
@@ -1564,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);
@@ -1624,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);
@@ -1650,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);
@@ -1681,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)
@@ -1719,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();
@@ -1736,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));
}
}
@@ -1813,8 +1809,9 @@
}
var sceneView = new SceneMainView(xx, yy);
- itemView.AddChidren(sceneView);
sceneView.Init(scene);
+ itemView.AddChidren(sceneView);
+ sceneView.CollectionAction += ShowScene;
}
GetDelayScene(sceneScrolView);
}
--
Gitblit v1.8.0