From d41f1d4a478c1afcc43f3a5abb0ba76e376bc7c1 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期二, 09 三月 2021 15:23:25 +0800
Subject: [PATCH] 2

---
 HDL_ON/UI/UI2/1-HomePage/HomePage.cs |   40 ++++++++++++++++++++++++++++++++++++----
 1 files changed, 36 insertions(+), 4 deletions(-)

diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
index a7fbccd..265043e 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -459,7 +459,6 @@
         /// </summary>
         void LoadDeviceFunctionControlZone()
         {
-         
             #region ContextView
             deviceFunctionView.RemoveAll();
             functionViews.Clear();
@@ -769,7 +768,7 @@
                     };
                     view.AddChidren(btnCurtainOpen);
 
-                    LoadEvent_ControlCurtain(function as Curtain, btnCurtainClose, btnCurtainOpen);
+                    LoadEvent_ControlCurtain(function, btnCurtainClose, btnCurtainOpen);
                 }
 
                 else if (function.spk == SPK.ElectricTV)
@@ -785,7 +784,7 @@
                         UnSelectedImagePath = "Public/PowerClose.png",
                     };
                     view.AddChidren(btnPower);
-                    LoadEvent_ControlTV(function as TV, btnPower);
+                    LoadEvent_ControlTV(function, btnPower);
                 }
 
                 else if (function.spk == SPK.MusicStandard)
@@ -831,6 +830,38 @@
                     };
                 }
 
+                else if (function.spk == SPK.ClothesHanger)
+                {
+                    btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/ClothesHanger/ClothesHangerBlueIcon.png";
+                    btnIcon.SelectedImagePath = "FunctionIcon/Electrical/Curtain/ClothesHangerBlueIcon.png";
+                    Button btnUp;
+                    btnUp = new Button()
+                    {
+                        X = Application.GetRealWidth(84+3),
+                        Y = Application.GetRealWidth(89),
+                        Width = Application.GetRealWidth(38),
+                        Height = Application.GetRealWidth(38),
+                        UnSelectedImagePath = "FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon2.png",
+                        SelectedImagePath = "FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon2On.png",
+                    };
+                    view.AddChidren(btnUp);
+
+                    Button btnDown;
+                    btnDown = new Button()
+                    {
+                        X = btnUp.Right + Application.GetRealWidth(3),
+                        Y = Application.GetRealWidth(89),
+                        Width = Application.GetRealWidth(38),
+                        Height = Application.GetRealWidth(38),
+                        UnSelectedImagePath = "FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon2.png",
+                        SelectedImagePath = "FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon2On.png",
+                    };
+                    view.AddChidren(btnDown);
+
+
+                    LoadEvent_ControlClothesHanger(function, btnUp, btnDown);
+
+                }
 
                 else
                 {
@@ -853,7 +884,7 @@
                             #region 鐏厜 Light
                             btnIcon.UnSelectedImagePath = "FunctionIcon/Light/LightIcon.png";
                             btnIcon.SelectedImagePath = "FunctionIcon/Light/LightOnIcon.png";
-                            UpdataFunctionStates(function as Light);
+                            UpdataFunctionStates(function);
                             #endregion
                             break;
                         case FunctionCategory.AC:
@@ -916,6 +947,7 @@
                     function.CollectFunction();
                 };
 
+
                 var skipControlPageEvent = new PublicAssmebly().LoadEvent_SkipFunctionControlPage(function, btnCollection, btnName, btnZone);
                 view.MouseUpEventHandler = skipControlPageEvent;
                 btnName.MouseUpEventHandler = skipControlPageEvent;

--
Gitblit v1.8.0