From 3291885285dfd5d4f665c20676307878dc3163bc Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期五, 20 十二月 2019 16:28:53 +0800
Subject: [PATCH] 请合并最新代码(优化设备不支持的功能)
---
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs | 110 +++++++++++++++++++++++++++++--------------------------
1 files changed, 58 insertions(+), 52 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs
index 961771a..80a3619 100644
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs
@@ -81,7 +81,6 @@
var btnAddFrameLayout = new FrameLayout
{
X = Application.GetRealWidth(830),
- Width = Application.GetRealWidth(200),
};
this.titleFrameLayout.AddChidren(btnAddFrameLayout);
@@ -107,14 +106,22 @@
btnAddFrameLayout.AddChidren(btnBindDown);
if (Common.Config.Instance.Home.FloorDics.Count == 0)
- {
- btnBindDown.Visible = false;
- }
-
+ {
+ btnBindDown.Visible = false;
+ }
+
btnBindDown.MouseDownEventHandler += (sender, e) =>
{
SideslipFramelayout();
};
+ if (Common.Config.Instance.Home.FloorDics.Count == 0)
+ {
+ btnAddFrameLayout.Width = 0;
+ }
+ else
+ {
+ btnAddFrameLayout.Width = Application.GetRealWidth(200);
+ }
MidFrameLayoutContent(btnFloorText);
}
@@ -182,17 +189,17 @@
roomList.Add(room);
}
}
- }
- else
- {
- // 鑾峰彇妤煎眰瀵瑰簲瀵规埧闂�
- foreach (var room in Shared.Common.Room.Lists)
- {
- if (room.FloorId == currentKey.currentSelectFloorId)
- {
- roomList.Add(room);
- }
- }
+ }
+ else
+ {
+ // 鑾峰彇妤煎眰瀵瑰簲瀵规埧闂�
+ foreach (var room in Shared.Common.Room.Lists)
+ {
+ if (room.FloorId == currentKey.currentSelectFloorId)
+ {
+ roomList.Add(room);
+ }
+ }
}
//棣栨鎷垮埌鎵�鏈夋埧闂翠腑鎸夐敭鐨勭洰鏍囧苟瀛樺偍
GetALlDispalyRoomDeviceList();
@@ -240,23 +247,23 @@
{
btnChooseKeyMode.Enable = true;
btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
- }
- if (targetList.Count == 0)
- {
+ }
+ if (targetList.Count == 0)
+ {
btnChooseKeyMode.Enable = false;
- btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
- }
- else
- {
+ btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
+ }
+ else
+ {
btnChooseKeyMode.Enable = true;
- btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
+ btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
}
btnChooseKeyMode.MouseUpEventHandler += (sender, e) =>
{
- if (targetList.Count == 0)
- {
- new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindDeviceTargetIsEmpty), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnChooseKeyMode);
- return;
+ if (targetList.Count == 0)
+ {
+ new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindDeviceTargetIsEmpty), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnChooseKeyMode);
+ return;
}
this.RemoveFromParent();
@@ -309,13 +316,13 @@
}
var btnRoomFrameLayout = new FrameLayout
- {
+ {
Height = Application.GetRealHeight(159),
Width = Application.GetRealWidth(255),
Y = Application.GetRealHeight(23),
X = Application.GetRealWidth(5),
- BackgroundImagePath = "Item/RoomIconBackground.png",
- BorderWidth = 1,
+ BackgroundImagePath = "Item/RoomIconBackground.png",
+ BorderWidth = 1,
};
btnHorizontalScrolViewLayout.AddChidren(btnRoomFrameLayout);
@@ -357,7 +364,7 @@
if (curentOldRoomFrameLayout != null)
{
curentOldRoomFrameLayout.BorderWidth = 1;
- curentOldRoomFrameLayout.BorderColor = Shared.Common.ZigbeeColor.Current.XMOrange;
+ curentOldRoomFrameLayout.BorderColor = Shared.Common.ZigbeeColor.Current.XMOrange;
curentOldRoomFrameLayout.BackgroundImagePath = "Item/RoomIconBackground.png";
}
curentOldRoomFrameLayout = btnRoomFrameLayout;
@@ -532,6 +539,7 @@
int curIndex = 0;
foreach (var device in curTypeDeviceList)
{
+ curIndex++;
if (device.CommonDevice != null && device.CommonDevice.IsOnline == 0)
{
continue;
@@ -618,15 +626,15 @@
btnChoose.Visible = true;
}
}
- if (targetList.Count == 0)
- {
- btnChooseKeyMode.Enable = false;
- btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
- }
- else
- {
- btnChooseKeyMode.Enable = true;
- btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
+ if (targetList.Count == 0)
+ {
+ btnChooseKeyMode.Enable = false;
+ btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
+ }
+ else
+ {
+ btnChooseKeyMode.Enable = true;
+ btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
}
};
rowLayout.MouseUpEventHandler += hander;
@@ -651,18 +659,16 @@
btnChoose.Visible = true;
}
}
-
- curIndex++;
}
- if (targetList.Count == 0)
- {
- btnChooseKeyMode.Enable = false;
- btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
- }
- else
- {
- btnChooseKeyMode.Enable = true;
- btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
+ if (targetList.Count == 0)
+ {
+ btnChooseKeyMode.Enable = false;
+ btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
+ }
+ else
+ {
+ btnChooseKeyMode.Enable = true;
+ btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
}
}
--
Gitblit v1.8.0