From 9ef48d7b2da7c408b53f73be0f6eef3cbac1c84a Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 19 十一月 2020 10:23:45 +0800
Subject: [PATCH] Evoyo.Home1.1.0120111601_Release
---
ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs | 139 ++++++++++++++++++++-------------------------
1 files changed, 62 insertions(+), 77 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs
index 213e42d..972c622 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs
@@ -21,18 +21,14 @@
public HorizontalScrolViewLayout roomhorizontalScrol = new HorizontalScrolViewLayout
{
Width = Application.GetRealWidth(1080 - 58),
- Height = Application.GetRealHeight(200),
+ Height = Application.GetRealHeight(204),
Y = Application.GetRealHeight(184),
X = Application.GetRealWidth(58),
};
public VerticalScrolViewLayout middle = new VerticalScrolViewLayout
{
Width = Application.GetRealWidth(1080),
- Height = Application.GetRealHeight(1920 - 260 - 200 - 184),
- BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
- };
- public FrameLayout saveframeLayout = new FrameLayout {
- Height = Application.GetRealHeight(260),
+ Height = Application.GetRealHeight(Method.H - 260 - 204 - 184),
BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
};
@@ -79,27 +75,14 @@
this.AddChidren(roomhorizontalScrol);
middle.Y = roomhorizontalScrol.Bottom;
this.AddChidren(middle);
- saveframeLayout.Y = middle.Bottom;
- this.AddChidren(saveframeLayout);
-
- var btnsave = new Button
- {
- X = Application.GetRealWidth(85),
- Height = Application.GetRealHeight(130),
- Width = Application.GetRealWidth(910),
- Radius = (uint)Application.GetRealHeight(60),
- BackgroundColor = ZigbeeColor.Current.LogicBtnSaveBackgroundColor,
- TextID = MyInternationalizationString.Save,
- TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
- TextSize = 16,
- };
- saveframeLayout.AddChidren(btnsave);
-
- btnsave.MouseUpEventHandler += (sender2, e2) =>
+ LogicView.SaveView saveView = new LogicView.SaveView();
+ saveView.frameLayout.Y = middle.Bottom;
+ this.AddChidren(saveView.Show());
+ saveView.clickviewBtn.MouseUpEventHandler += (sender2, e2) =>
{
if (clickTag == "no" || tempScene == null)
{
- var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Normal,
+ var alert = new UserCenter.ShowMsgControl(ShowMsgType.Normal,
Language.StringByID(MyInternationalizationString.scenetip),
Language.StringByID(MyInternationalizationString.confrim));
alert.Show();
@@ -183,8 +166,8 @@
var btnfoolricon = new Button
{
- Width = Application.GetRealWidth(81),
- Height = Application.GetRealHeight(81),
+ Width = Application.GetMinRealAverage(81),
+ Height = Application.GetMinRealAverage(81),
UnSelectedImagePath = "Floor/Floor.png",
Gravity = Gravity.CenterVertical,
};
@@ -245,49 +228,31 @@
for (int i = 0; i < RoomList.Count; i++)
{
var room = RoomList[i];
- var fra = new FrameLayout
- {
- Height = Application.GetRealHeight(200),
- Width = Application.GetRealWidth(255),
- };
- roomhorizontalScrol.AddChidren(fra);
- var roombjBtn = new Button
- {
- Height = Application.GetRealHeight(158),
- Width = Application.GetRealWidth(255),
- UnSelectedImagePath = "ZigeeLogic/iconBackgroundColor.png",
- SelectedImagePath = "ZigeeLogic/iconSelectedBackgroundColor.png",
- Y = Application.GetRealHeight(21),
- };
- fra.AddChidren(roombjBtn);
-
- var roomnameBtn = new Button
- {
-
- 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),
-
- };
- fra.AddChidren(roomnameBtn);
+ LogicView.RoomClickView roomClickView = new LogicView.RoomClickView();
+ roomClickView.Show(roomhorizontalScrol);
+ roomClickView.roomnameBtn.Text =room.Name;
if (i == 0)
{
- roombjButton.IsSelected = false;
- roombjButton = roombjBtn;
- roombjBtn.IsSelected = true;
+ roombjButton.IsSelected = false;
+ roomClickView.roombjBtn.Height = Application.GetRealHeight(135);
+ roomClickView.roombjBtn.Width = Application.GetRealWidth(245);
+ roomClickView.roombjBtn.Y = Application.GetRealHeight(40);
+ roomClickView.roombjBtn.X = Application.GetRealWidth(0);
+ roombjButton = roomClickView.roombjBtn;
+ roomClickView.roombjBtn.IsSelected = true;
roomTextButton.IsSelected = false;
- roomTextButton = roomnameBtn;
- roomnameBtn.IsSelected = true;
+ roomClickView.roomnameBtn.Width = Application.GetRealWidth(245 - 60 * 2);
+ roomClickView.roomnameBtn.X = Application.GetRealWidth(60);
+ roomTextButton = roomClickView.roomnameBtn;
+ roomClickView.roomnameBtn.IsSelected = true;
+
SceneView(room.ListSceneId);
}
+
EventHandler<MouseEventArgs> roomclick = (sender, e) =>
{
@@ -296,17 +261,31 @@
clickbutton = null;
clickbutton = new Button();
+ roombjButton.Height = Application.GetRealHeight(72);
+ roombjButton.Width = Application.GetRealWidth(170);
+ roombjButton.Y = Application.GetRealHeight(60);
+ roombjButton.X = Application.GetRealWidth(26);
roombjButton.IsSelected = false;
- roombjButton = roombjBtn;
- roombjBtn.IsSelected = true;
+ roomClickView.roombjBtn.Height = Application.GetRealHeight(135);
+ roomClickView.roombjBtn.Width = Application.GetRealWidth(245);
+ roomClickView.roombjBtn.Y = Application.GetRealHeight(40);
+ roomClickView.roombjBtn.X = Application.GetRealWidth(0);
+ roombjButton = roomClickView.roombjBtn;
+ roomClickView.roombjBtn.IsSelected = true;
+
+ roomTextButton.Width = Application.GetRealWidth(125);
+ roomTextButton.X = Application.GetRealWidth(26 + 22);
roomTextButton.IsSelected = false;
- roomTextButton = roomnameBtn;
- roomnameBtn.IsSelected = true;
+ roomClickView.roomnameBtn.Width = Application.GetRealWidth(245 - 60 * 2);
+ roomClickView.roomnameBtn.X = Application.GetRealWidth(60);
+ roomTextButton = roomClickView.roomnameBtn;
+ roomClickView.roomnameBtn.IsSelected = true;
+
SceneView(room.ListSceneId);
};
- roomnameBtn.MouseUpEventHandler += roomclick;
- roombjBtn.MouseUpEventHandler += roomclick;
+ roomClickView.roomnameBtn.MouseUpEventHandler += roomclick;
+ roomClickView.roombjBtn.MouseUpEventHandler += roomclick;
}
}
@@ -320,9 +299,9 @@
foreach (var sceneId in scenelist)
{
var scene = UserCenter.HdlSceneLogic.Current.GetSceneUIBySceneId(sceneId);
- if (scene == null)
- {
- continue;
+ if (scene == null)
+ {
+ continue;
}
var sceneFramelayout = new FrameLayout
{
@@ -331,11 +310,10 @@
};
middle.AddChidren(sceneFramelayout);
-
var sceneIconBtn = new Button
{
- Width = Application.GetRealWidth(81),
- Height = Application.GetRealHeight(81),
+ Width = Application.GetMinRealAverage(81),
+ Height = Application.GetMinRealAverage(81),
X = Application.GetRealWidth(58),
Y = Application.GetRealHeight(55),
UnSelectedImagePath = "ZigeeLogic/scene.png",
@@ -349,8 +327,7 @@
Width = Application.GetRealWidth(850),
Height = Application.GetRealHeight(130),
X = Application.GetRealWidth(176 + 10),
- LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
-
+ LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
};
sceneFramelayout.AddChidren(sceneRow);
@@ -366,15 +343,23 @@
var selectedBtn = new Button
{
- Width = Application.GetRealWidth(58),
- Height = Application.GetRealHeight(58),
+ Width = Application.GetMinRealAverage(60),
+ Height = Application.GetMinRealAverage(60),
X = Application.GetRealWidth(789),
UnSelectedImagePath = "ZigeeLogic/selected.png",
Visible = false,
Gravity = Gravity.CenterVertical,
};
sceneRow.AddChidren(selectedBtn);
-
+ var lineBtn = new Button
+ {
+ Y = sceneFramelayout.Height - 1,
+ Width = Application.GetRealWidth(850),
+ Height = 1,
+ X = Application.GetRealWidth(176 + 10),
+ BackgroundColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ sceneFramelayout.AddChidren(lineBtn);
EventHandler<MouseEventArgs> sceneclick = (sender, e) =>
{
tempScene = scene;
--
Gitblit v1.8.0