From b02e8275a21dc06bf54b66273485d44e007a2616 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期一, 20 七月 2020 14:50:17 +0800
Subject: [PATCH] 新代码
---
ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorTargetSelectForm.cs | 28 +++++++++++++++-------------
1 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorTargetSelectForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorTargetSelectForm.cs
index 27c3faf..068bec2 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorTargetSelectForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/PirSensor/PirSensorTargetSelectForm.cs
@@ -22,7 +22,7 @@
/// <summary>
/// 妗屽竷鎺т欢
/// </summary>
- private FrameLayout frameTable = null;
+ private NormalFrameLayout frameTable = null;
/// <summary>
/// 鎴块棿瀵硅薄
/// </summary>
@@ -68,7 +68,7 @@
bodyFrameLayout.AddChidren(frameBack);
//妗屽竷鎺т欢
- this.frameTable = new FrameLayout();
+ this.frameTable = new NormalFrameLayout();
frameTable.Y = frameBack.Bottom;
frameTable.Height = bodyFrameLayout.Height - frameBack.Height;
bodyFrameLayout.AddChidren(frameTable);
@@ -85,9 +85,9 @@
}
//杩欎釜鎵嬫満寮勫紕,閭d釜鎵嬫満寮勫紕鐨勬儏鍐典笅,
//閲囩敤鍚庡鎿嶄綔 -> 鏂板缓涓�涓复鏃舵埧闂村璞″嚭鏉�
- if (Common.Room.CurrentRoom.GetRoomByDevice(device) == null)
+ if (HdlRoomLogic.Current.GetRoomByDevice(device) == null)
{
- tempRoom.DeviceUIList.Add(Common.LocalDevice.Current.GetDeviceUI(device));
+ tempRoom.ListDevice.Add(Common.LocalDevice.Current.GetDeviceMainKeys(device));
}
}
@@ -98,7 +98,7 @@
//鍒濆鍖栨埧闂存帶浠�
var listRoom = new List<Common.Room>();
listRoom.AddRange(dicRoom[nowSelectFloorId]);
- if (tempRoom.DeviceUIList.Count > 0)
+ if (tempRoom.ListDevice.Count > 0)
{
//鏄剧ず鏂板缓鐨勪复鏃舵埧闂村璞�
listRoom.Add(tempRoom);
@@ -142,7 +142,8 @@
private void InitTopRightMenuControl()
{
//鎴块棿鍒嗙粍
- foreach (var room in Common.Room.Lists)
+ var listRoom = HdlRoomLogic.Current.GetAllListRooms();
+ foreach (var room in listRoom)
{
//妫�娴嬭鎴块棿鑳藉惁鏄剧ず
if (this.CheckCanShowRow(room) == false)
@@ -162,7 +163,7 @@
}
//鑾峰彇妤煎眰
- var dicFloor = Common.Room.CurrentRoom.GetFloorSortList();
+ var dicFloor = HdlRoomLogic.Current.GetFloorSortList();
if (dicFloor.Count == 0)
{
return;
@@ -200,7 +201,7 @@
btnIconContr.ButtonClickEvent += (sender, e) =>
{
//妤煎眰鑿滃崟
- var contr = new TopRightMenuControl(dicFloor.Count, 449, Language.StringByID(R.MyInternationalizationString.SelectFloor));
+ var contr = new TopRightMenuControl(dicFloor.Count, 2, Language.StringByID(R.MyInternationalizationString.SelectFloor));
foreach (var floorId in dicFloor.Keys)
{
contr.AddRowMenu(dicFloor[floorId], "Floor/Floor.png", "Floor/FloorSelected.png", () =>
@@ -239,9 +240,9 @@
frameTable.AddChidren(listView);
var listDevice = new List<ZigBee.Device.CommonDevice>();
- foreach (var deviceUi in room.DeviceUIList)
+ foreach (var deviceKeys in room.ListDevice)
{
- var device = deviceUi.CommonDevice;
+ var device = Common.LocalDevice.Current.GetDevice(deviceKeys);
//妫�娴嬭澶�
if (this.CheckCanShowDevice(device) == true)
{
@@ -314,7 +315,7 @@
/// <returns></returns>
private bool CheckCanShowRow(Common.Room room)
{
- if (room.DeviceUIList.Count == 0)
+ if (room.ListDevice.Count == 0)
{
return false;
}
@@ -322,10 +323,11 @@
{
return false;
}
- foreach (var deviceUi in room.DeviceUIList)
+ foreach (var deviceKeys in room.ListDevice)
{
//妫�娴嬭璁惧鑳藉惁鏄剧ず
- if (this.CheckCanShowDevice(deviceUi.CommonDevice) == false)
+ var device = Common.LocalDevice.Current.GetDevice(deviceKeys);
+ if (this.CheckCanShowDevice(device) == false)
{
continue;
}
--
Gitblit v1.8.0