From 0bdc0a135dbe31761b53f432ed34f347f0a4e36b Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 05 三月 2020 10:49:41 +0800
Subject: [PATCH] 20200304

---
 HDL_ON/UI/UI2/FuntionControlView/Light/RelayPage.cs |   28 +++++++++++++++-------------
 1 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/RelayFragment.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/RelayPage.cs
similarity index 84%
rename from HDL_ON/UI/UI2/FuntionControlView/Light/RelayFragment.cs
rename to HDL_ON/UI/UI2/FuntionControlView/Light/RelayPage.cs
index 7d1ff7d..9fe1775 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/RelayFragment.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/RelayPage.cs
@@ -5,7 +5,7 @@
 
 namespace HDL_ON.UI
 {
-    public partial class RelayFragment : FrameLayout
+    public partial class RelayPage : FrameLayout
     {
 
         #region 鎺т欢闆嗗悎
@@ -37,19 +37,19 @@
         #endregion
 
         #region 鍖哄煙鍙橀噺
-        Function function;
+        Light light;
         #endregion
 
-        public RelayFragment(Function func)
+        public RelayPage(Light func)
         {
             bodyView = this;
-            function = func;
+            light = func;
         }
 
         public void LoadPage()
         {
             bodyView.BackgroundColor = CSS_Color.BackgroundColor;
-            new PublicAssmebly().LoadTopView(bodyView, Language.StringByID(StringId.Lights), function);
+            new PublicAssmebly().LoadTopView(bodyView, Language.StringByID(StringId.Lights), light);
 
             controlView = new FrameLayout()
             {
@@ -70,7 +70,7 @@
                 TextColor = CSS_Color.FirstLevelTitleColor,
                 TextAlignment = TextAlignment.CenterLeft,
                 TextSize = CSS_FontSize.EmphasisFontSize_FirstLevel,
-                Text = function.name,
+                Text = light.name,
             };
             controlView.AddChidren(btnFunctionName);
 
@@ -83,7 +83,7 @@
                 TextColor = CSS_Color.PromptingColor1,
                 TextAlignment = TextAlignment.CenterLeft,
                 TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
-                Text = function.GetRoomListName()
+                Text = light.GetRoomListName()
             };
             controlView.AddChidren(btnFromFoorAndRoom);
 
@@ -93,12 +93,12 @@
                 Y = Application.GetRealHeight(14),
                 Width = Application.GetMinRealAverage(40),
                 Height = Application.GetMinRealAverage(40),
-                UnSelectedImagePath = "Collection/CollectionIcon.png",
-                SelectedImagePath = "Collection/CollectionGrayIcon.png",
+                SelectedImagePath = "Collection/CollectionIcon.png",
+                UnSelectedImagePath = "Collection/CollectionGrayIcon.png",
+                IsSelected = light.collection
             };
             controlView.AddChidren(btnCollection);
             
-
             btnSwitchIcon = new Button()
             {
                 Gravity = Gravity.CenterHorizontal,
@@ -106,7 +106,8 @@
                 Width = Application.GetRealWidth(168),
                 Height = Application.GetRealHeight(288),
                 UnSelectedImagePath = "FunctionIcon/Light/RelayCloseIcon.png",
-                SelectedImagePath = "FunctionIcon/Light/RelayOpenIcon.png"
+                SelectedImagePath = "FunctionIcon/Light/RelayOpenIcon.png",
+                IsSelected = light.state != 0
             };
             controlView.AddChidren(btnSwitchIcon);
 
@@ -116,8 +117,9 @@
                 Y = Application.GetRealHeight(462),
                 Width = Application.GetMinRealAverage(40),
                 Height = Application.GetMinRealAverage(40),
-                UnSelectedImagePath = "Public/SwitchClose.png",
-                SelectedImagePath = "Public/SwitchOn.png",
+                UnSelectedImagePath = "Public/PowerClose.png",
+                SelectedImagePath = "Public/PowerOpen.png",
+                IsSelected = light.state != 0
             };
             controlView.AddChidren(btnSwitch);
 

--
Gitblit v1.8.0