From 6f3f5668b8a228dd41ff6869fcb4a84669a9ace3 Mon Sep 17 00:00:00 2001
From: WJC <wjc@hdlchina.com.cn>
Date: 星期四, 07 十一月 2019 09:34:39 +0800
Subject: [PATCH] 2019-11-07-1
---
ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs | 59 +++++++++++++++++++++++++++++++----------------------------
1 files changed, 31 insertions(+), 28 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs
index e88eec2..cc03759 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs
@@ -108,7 +108,7 @@
///娌℃湁鎴块棿鐩存帴杩斿洖鍘伙紱
if (Common.Room.Lists.Count == 0)
{
- return;
+ return;
}
///鎴块棿婊戝姩鎺т欢
var roomhorizontalScrol = new HorizontalScrolViewLayout()
@@ -144,7 +144,7 @@
middle = new VerticalScrolViewLayout();
middle.Y = devicetypehorizontalScrol.Bottom + Application.GetRealHeight(40);
- middle.Height =Application.GetRealHeight(1920-40) - devicetypehorizontalScrol.Bottom;
+ middle.Height = Application.GetRealHeight(1920 - 40) - devicetypehorizontalScrol.Bottom;
middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
middle.X = Application.GetRealWidth(58);
middle.Radius = (uint)Application.GetRealHeight(50);
@@ -176,7 +176,7 @@
Height = Application.GetRealHeight(780),
X = Application.GetRealWidth(1080 - 468 - 35),
Y = Application.GetRealHeight(184),
- BackgroundImagePath= "Item/SelectFloor_Right.png",
+ BackgroundImagePath = "Item/SelectFloor_Right.png",
};
flMain.AddChidren(foolrbjicon);
@@ -195,7 +195,7 @@
{
Width = Application.GetRealWidth(450),
- Height =foolrbjicon.Height - btnfoolrtext.Height,
+ Height = foolrbjicon.Height - btnfoolrtext.Height,
X = Application.GetRealWidth(80),
Y = btnfoolrtext.Bottom,
};
@@ -206,7 +206,7 @@
var foolrRowLayout = new RowLayout
{
Height = Application.GetRealHeight(150),
- LineColor= ZigbeeColor.Current.LogicMiddleBackgroundColor,
+ LineColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
};
foolrbj.AddChidren(foolrRowLayout);
@@ -215,7 +215,7 @@
Width = Application.GetRealWidth(81),
Height = Application.GetRealHeight(81),
UnSelectedImagePath = "Floor/Floor.png",
- Gravity=Gravity.CenterVertical,
+ Gravity = Gravity.CenterVertical,
};
foolrRowLayout.AddChidren(btnfoolricon);
@@ -228,10 +228,11 @@
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
Tag = foolr.Key,
- X= btnfoolricon.Right+Application.GetRealWidth(12),
+ X = btnfoolricon.Right + Application.GetRealWidth(12),
};
foolrRowLayout.AddChidren(btnfoolrname);
- if (foolrname.Text == foolr.Value) {
+ if (foolrname.Text == foolr.Value)
+ {
btnfoolricon.UnSelectedImagePath = "Floor/FloorSelected.png";
btnfoolrname.TextColor = ZigbeeColor.Current.LogicTextBlackColor;
}
@@ -245,7 +246,7 @@
foolrname.Text = btnfoolrname.Text;
flMain.RemoveFromParent();
var list = Send.GetRoomList(btnfoolrname.Tag.ToString());
-
+
AllRoomView(list, deviceTypeList, roomhorizontalScrol, devicetypehorizontalScrol);
};
foolrRowLayout.MouseUpEventHandler += foolrnameclick;
@@ -303,20 +304,20 @@
Width = Application.GetRealWidth(255),
UnSelectedImagePath = "ZigeeLogic/iconBackgroundColor.png",
SelectedImagePath = "ZigeeLogic/iconSelectedBackgroundColor.png",
- Y=Application.GetRealHeight(21),
+ Y = Application.GetRealHeight(21),
};
fra.AddChidren(roombjBtn);
- var roomnameBtn= new Button
+ var roomnameBtn = new Button
{
- Height = Application.GetRealHeight(152-26-20),
- Width = Application.GetRealWidth(255-20-50),
+ Height = Application.GetRealHeight(152 - 26 - 20),
+ Width = Application.GetRealWidth(255 - 20 - 50),
Text = room.Name,
TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
SelectedTextColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
- Y=Application.GetRealHeight(21 +13+10),
- X=Application.GetRealWidth(10+25),
+ Y = Application.GetRealHeight(21 + 13 + 10),
+ X = Application.GetRealWidth(10 + 25),
};
fra.AddChidren(roomnameBtn);
@@ -334,7 +335,8 @@
var list = new List<DeviceUI>();
foreach (var device in room.DeviceUIList)
{
- if (device.CommonDevice==null) {
+ if (device.CommonDevice == null)
+ {
continue;
}
if (!deviceTypeList.Contains(device.CommonDevice.Type))
@@ -343,7 +345,7 @@
}
list.Add(device);
}
-
+
AllDeviceTypeView(list, devicetypehorizontalScrol);
}
@@ -364,7 +366,8 @@
var list = new List<DeviceUI>();
foreach (var device in room.DeviceUIList)
{
- if (device.CommonDevice==null) {
+ if (device.CommonDevice == null)
+ {
continue;
}
if (!deviceTypeList.Contains(device.CommonDevice.Type))
@@ -373,7 +376,7 @@
}
list.Add(device);
}
-
+
AllDeviceTypeView(list, devicetypehorizontalScrol);
@@ -404,7 +407,7 @@
devicetypelist.Add(Language.StringByID(MyInternationalizationString.Curtains));
}
- var iASZonejosn = devicelist.Find((device) => device.CommonDevice.Type == DeviceType.IASZone|| device.CommonDevice.Type == DeviceType.TemperatureSensor);
+ var iASZonejosn = devicelist.Find((device) => device.CommonDevice.Type == DeviceType.IASZone || device.CommonDevice.Type == DeviceType.TemperatureSensor);
if (iASZonejosn != null)
{
devicetypelist.Add(Language.StringByID(MyInternationalizationString.sensor));
@@ -685,11 +688,11 @@
/// 閫変腑璇ヨ澶囧姛鑳戒綔涓烘潯浠剁殑瑙嗗浘鏂规硶
/// </summary>
/// <param name="common">Common.</param>
- public async static void CurrentDeviceView(FrameLayout flMain, CommonDevice common, bool edit)
+ public async static void CurrentDeviceView(FrameLayout flMain, CommonDevice common, bool edit)
{
//涓嶈褰撳墠鐣岄潰婊戝姩
UserView.HomePage.Instance.ScrollEnabled = false;
- List<Dictionary<string, string>> doorlockConditionsInfo= new List<Dictionary<string, string>>();
+ List<Dictionary<string, string>> doorlockConditionsInfo = new List<Dictionary<string, string>>();
Dictionary<string, string> deviceConditionsInfo = new Dictionary<string, string>();
dictionary(deviceConditionsInfo, "Type", "1");
dictionary(deviceConditionsInfo, "IsValid", "1");
@@ -1386,12 +1389,12 @@
var buttonSelected = new SelectedButton();
buttonRow.AddChidren(buttonSelected);
EventHandler<MouseEventArgs> buttonclick = (sender, e) =>
- {
- buttonSelected.Visible = true;
- SelectedDeviceStatuscondition = "OnOffSwitch";
- button.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ {
+ buttonSelected.Visible = true;
+ SelectedDeviceStatuscondition = "OnOffSwitch";
+ button.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
- };
+ };
buttonRow.MouseUpEventHandler += buttonclick;
button.MouseUpEventHandler += buttonclick;
buttonSelected.MouseUpEventHandler += buttonclick;
@@ -1544,7 +1547,7 @@
deviceConditionsInfo.Add(Key, Value);
}
-
+
}
}
--
Gitblit v1.8.0