From 38a11bcfaf3cf703e38201c9c6cd6631354ea243 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 30 十一月 2021 09:55:09 +0800
Subject: [PATCH] Siri功能完成
---
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs | 31 +++++++++++++++++++++----------
1 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs
index 1a7fb2e..3f665d1 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs
@@ -66,7 +66,10 @@
fanSpeedList = device.GetAttribute(FunctionAttributeKey.FanSpeed).value;
btnFan.MouseUpEventHandler += (sender, e) =>
{
- ShowFanSelectView();
+ if (btnSwitch.IsSelected)
+ {
+ ShowFanSelectView();
+ }
};
//椋庨�熸枃鏈�
this.btnFanView = new NormalViewControl(this.FrameWhiteCentet1.Width / 3, Application.GetRealHeight(18), false);
@@ -139,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;
@@ -185,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();
@@ -193,6 +203,7 @@
this.SendOtherComand(this.btnFan, FunctionAttributeKey.FanSpeed, fanAttrValue);
});
}
+ menuContr.Y = Application.GetRealHeight(231 - (46 * (count-3)));
}
--
Gitblit v1.8.0