From 1b5ec1190a27ebe66f74ca9513020f805d3ec61c Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期二, 22 十二月 2020 13:54:19 +0800
Subject: [PATCH] 2021221-2
---
HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs
old mode 100755
new mode 100644
index 4fed9cb..4029e1b
--- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs
+++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs
@@ -73,7 +73,7 @@
/// <summary>
/// 寮�鍏充簨浠�
/// </summary>
- void LoadEvent_SwitchFunction(Button btnSwitch)
+ void LoadEvent_SwitchFunction(Button btnSwitch,FunctionAttributes fadeTime = null)
{
btnSwitch.MouseUpEventHandler = (sender, e) =>
{
@@ -81,9 +81,12 @@
new System.Threading.Thread(() =>
{
function.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off";
- //Control.Send(CommandType_A.write, function);
System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
- d.Add("on_off", function.trait_on_off.curValue.ToString());
+ d.Add(FunctionAttributeKey.OnOff, function.trait_on_off.curValue.ToString());
+ if(fadeTime!= null)
+ {
+ d.Add(FunctionAttributeKey.FadeTime, fadeTime.curValue.ToString());
+ }
Control.Ins.SendWriteCommand(function, d);
})
{ IsBackground = true }.Start();
@@ -202,7 +205,6 @@
btnClose.IsSelected = false;
btnOpen.IsSelected = false;
curtain.trait_on_off.curValue = "stop";
- //curtain.percent = 0;
System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
d.Add("on_off", curtain.trait_on_off.curValue.ToString());
Control.Ins.SendWriteCommand(curtain, d);
--
Gitblit v1.8.0