From 2a23fbede38fadaf7060510a3cd72a93a8a95ec0 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期五, 18 十二月 2020 17:49:46 +0800
Subject: [PATCH] 2020-12-18-3

---
 HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs |   51 +++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 41 insertions(+), 10 deletions(-)

diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
index 01a8209..d19d608 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -49,7 +49,7 @@
                 case FunctionType.Dimmer:
                 case FunctionType.RGB:
                 case FunctionType.RGBW:
-                case FunctionType.CCT:
+                case FunctionType.ColorTemperature:
                     {
                         //2琛ㄧず(寮�锛屽叧)鍔熻兘
                         SwitchBrightnessView(fLayout, device, index, edit, 2);
@@ -68,8 +68,8 @@
                         SwitchView(fLayout, device, index, edit, 3);
                     }
                     break;
-                case FunctionType.TrietexCurtain:
-                case FunctionType.RollerCurtain:
+                case FunctionType.MotorCurtain:
+                case FunctionType.RollingShutter:
                     {
                         //3琛ㄧず(寮�锛屽叧锛屾殏鍋�)鍔熻兘
                         SwitchBrightnessView(fLayout, device, index, edit, 3);
@@ -137,7 +137,6 @@
 
                             //鍔犺浇鏁版嵁鐣岄潰鐨勮缃柟娉�(鍒楄〃浜掍笉鑱斿姩)
                             view.mUIPickerView.setNPicker(temperatureList, null, null);
-
                             //榛樿鍒濆閫変腑鐘舵��
                             view.mUIPickerView.setCurrentItems(9, 0, 0);
                             //瀹氫箟涓�涓眬閮ㄥ彉閲忚褰曢�変腑鏃堕棿
@@ -278,7 +277,7 @@
                                 speedTypeView.btnText.Text = speedStr[i];
                                 speedTypeView.btnClick.Tag = speedStr[i];//鏍囪
 
-                                if (acModehView.btnState.Text == speedStr[i])
+                                if (acSpeedView.btnState.Text == speedStr[i])
                                 {
                                     //鏄剧ず涔嬪墠鐨勯�変腑鐘舵��
                                     checkBtn.IsSelected = false;
@@ -506,7 +505,40 @@
                     Output outputDevice = new Output();
                     outputDevice.target_type = "1";
                     outputDevice.sid = device.sid;
+
+                    switch (device.functionType)
+                    {
+                        case FunctionType.Dimmer:
+                        case FunctionType.RGB:
+                        case FunctionType.RGBW:
+                        case FunctionType.ColorTemperature:
+                            {
+                                //璋冨厜鍋氫簡涓�涓壒娈婂鐞嗭紱
+                                if (dicSateteList.Count > 1)
+                                {
+                                    foreach (var dictionary in dicSateteList)
+                                    {
+                                        if (dictionary["key"] == "on_off")
+                                        {
+                                            if (dictionary["value"] == "off")
+                                            {
+                                                //绉婚櫎鍒楄〃鎵�鏈夋暟鎹�
+                                                dicSateteList.Clear();
+                                                //閲嶆柊娣诲姞寮�鍏夊睘鎬ф暟鎹�
+                                                Dictionary<string, string> diction = new Dictionary<string, string>();
+                                                diction.Add("key", "on_off");
+                                                diction.Add("value", "on_off");
+                                                dicSateteList.Add(diction);
+                                                break;
+                                            }
+                                        }
+                                    }
+                                }
+                                break;
+                            }
+                    }
                     outputDevice.status = dicSateteList;
+
                     if (edit)
                     {
                         //绉婚櫎鏃ф暟鎹�
@@ -664,7 +696,7 @@
             ///浜害
             LogicView.FunTypeView brightnessView = new LogicView.FunTypeView();
             brightnessView.frameLayout.Y = lightSwitchView.frameLayout.Bottom;
-            if (device.functionType == FunctionType.TrietexCurtain || device.functionType == FunctionType.RollerCurtain)
+            if (device.functionType == FunctionType.MotorCurtain || device.functionType == FunctionType.RollingShutter)
             {
 
                 brightnessView.btnText.TextID = StringId.percentum;
@@ -887,7 +919,7 @@
                 case FunctionType.Dimmer:
                 case FunctionType.RGB:
                 case FunctionType.RGBW:
-                case FunctionType.CCT:
+                case FunctionType.ColorTemperature:
                     {
                         foreach (var dic in dicList)
                         {
@@ -943,8 +975,8 @@
                         }
                     }
                     break;
-                case FunctionType.TrietexCurtain:
-                case FunctionType.RollerCurtain:
+                case FunctionType.MotorCurtain:
+                case FunctionType.RollingShutter:
                     {
 
                         foreach (var dic in dicList)
@@ -1155,7 +1187,6 @@
                     }
                     break;
             }
-
         }
         /// <summary>
         /// 娣诲姞澶勭悊閫変腑鏁版嵁

--
Gitblit v1.8.0