From a5b3c4bae726ef6770d4bfcbf2f4b50a37ed4a15 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期五, 06 三月 2020 15:31:36 +0800
Subject: [PATCH] 删除了郭雪城的 DeviceUi 这个类
---
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockAddScene.cs | 118 ++++++++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 88 insertions(+), 30 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockAddScene.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockAddScene.cs
index fb4ffce..0aa4040 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockAddScene.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockAddScene.cs
@@ -37,14 +37,15 @@
var titleName = new Button
{
- TextSize = 16,
+ TextSize = 17,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
TextAlignment = TextAlignment.CenterLeft,
X = Application.GetRealWidth(160),
- Width = Application.GetRealWidth(300),
+ Width = Application.GetRealWidth(600),
Height = Application.GetRealHeight(69),
Y = Application.GetRealHeight(92),
TextID = MyInternationalizationString.addscene,
+ IsBold = true,
};
topRowLayout.AddChidren(titleName);
@@ -86,6 +87,7 @@
Y = Application.GetRealHeight(92),
//TextID = MyInternationalizationString.customroom,
Text = Config.Instance.Home.GetCurrentFloorName,
+ TextSize = 14,
};
topRowLayout.AddChidren(foolrname);
var dropdown = new Button
@@ -102,7 +104,8 @@
#endregion
///娌℃湁鎴块棿鐩存帴杩斿洖鍘伙紱
- if (Common.Room.Lists.Count == 0)
+ var listAllRoom = UserCenter.HdlRoomLogic.Current.GetAllListRooms();
+ if (listAllRoom.Count == 0)
{
return;
}
@@ -141,6 +144,7 @@
BackgroundColor = ZigbeeColor.Current.LogicBtnSaveBackgroundColor,
TextID = MyInternationalizationString.Save,
TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
+ TextSize = 16,
};
saveframeLayout.AddChidren(btnsave);
@@ -148,9 +152,9 @@
{
if (clickTag == "no" || tempScene == null)
{
- var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt),
- Language.StringByID(MyInternationalizationString.selectdevicestatuscondition),
- Language.StringByID(MyInternationalizationString.complete));
+ var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Normal,
+ Language.StringByID(MyInternationalizationString.scenetip),
+ Language.StringByID(MyInternationalizationString.confrim));
alert.Show();
return;
}
@@ -167,49 +171,87 @@
};
- ///閫変腑妤煎眰
- foolrname.MouseUpEventHandler += (sender, e) =>
+ ///妤煎眰鐐瑰嚮浜嬩欢
+ EventHandler<MouseEventArgs> foorlclick = (sender, e) =>
{
+
var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
this.AddChidren(flMain);
flMain.MouseUpEventHandler += (sender2, e2) =>
{
flMain.RemoveFromParent();
};
+ var foolrbjicon = new FrameLayout
+ {
+
+ Width = Application.GetRealWidth(450),
+ Height = Application.GetRealHeight(780),
+ X = Application.GetRealWidth(1080 - 468 - 35),
+ Y = Application.GetRealHeight(184),
+ BackgroundImagePath = "Item/SelectFloor_Right.png",
+ };
+ flMain.AddChidren(foolrbjicon);
+
+ var btnfoolrtext = new Button
+ {
+ Width = Application.GetRealWidth(450),
+ Height = Application.GetRealHeight(150),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ X = Application.GetRealWidth(80),
+ TextID = MyInternationalizationString.selecfoolr,
+ TextSize = 14,
+ };
+ foolrbjicon.AddChidren(btnfoolrtext);
+
var foolrbj = new VerticalScrolViewLayout
{
- Width = Application.GetRealWidth(400),
- Height = Application.GetRealHeight(600),
- X = Application.GetRealWidth(1080 - 400 - 60),
- Y = Application.GetRealHeight(184 + 50),
- BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
- Radius = (uint)Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(450),
+ Height = foolrbjicon.Height - btnfoolrtext.Height,
+ X = Application.GetRealWidth(80),
+ Y = btnfoolrtext.Bottom,
};
- flMain.AddChidren(foolrbj);
- ///榛樿璋冭瘯
+ foolrbjicon.AddChidren(foolrbj);
foreach (var foolr in Config.Instance.Home.FloorDics)
{
- var foolrRowLayout = new FrameLayout
+ var foolrRowLayout = new RowLayout
{
Height = Application.GetRealHeight(150),
+ LineColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
};
foolrbj.AddChidren(foolrRowLayout);
+
+ var btnfoolricon = new Button
+ {
+ Width = Application.GetRealWidth(81),
+ Height = Application.GetRealHeight(81),
+ UnSelectedImagePath = "Floor/Floor.png",
+ Gravity = Gravity.CenterVertical,
+ };
+ foolrRowLayout.AddChidren(btnfoolricon);
+
var btnfoolrname = new Button
{
Width = Application.GetRealWidth(250),
- Height = Application.GetRealHeight(160),
+ Height = Application.GetRealHeight(150),
Text = foolr.Value,
- TextAlignment = TextAlignment.Center,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
Tag = foolr.Key,
+ X = btnfoolricon.Right + Application.GetRealWidth(12),
+ TextSize = 14,
};
foolrRowLayout.AddChidren(btnfoolrname);
+ if (foolrname.Text == foolr.Value)
+ {
+ btnfoolricon.UnSelectedImagePath = "Floor/FloorSelected.png";
+ btnfoolrname.TextColor = ZigbeeColor.Current.LogicTextBlackColor;
+ }
-
- EventHandler<MouseEventArgs> foolrclick = (sender13, e13) =>
+ EventHandler<MouseEventArgs> foolrnameclick = (sender13, e13) =>
{
roomhorizontalScrol.RemoveAll();
foolrname.Text = btnfoolrname.Text;
@@ -217,13 +259,17 @@
flMain.RemoveFromParent();
var list = Send.GetRoomList(btnfoolrname.Tag.ToString());
AllRoomView(list);
+
};
- foolrRowLayout.MouseUpEventHandler += foolrclick;
- btnfoolrname.MouseUpEventHandler += foolrclick;
+ foolrRowLayout.MouseUpEventHandler += foolrnameclick;
+ btnfoolrname.MouseUpEventHandler += foolrnameclick;
}
+
};
+ foolrname.MouseUpEventHandler += foorlclick;
+ dropdown.MouseUpEventHandler += foorlclick;
///绗竴娆¤繘鏉�
var roomlists = new List<Common.Room>();
@@ -234,7 +280,7 @@
dropdown.Visible = false;
if (Config.Instance.Home.FloorDics.Count == 0)
{
- roomlists.AddRange(Common.Room.Lists);
+ roomlists.AddRange(listAllRoom);
}
else
{
@@ -301,12 +347,18 @@
roomTextButton.IsSelected = false;
roomTextButton = roomnameBtn;
roomnameBtn.IsSelected = true;
- SceneView(room.SceneUIList);
+ SceneView(room.ListSceneId);
}
EventHandler<MouseEventArgs> roomclick = (sender, e) =>
{
+
+ clickTag = "no";
+ tempScene = null;
+ clickbutton = null;
+ clickbutton = new Button();
+
roombjButton.IsSelected = false;
roombjButton = roombjBtn;
roombjBtn.IsSelected = true;
@@ -314,7 +366,7 @@
roomTextButton.IsSelected = false;
roomTextButton = roomnameBtn;
roomnameBtn.IsSelected = true;
- SceneView(room.SceneUIList);
+ SceneView(room.ListSceneId);
};
roomnameBtn.MouseUpEventHandler += roomclick;
roombjBtn.MouseUpEventHandler += roomclick;
@@ -325,11 +377,16 @@
/// 鏄剧ず鎵�鏈夌殑鍦烘櫙鐨勬柟娉�
/// </summary>
/// <param name="scenelist"></param>
- void SceneView(List<SceneUI> scenelist)
+ void SceneView(List<int> scenelist)
{
- middle.RemoveAll();
- foreach (var scene in scenelist)
+ middle.RemoveAll();
+ foreach (var sceneId in scenelist)
{
+ var scene = UserCenter.HdlSceneLogic.Current.GetSceneUIBySceneId(sceneId);
+ if (scene == null)
+ {
+ continue;
+ }
var sceneFramelayout = new FrameLayout
{
Height = Application.GetRealHeight(160),
@@ -366,6 +423,7 @@
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
SelectedTextColor = ZigbeeColor.Current.LogicAddColor,
+ TextSize = 14,
};
sceneRow.AddChidren(scenename);
--
Gitblit v1.8.0