From 84f62349fc7ee80f6ff1c503458eec8842958e1f Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期二, 31 十月 2023 14:41:16 +0800
Subject: [PATCH] 2023年10月31日14:40:26
---
HDL_ON/UI/UI2/1-HomePage/HomePage.cs | 74 +++++++++++++++++++++++++++++++++----
1 files changed, 66 insertions(+), 8 deletions(-)
diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
index 84471ba..d3a4868 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -1294,7 +1294,7 @@
switch (tempStatus.state)
{//0绌猴紝1璧帮紝2璺戯紝3鍧愶紝4璺屽�掞紝5绔�
case "0":
- function.lastState = Language.StringByID(StringId.SensorNormalState);
+ function.lastState = Language.StringByID(StringId.wuren);
break;
case "1":
function.lastState = Language.StringByID(StringId.SomeoneIn);
@@ -1411,7 +1411,8 @@
if (//SPK.CurtainSpkList().Contains(function.spk))
function.spk == SPK.CurtainRoller || function.spk == SPK.CurtainShades ||
function.spk == SPK.CurtainDream ||
- function.spk == SPK.CurtainSwitch || function.spk == SPK.CurtainTrietex)
+ function.spk == SPK.CurtainSwitch || function.spk == SPK.CurtainTrietex
+ )
{
btnIcon.UnSelectedImagePath = "FunctionIcon/Curtain/CurtainIcon.png";
btnIcon.SelectedImagePath = "FunctionIcon/Curtain/CurtainOnIcon.png";
@@ -1426,6 +1427,7 @@
SelectedImagePath = "FunctionIcon/Curtain/CurtainCloseWhiteIcon_Shadow.png",
};
view.AddChidren(btnCurtainClose);
+
Button btnCurtainOpen;
btnCurtainOpen = new Button()
@@ -1476,7 +1478,7 @@
view.AddChidren(btnPower);
btnState.Text = function.GetAttrState("song_name");
-
+ btnState.Width = Application.GetRealWidth(90);
btnState.SelectedTextColor = CSS_Color.MainBackgroundColor;
btnState.TextColor = CSS_Color.MainBackgroundColor;//PromptingColor1
@@ -1568,11 +1570,67 @@
//涓轰簡鍘绘帀寮�鍏虫寜閽�
btnIcon.UnSelectedImagePath = "AksIcon/yingyinzhongkong1.png";
}
- //else if (function.spk == SPK.GroupControl)
- //{
- // btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/lightswitch_blue.png";
- // btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/lightswitch_white.png";
- //}
+ else if (function.spk == SPK.GroupControl)
+ {
+ btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png";
+ btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_white.png";
+ if (function.spk == SPK.GroupControl)
+ {
+ Button btnClose;
+ Button btnOpen;
+ btnOpen = new Button()
+ {
+ X = Application.GetRealWidth(84),
+ Y = Application.GetRealWidth(89),
+ Width = Application.GetRealWidth(40),
+ Height = Application.GetRealWidth(40),
+ UnSelectedImagePath = "FunctionIcon/Light/LightScene/gp_all_on_home.png",
+ SelectedImagePath = "FunctionIcon/Light/LightScene/gp_all_on_home_click.png",
+ };
+ view.AddChidren(btnOpen);
+
+
+ btnClose = new Button()
+ {
+ X = btnOpen.Right,
+ Y = Application.GetRealWidth(89),
+ Width = Application.GetRealWidth(40),
+ Height = Application.GetRealWidth(40),
+ UnSelectedImagePath = "FunctionIcon/Light/LightScene/gp_all_off_home.png",
+ SelectedImagePath = "FunctionIcon/Light/LightScene/gp_all_off_home_click.png",
+ };
+ view.AddChidren(btnClose);
+
+
+ btnClose.MouseDownEventHandler = (sender, e) => {
+ btnClose.IsSelected = true;
+ };
+
+ btnClose.MouseUpEventHandler = (sender, e) => {
+ btnClose.IsSelected = false;
+ if (function.spk == SPK.GroupControl)
+ {
+ var d = new Dictionary<string, string>();
+ d.Add("on_off", "off");
+ (function as GroupControl).Control(d);
+ }
+ };
+ btnOpen.MouseDownEventHandler = (sender, e) => {
+ btnOpen.IsSelected = true;
+ };
+ btnOpen.MouseUpEventHandler = (sender, e) => {
+ btnOpen.IsSelected = false;
+ if (function.spk == SPK.GroupControl)
+ {
+ var d = new Dictionary<string, string>();
+ d.Add("on_off", "on");
+ (function as GroupControl).Control(d);
+ }
+ };
+
+
+ }
+ }
else if (function.spk == SPK.ElectricEnergy || function.spk == SPK.AirSwitch || function.spk == SPK.AirSwitchP3)
{
--
Gitblit v1.8.0