From 94e4e5b9fd3da964c44b7b14227d6fe2bbb426d7 Mon Sep 17 00:00:00 2001
From: WJC <wjc@hdlchina.com.cn>
Date: 星期四, 02 四月 2020 13:56:39 +0800
Subject: [PATCH] 2020-04-02-2

---
 ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs |   33 ++++++++++++++++++++-------------
 1 files changed, 20 insertions(+), 13 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs
index 33feefe..4e7e1b2 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs
@@ -26,6 +26,7 @@
         {
 
             #region  鏈�涓婇潰鐨勫竷灞�浠g爜
+            UserView.HomePage.Instance.ScrollEnabled = false;//閿佷綇宸︽粦
             TopView view = new TopView();
             this.AddChidren(view.TopRowView());
             if (Common.Logic.CurrentLogic.LogicId != 0)
@@ -38,7 +39,7 @@
             }
             view.clickBtn.MouseDownEventHandler += (sender, e) =>
             {
-                
+                //UserView.HomePage.Instance.ScrollEnabled = true;//鎭㈠宸︽粦
                 RemoveFromParent();
             };
             #endregion
@@ -202,6 +203,8 @@
                 {
                     SelectedDeviceView selecteddevice = new SelectedDeviceView();
                     selecteddevice.Show(middle);
+                    selecteddevice.stateRow.AddRightView(selecteddevice.edit);
+                    selecteddevice.stateRow.AddRightView(selecteddevice.del);
                     var Type = int.Parse(ListConditions[i]["Type"]);
                     var conditions = ListConditions[i];
                     switch (Type)
@@ -212,7 +215,7 @@
                             {
                                 var deviceinof = Method.GetCommonDevice(conditions["MacAddr"], conditions["Epoint"]);
                                 selecteddevice.deviceNameBtn.Visible = true;
-                                selecteddevice.deviceNameBtn.Text = deviceinof.DeviceEpointName;
+                                selecteddevice.deviceNameBtn.Text = LocalDevice.Current.GetDeviceEpointName(deviceinof);
                                 selecteddevice.regionNameBtn.Visible = true;
                                 Method.RoomNmae(selecteddevice.regionNameBtn, deviceinof);
                                 selecteddevice.iconBtn.UnSelectedImagePath ="ZigeeLogic/sensor13.png";
@@ -286,10 +289,11 @@
                         alert.ConfirmClickEvent += () =>
                         {
                             Common.Logic.CurrentLogic.Conditions.Remove(conditions);
-                            var templatePage = new TemplatePage();
-                            UserView.HomePage.Instance.AddChidren(templatePage);
-                            UserView.HomePage.Instance.PageIndex += 1;
-                            templatePage.Show();
+                            selecteddevice.selecetdFrameLayout.RemoveFromParent();
+                            //var templatePage = new TemplatePage();
+                            //UserView.HomePage.Instance.AddChidren(templatePage);
+                            //UserView.HomePage.Instance.PageIndex += 1;
+                            //templatePage.Show();
                         };
                     };
                 }
@@ -342,6 +346,8 @@
 
                     SelectedDeviceView actiondevice = new SelectedDeviceView();
                     actiondevice.Show(middle);
+                    actiondevice.stateRow.AddRightView(actiondevice.edit);
+                    actiondevice.stateRow.AddRightView(actiondevice.del);
                     var linkType = int.Parse(ListActions[i]["LinkType"].ToString());
                     var actions = ListActions[i];
 
@@ -351,7 +357,7 @@
                             {
                                 var deviceinof = Method.GetCommonDevice(actions["DeviceAddr"].ToString(), actions["Epoint"].ToString());
                                 actiondevice.deviceNameBtn.Visible = true;
-                                actiondevice.deviceNameBtn.Text = deviceinof.DeviceEpointName;
+                                actiondevice.deviceNameBtn.Text = LocalDevice.Current.GetDeviceEpointName(deviceinof);
                                 actiondevice.regionNameBtn.Visible = true;
                                 Method.RoomNmae(actiondevice.regionNameBtn, deviceinof);
                                 switch (deviceinof.Type)
@@ -413,10 +419,11 @@
                         alert.ConfirmClickEvent += () =>
                         {
                             Common.Logic.CurrentLogic.Actions.Remove(actions);
-                            var templatePage = new TemplatePage();
-                            UserView.HomePage.Instance.AddChidren(templatePage);
-                            UserView.HomePage.Instance.PageIndex += 1;
-                            templatePage.Show();
+                            actiondevice.selecetdFrameLayout.RemoveFromParent();
+                            //var templatePage = new TemplatePage();
+                            //UserView.HomePage.Instance.AddChidren(templatePage);
+                            //UserView.HomePage.Instance.PageIndex += 1;
+                            //templatePage.Show();
                         };
                     };
 
@@ -427,11 +434,11 @@
 
             #region -----姣忓ぉ 璁剧疆鍛ㄦ湡-----
 
-            var fraline1 = new FrameLayout
+            var fraHeight = new FrameLayout
             {
                 Height = Application.GetRealHeight(30),
             };
-            middle.AddChidren(fraline1);
+            middle.AddChidren(fraHeight);
 
 
             LogicView.Addview weekview = new LogicView.Addview();

--
Gitblit v1.8.0