From a7f60b109fd33d6defe0d828a911f5cf449803d0 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期二, 24 五月 2022 17:12:11 +0800
Subject: [PATCH] 2022年05月24日17:12:01

---
 HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs |   30 ++++++++++++++++++++++++++++--
 1 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
index 1dbfd7c..2b606ad 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -405,6 +405,23 @@
                         };
                     }
                     break;
+                //闂ㄩ攣
+                case SPK.DoorLock:
+                    {
+
+                        LogicView.FunTypeView view = new LogicView.FunTypeView();
+                        view.btnText.TextID = StringId.shifoukaisuoshi;
+                        fLayout.AddChidren(view.FLayoutView());
+                        view.btnClick.MouseUpEventHandler += (sender, e) =>
+                        {
+                            DeviceView(device, view.btnState, StringId.shi, StringId.offLogic,1);
+                        };
+                        if (edit)
+                        {
+                            GetEditState(device, index, view.btnState, null, null, null);
+                        }
+                    }
+                    break;
             }
             #region  淇濆瓨
             ///淇濆瓨View
@@ -482,12 +499,13 @@
         /// <param name="button">閫変腑鐘舵�佹樉绀烘枃鏈珺tn鎺т欢</param>
         /// <param name="btnText1">灞炴�х姸鎬佸�兼枃鏈�1</param>
         /// <param name="btnText2">灞炴�х姸鎬佸�兼枃鏈�2</param>
-        private void DeviceView(Entity.Function device, Button button, int btnText1, int btnText2)
+        /// <param name="viewCount">view鏁伴噺</param>
+        private void DeviceView(Entity.Function device, Button button, int btnText1, int btnText2,int viewCount=2)
         {
             FrameLayout frame = new FrameLayout { BackgroundColor = CSS.CSS_Color.viewTrans60lucence };
             this.AddChidren(frame);
             LogicView.SwitchView switchView = new LogicView.SwitchView();
-            switchView.FLayoutView(frame, btnText1, btnText2, button.Text, (intValue) =>
+            switchView.FLayoutView(frame, btnText1, btnText2, button.Text, viewCount,(intValue) =>
             {
                 //璁惧灞炴�у�硷紝浜戦泙涓婂畾涔夊ソ鐨�;
                 string keyVlaue = "on_off";
@@ -540,6 +558,11 @@
                             }
                         }
                         break;
+                    case SPK.DoorLock:
+                        {
+                            keyVlaue = "door_status";
+                        }
+                        break;
 
                 }
                 switch (intValue)
@@ -583,6 +606,7 @@
                             }
                         }
                         break;
+                    case StringId.shi:
                     case StringId.kaiqi:
                         {
                             value = "open";
@@ -607,6 +631,8 @@
                         {
                             value = "fall";
                         }; break;
+                   
+
                 }
                 //鏄剧ず鏂囨湰
                 button.TextID = intValue;

--
Gitblit v1.8.0