From 270b3d8539f6b4a991a9ebf3b3a9eceb436d61d5 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期四, 28 十月 2021 17:08:02 +0800
Subject: [PATCH] 自动化地址问题修复

---
 HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs |   26 +++++++++++++++++---------
 1 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs
index 51d665c..3f665d1 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs
@@ -142,18 +142,10 @@
             var menuContr = new DialogTitleMenuControl(valueCount, Language.StringByID(StringId.FanSpeed));
             //menuContr.X = Application.GetRealWidth(209);
             menuContr.Gravity = Gravity.CenterHorizontal;
-            menuContr.Y = Application.GetRealHeight(231);
             menuContr.Width = Application.GetRealWidth(160);
-            if (valueCount > 2)
-            {
-                menuContr.Height = Application.GetRealHeight(199);
-            }
-            else
-            {
-                menuContr.Height = Application.GetRealHeight(154);
-            }
             dialogBody.AddChidren(menuContr);
 
+            int count = 0;
             foreach(var fanAttrValue in fanAttr.value)
             {
                 bool isSelecte = false;
@@ -188,7 +180,22 @@
                         isSelecte = true;
                     }
                 }
+                else if(fanAttrValue == "auto")
+                {
+                    text = Language.StringByID(StringId.Auto);
+                    iconPath = "FunctionIcon/AirFresh/Fan2.png";
+                    if (this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "auto" )
+                    {
+                        iconPath = "FunctionIcon/AirFresh/Fan2Select.png";
+                        isSelecte = true;
+                    }
+                }
+                else
+                {
+                    continue;
+                }
 
+                count++;
                 menuContr.AddRowMenu(text, iconPath, isSelecte, () =>
                 {
                     frameBack.Close();
@@ -196,6 +203,7 @@
                     this.SendOtherComand(this.btnFan, FunctionAttributeKey.FanSpeed, fanAttrValue);
                 });
             }
+            menuContr.Y = Application.GetRealHeight(231 - (46 * (count-3)));
 
         }
 

--
Gitblit v1.8.0