From ae9061e8e648af95393d96d6f5e59c434aed1558 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期一, 21 十二月 2020 09:57:44 +0800 Subject: [PATCH] Merge branch 'WJC' into NewFilePath --- HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs | 28 +++++++++++++++++++++++++--- 1 files changed, 25 insertions(+), 3 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs index ce8b875..236032e 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs @@ -817,8 +817,30 @@ #region 鐐瑰嚮浜嬩欢 int brightnesValue = 0; Dictionary<string, string> dic = new Dictionary<string, string>(); - LogicMethod.dictionary(dic, "key", "brightness"); - string keyVlaue = "brightness"; + string keyVlaue = ""; + + switch (device.functionType) + { + //寮�鍏崇伅鍏� light.Switch + case FunctionType.Dimmer: + case FunctionType.RGB: + case FunctionType.RGBW: + case FunctionType.ColorTemperature: + { + LogicMethod.dictionary(dic, "key", "brightness"); + keyVlaue = "brightness"; + } + break; + + case FunctionType.MotorCurtain: + case FunctionType.RollingShutter: + { + LogicMethod.dictionary(dic, "key", "percent"); + keyVlaue = "percent"; + } + break; + } + //鈥旂偣鍑讳簨浠� brightness.btn_subtract_click.MouseUpEventHandler += (sender2, e2) => { @@ -1007,7 +1029,7 @@ } } break; - case "brightness": + case "percent": { button2.Text = value; -- Gitblit v1.8.0