From 87e614af0fa31d7fd632136d95c0c7e584c28477 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期五, 26 二月 2021 13:36:10 +0800 Subject: [PATCH] 20210226-1 --- HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs | 41 +++++++++++++++++++++++++++++++++++------ 1 files changed, 35 insertions(+), 6 deletions(-) diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs index 531d926..e6e56cb 100644 --- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs +++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs @@ -1,4 +1,5 @@ 锘縰sing System; +using System.Collections.Generic; using HDL_ON.DriverLayer; using HDL_ON.Entity; using HDL_ON.UI.Music; @@ -196,12 +197,6 @@ Control.Ins.SendWriteCommand(curtain, d); }; - //btnStop.MouseDownEventHandler = (sender, e) => - //{ - // btnStop.IsSelected = true; - // btnClose.IsSelected = false; - // btnOpen.IsSelected = false; - //}; btnStop.MouseUpEventHandler = (sender, e) => { btnStop.IsSelected = true; @@ -227,6 +222,40 @@ } #endregion + + /// <summary> + /// 鍔犺浇鏅捐。鏋舵帶鍒朵簨浠� + /// </summary> + void LoadEvent_ControlClothesHanger(Function function, Button btnUp, Button btnDown) + { + btnUp.MouseDownEventHandler = (sender, e) => + { + btnUp.IsSelected = true; + }; + btnUp.MouseUpEventHandler = (sender, e) => + { + btnUp.IsSelected = false; + function.SetAttrState(FunctionAttributeKey.Position, "up"); + Dictionary<string, string> d = new Dictionary<string, string>(); + d.Add(FunctionAttributeKey.Position, "up"); + Control.Ins.SendWriteCommand(function, d); + }; + + btnDown.MouseDownEventHandler = (sender, e) => + { + btnDown.IsSelected = true; + }; + btnDown.MouseUpEventHandler = (sender, e) => + { + btnDown.IsSelected = false; + function.SetAttrState(FunctionAttributeKey.Position, "down"); + Dictionary<string, string> d = new Dictionary<string, string>(); + d.Add(FunctionAttributeKey.Position, "down"); + Control.Ins.SendWriteCommand(function, d); + }; + } + + #region 绌鸿皟浜嬩欢 #endregion -- Gitblit v1.8.0