From 94968f63b181eee088dab157881daf50ec5cb56a Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期五, 12 三月 2021 12:00:54 +0800
Subject: [PATCH] 2021-3-12-1

---
 HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs |   35 +++++++++++++++++++----------------
 1 files changed, 19 insertions(+), 16 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs
index 6a20e68..3958f65 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs
@@ -8,17 +8,24 @@
     {
         public AddControlComplete()
         {
-            Tag = "Pir";
+            Tag = "PirView";
         }
         public void Show(Control control, bool bool_library)
         {
             //鏁版嵁杞崲
             Entity.Function function = new Entity.Function();
-            function.sid = control.sid;
-            function.deviceId = control.deviceId;
-            function.name = control.name;
-            function.spk = control.spk;
-            function.attributes.AddRange(function.attributes);
+            {
+                function.sid = control.sid;
+                function.deviceId = control.deviceId;
+                function.name = control.name;
+                function.spk = control.spk;
+                //function.attributes.AddRange(control.status);
+                //閬ユ帶鍣ㄦ坊鍔犲埌鍒楄〃锛�
+                if (null == Pir.currPir.FunctioList.Find((c) => c.sid == function.sid))
+                {
+                    Pir.currPir.FunctioList.Add(function);
+                }
+            }
             #region 鐣岄潰甯冨眬
             this.BackgroundColor = CSS.CSS_Color.viewMiddle;
             PirDevice.View.TopView topView = new View.TopView();
@@ -193,16 +200,12 @@
             //瀹屾垚鐐瑰嚮浜嬩欢
             saveView.btnClick.MouseUpEventHandler += (sender, e) =>
             {
-                MainPage.BasePageView.RemoveViewByTag("AddControl");
-                MainPage.BasePageView.RemoveViewByTag("Pir");
-                if (null == Pir.currPir.FunctioList.Find((c) => c.sid == function.sid))
-                {
-                    Pir.currPir.FunctioList.Add(function);
-                }
-                //Entity.FunctionAttributes functionAttributes = new Entity.FunctionAttributes();
-                //functionAttributes.key
-
-
+                //鍓嶉潰鐣岄潰
+               // this.RemoveFromParent();
+                MainPage.BasePageView.RemoveViewByTag("PirView");
+                //涓荤晫闈�
+                MainPage.BasePageView.RemoveViewByTag("PirMain");
+                
             };
             #endregion
         }

--
Gitblit v1.8.0