From 6edb41a89f56634a0684dedf65b29f9277002c7f Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期四, 21 十一月 2019 17:58:15 +0800
Subject: [PATCH] 2019.11.21
---
ZigbeeApp/Shared/Phone/Device/Category/Category.cs | 92 +++++++++++++++++++++++++++++++++++++++++----
1 files changed, 83 insertions(+), 9 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs
old mode 100755
new mode 100644
index d725284..fa4e930
--- a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs
@@ -6,6 +6,7 @@
using ZigBee.Device;
using Shared.Phone.Device.CommonForm;
using Shared.Phone.Device.AC;
+using Shared.Phone.UserCenter.DoorLock;
namespace Shared.Phone.Device.Category
{
@@ -383,12 +384,14 @@
row.SetStatu(deviceUI.CommonDevice.IsOnline == 1);
deviceUI.CommonDevice.LastDateTime = DateTime.Now;
break;
+
case DeviceType.AirSwitch:
deviceUI.CommonDevice.IsOnline = common.IsOnline;
var row1 = rowLayout.GetChildren(0) as CategoryFunctionRow;
row1.SetStatu(deviceUI.CommonDevice.IsOnline == 1);
deviceUI.CommonDevice.LastDateTime = DateTime.Now;
break;
+
case DeviceType.WindowCoveringDevice:
deviceUI.CommonDevice.LastDateTime = DateTime.Now;
deviceUI.CommonDevice.IsOnline = common.IsOnline;
@@ -402,6 +405,7 @@
var row3 = rowLayout.GetChildren(0) as CategoryFunctionRow;
row3.SetStatu(deviceUI.CommonDevice.IsOnline == 1);
break;
+
case DeviceType.Thermostat:
deviceUI.CommonDevice.LastDateTime = DateTime.Now;
deviceUI.CommonDevice.IsOnline = common.IsOnline;
@@ -1070,6 +1074,7 @@
deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) =>
{
+
var lightControl = new Phone.Device.Light.AirSwitchControl();
UserView.HomePage.Instance.AddChidren(lightControl);
UserView.HomePage.Instance.PageIndex += 1;
@@ -1337,7 +1342,6 @@
}
}
-
var deviceTypeRowLayout = new RowLayout()
{
Height = Application.GetRealHeight(129 + 35),
@@ -1398,9 +1402,78 @@
rollerShadeControl.Show(deviceUI, room);
};
}
+ else if(deviceUI.CommonDevice.Type == ZigBee.Device.DeviceType.DoorLock)
+ {
+ var deviceTypeRowLayout = new RowLayout()
+ {
+ Height = Application.GetRealHeight(129 + 35),
+ LineColor = ZigbeeColor.Current.GXCBackgroundColor,
+ Tag = deviceUI
+ };
+ deviceListScrolView.AddChidren(deviceTypeRowLayout);
+
+ var deviceRow = new CategoryFunctionRow(0, 35);
+ deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
+ deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
+ deviceRow.SetOnLineStatu(deviceUI.CommonDevice.IsOnline == 1);
+ deviceRow.SetStatuText(deviceUI.GetDeviceStatu());
+ deviceRow.HideSwitchBtn(true);
+ deviceTypeRowLayout.AddChidren(deviceRow);
+
+
+ deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) =>
+ {
+ var userDoorLockPage = new UserDoorLockPage(room, deviceUI);
+ HomePage.Instance.AddChidren(userDoorLockPage);
+ HomePage.Instance.PageIndex += 1;
+ userDoorLockPage.Show();
+ };
+
+ var editBtn = new CommonForm.RowLayoutEditButton()
+ {
+ Tag = deviceUI
+ };
+ deviceTypeRowLayout.AddRightView(editBtn);
+ editBtn.MouseUpEventHandler += deviceDetailHandler;
+
+ var delBtn = new Device.CommonForm.RowLayoutDeleteButton()
+ {
+ Tag = deviceUI
+ };
+ 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()
+ {
+ Tag = deviceUI
+ };
+ deviceTypeRowLayout.AddRightView(editBtn);
+ editBtn.MouseUpEventHandler += deviceDetailHandler;
+
+ var delBtn = new Device.CommonForm.RowLayoutDeleteButton()
+ {
+ Tag = deviceUI
+ };
+ deviceTypeRowLayout.AddRightView(delBtn);
+ delBtn.MouseUpEventHandler += delEvent;
}
}
};
@@ -1494,7 +1567,7 @@
{
RefreshFunction(room);
}
-
+
}
roomBtn.MouseUpEventHandler += (sender, e) =>
{
@@ -1515,7 +1588,7 @@
}
};
}
-
+
}
#endregion
@@ -1571,7 +1644,6 @@
X = Application.GetRealWidth(179),
Width = Application.GetRealWidth(844),
Height = Application.GetRealHeight(400),
- BackgroundColor = ZigbeeColor.Current.GXCRedColor,
UnSelectedImagePath = scene.IconPath,
Radius = (uint)Application.GetRealHeight(17)
};
@@ -1600,7 +1672,7 @@
Tag = scene
};
leftFL.AddChidren(collectionBtn);
-
+
var sceneNameBtn = new Button()
{
Width = Application.GetRealWidth(176),
@@ -1762,7 +1834,7 @@
}
};
}
-
+
};
deleteBtn.MouseUpEventHandler += delEvent;
//缂栬緫鍦烘櫙
@@ -1818,6 +1890,7 @@
#endregion
+
#region 鈼� 鑷姩鍖朹_________________________
/// <summary>
@@ -1827,6 +1900,7 @@
{
functionSceneAutoBodyView.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
+
var bjFrameLayout = new FrameLayout
{
Width = Application.GetRealWidth(1080 - 58),
@@ -1988,7 +2062,7 @@
var Idlist = await Logic.Send.GetLogicId(0);
if (Idlist.Count != 0)
{
- var listlogic = await Logic.Send.ReadList(Idlist.Count,0);
+ var listlogic = await Logic.Send.ReadList(Idlist.Count, 0);
//foreach鍙兘闆嗗悎宸茶淇敼,鏋氫妇鎿嶄綔鍙兘涓嶄細鎵ц,鍙兘鍑虹幇宕╂簝(寤鸿for)銆�
for (int j = 0; j < listlogic.Count; j++)
{
@@ -2004,7 +2078,7 @@
//鑷姩鍖�
Automationview(logicScrolView);
CommonPage.Loading.Hide();
-
+
}
/// <summary>
@@ -2612,6 +2686,6 @@
#endregion
-
+
}
}
--
Gitblit v1.8.0