From 10afb4f79299cae08344fd8245a7217ea49f712e Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 09 八月 2023 11:27:45 +0800
Subject: [PATCH] 空调,地暖温度类型支持
---
HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs | 42 ++++++++++++++++++++++++++++++------------
1 files changed, 30 insertions(+), 12 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs
index b05731e..f51e8a3 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs
@@ -354,6 +354,7 @@
{
var d = new Dictionary<string, string>();
d.Add(FunctionAttributeKey.Brightness, e.ToString());
+ d.Add(FunctionAttributeKey.OnOff, e == 0 ? "off" : "on");
function.Control(d);
}
else
@@ -453,6 +454,7 @@
{
var d = new Dictionary<string, string>();
d.Add(FunctionAttributeKey.Brightness, e.ToString());
+ d.Add(FunctionAttributeKey.OnOff, e == 0 ? "off" : "on");
function.Control(d);
}
else
@@ -626,10 +628,10 @@
ColorImagePath = "FunctionIcon/Light/ColorWheel.png",
};
framePickerBack.AddChidren(colorPicker);
- //if (function.trait_on_off.curValue.ToString() == "off")
- //{
- // colorPicker.ColorImagePath = "FunctionIcon/Light/ColorWheelGray.png";
- //}
+ if (function.trait_on_off.curValue.ToString() == "off")
+ {
+ colorPicker.ColorImagePath = "FunctionIcon/Light/ColorWheelGray.png";
+ }
//colorPicker.MouseDownEventHandler = (sender, e) => {
// MainPage.BasePageView.ScrollEnabled = false;
//};
@@ -675,11 +677,12 @@
colorPicker.MouseDownEventHandler += (sender, e) =>
{
pointIsRight = this.CheckPoint(circleR, colorPicker.Width / 2, colorPicker.Height / 2, (int)e.X, (int)e.Y);
- if (pointIsRight == false)
+ if (function.trait_on_off.curValue.ToString() == "off" || pointIsRight == false)
{
- //鐐圭殑鍖哄煙涓嶆槸鍦嗙洏鍐�
+ //pointIsRight:鐐圭殑鍖哄煙涓嶆槸鍦嗙洏鍐�
return;
}
+
//鏄剧ず鐧界偣
btnWhiteRound.X = (int)e.X - btnWhiteRound.Width / 2;
btnWhiteRound.Y = (int)e.Y - btnWhiteRound.Height / 2;
@@ -694,8 +697,6 @@
//褰撻紶鏍囩偣涓嬩簨浠跺鐞�
colorPicker.MouseDownEventHandler(sender, e);
};
-
-
#region 浜害璋冭妭
var btnBrightnessText = new Button()
@@ -760,6 +761,7 @@
{
var d = new Dictionary<string, string>();
d.Add(FunctionAttributeKey.Brightness, e.ToString());
+ d.Add(FunctionAttributeKey.OnOff, e == 0 ? "off" : "on");
function.Control(d);
}
else
@@ -774,6 +776,22 @@
function.Control(d);
})
{ IsBackground = true }.Start();
+ }
+ }
+ if (e == 0)
+ {
+ if (function.trait_on_off.curValue.ToString() == "on")
+ {
+ function.SetAttrState(FunctionAttributeKey.OnOff, "off");
+ colorPicker.ColorImagePath = "FunctionIcon/Light/ColorWheelGray.png";
+ }
+ }
+ else
+ {
+ if (function.trait_on_off.curValue.ToString() == "off")
+ {
+ function.SetAttrState(FunctionAttributeKey.OnOff, "on");
+ colorPicker.ColorImagePath = "FunctionIcon/Light/ColorWheel.png";
}
}
};
@@ -796,10 +814,14 @@
if (btnSwitch.IsSelected)
{
dimmerBar.Progress = 100;
+ function.SetAttrState(FunctionAttributeKey.OnOff, "on");
+ colorPicker.ColorImagePath = "FunctionIcon/Light/ColorWheel.png";
}
else
{
dimmerBar.Progress = 0;
+ function.SetAttrState(FunctionAttributeKey.OnOff, "off");
+ colorPicker.ColorImagePath = "FunctionIcon/Light/ColorWheelGray.png";
}
};
#endregion
@@ -902,9 +924,7 @@
#endregion
-
heightMore = 70;
-
}
if (hadColorful)
@@ -986,8 +1006,6 @@
};
#endregion
-
-
}
--
Gitblit v1.8.0