From 83df0ebfbd306d0fb5a51a21a7ef2271c0c507ec Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 09 三月 2021 19:39:26 +0800
Subject: [PATCH] 2021-3-9-1

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

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs
index ac1b20d..61d0ee9 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs
@@ -116,10 +116,10 @@
                 else
                 {
                     Method method = new Method();
-                    method.AddControl(this, (control1) => {
+                    method.AddControl(this, (controlDevice) => { 
                         AddButton addButton = new AddButton();
                         MainPage.BasePageView.AddChidren(addButton);
-                        addButton.Show(control1);
+                        addButton.Show(controlDevice);
                         MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                     });
                 }
@@ -129,6 +129,21 @@
             {
                 MainPage.BasePageView.RemoveViewByTag("AddControl");
                 MainPage.BasePageView.RemoveViewByTag("Pir");
+
+                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);
+                if (null == Pir.currPir.FunctioList.Find((c) => c.sid == function.sid))
+                {
+                    Pir.currPir.FunctioList.Add(function);
+                }
+                //Entity.FunctionAttributes functionAttributes = new Entity.FunctionAttributes();
+                //functionAttributes.key
+
+
             };
             #endregion
         }

--
Gitblit v1.8.0