From dcb9b9b5561b4e6d1eaf1e602e8ae054e578ec6e Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期五, 04 十二月 2020 16:06:47 +0800
Subject: [PATCH] Merge branch 'master' into WJC

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

diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
index 461408f..13f658b 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -75,6 +75,41 @@
                         SwitchBrightnessView(fLayout, device, index, edit, 3);
                     }
                     break;
+                case FunctionType.AC: {
+                        #region 鐣岄潰
+                        ///寮�鍏�
+                        LogicView.FunTypeView curtainSwitchView = new LogicView.FunTypeView();
+                        curtainSwitchView.btnText.TextID = StringId.switchLogic;
+                        fLayout.AddChidren(curtainSwitchView.FLayoutView());
+
+                        ///妯″紡
+                        LogicView.FunTypeView acModehView = new LogicView.FunTypeView();
+                        acModehView.frameLayout.Y = curtainSwitchView.frameLayout.Bottom;
+                        acModehView.btnText.TextID = StringId.switchLogic;
+                        fLayout.AddChidren(acModehView.FLayoutView());
+                        #endregion
+                        #region 鐐瑰嚮浜嬩欢
+                        ///寮�鍏崇偣鍑讳簨浠�
+                        curtainSwitchView.btnClick.MouseUpEventHandler += (sender, e) =>
+                        {
+                            SwitchViewMethod(device, curtainSwitchView.btnState, 2);
+                        };
+                        acModehView.btnClick.MouseUpEventHandler += (sender, e) =>
+                        {
+                            FrameLayout frame = new FrameLayout
+                            {
+                                BackgroundColor = CSS.CSS_Color.viewTrans60lucence,
+                            };
+                            this.AddChidren(frame);
+                          
+                        };
+                        if (edit)
+                        {
+                            GetEditState(device, index, curtainSwitchView.btnState, null, null, null);
+                        }
+                        #endregion
+                    }
+                    break;
 
             }
             #endregion
@@ -390,6 +425,9 @@
                     }
                     break;
                 case FunctionType.Dimmer:
+                case FunctionType.RGB:
+                case FunctionType.RGBW:
+                case FunctionType.CCT:
                     {
                         foreach (var dic in dicList)
                         {
@@ -445,6 +483,47 @@
                         }
                     }
                     break;
+                case FunctionType.TrietexCurtain:
+                case FunctionType.RollerCurtain: {
+
+                        foreach (var dic in dicList)
+                        {
+                            string value = dic["value"];
+                            switch (dic["key"])
+                            {
+                                case "on_off":
+                                    {
+                                        switch (value)
+                                        {
+                                            case "on":
+                                                {
+                                                    button1.Text = Language.StringByID(StringId.onLogic);
+                                                }
+                                                break;
+                                            case "off":
+                                                {
+                                                    button1.Text = Language.StringByID(StringId.offLogic);
+                                                }
+                                                break;
+                                            case "stop":
+                                                {
+                                                    button1.Text = Language.StringByID(StringId.stop);
+                                                }
+                                                break;
+                                        }
+                                    }
+                                    break;
+                                case "brightness":
+                                    {
+
+                                        button2.Text = value;
+                                    }
+                                    break;
+                            }
+
+                        }
+                    }
+                    break;
             }
 
         }

--
Gitblit v1.8.0