From 652243206427f35a256400a149a1734085824cb9 Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期三, 02 九月 2020 17:35:03 +0800 Subject: [PATCH] 2020-09-02-4 --- ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs | 45 ++++++++++++++++++++++++++------------------- 1 files changed, 26 insertions(+), 19 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs old mode 100644 new mode 100755 index 00d4b6c..b3aa415 --- a/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs @@ -47,7 +47,7 @@ var middle = new VerticalScrolViewLayout { Y = view.topRowLayout.Bottom, - Height = Application.GetRealHeight(1920 - 184 - 180), + Height = Application.GetRealHeight(Method.H - 184 - 180), BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor, }; this.AddChidren(middle); @@ -229,11 +229,8 @@ { case 13: { - if (intvalue == "1") - { - selecteddevice.selecetddevicestateBtn.TextID = MyInternationalizationString.someone; - } - else + + if (conditions.ContainsKey("IgnoreTime")) { int minute = int.Parse(conditions["IgnoreTime"]) / 60; int second = int.Parse(conditions["IgnoreTime"]) % 60; @@ -257,6 +254,11 @@ } } + else + { + selecteddevice.selecetddevicestateBtn.TextID = MyInternationalizationString.someone; + } + } break; } @@ -268,14 +270,15 @@ } break; } - + ///缂栬緫 + selecteddevice.edit.Tag = i.ToString(); selecteddevice.edit.MouseUpEventHandler += (sender, e) => { var deviceinof = Method.GetCommonDevice(conditions["MacAddr"], conditions["Epoint"]); var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor }; this.AddChidren(flMain); - CurrentDeviceState.CurrentDeviceView(flMain, deviceinof, true, "condition_mould"); + CurrentDeviceState.CurrentDeviceView(flMain, deviceinof, true, "condition_mould", int.Parse(selecteddevice.edit.Tag.ToString())); }; ///鍒犻櫎鎺т欢 @@ -289,10 +292,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(); }; }; } @@ -400,11 +404,13 @@ break; } ///缂栬緫 + + actiondevice.edit.Tag = i; actiondevice.edit.MouseUpEventHandler += (sender, e) => { var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor }; this.AddChidren(flMain); var deviceinof = Method.GetCommonDevice(actions["DeviceAddr"].ToString(), actions["Epoint"].ToString()); - CurrentDeviceState.CurrentDeviceView(flMain, deviceinof, true, "action_mould"); + CurrentDeviceState.CurrentDeviceView(flMain, deviceinof, true, "action_mould",int.Parse(actiondevice.edit.Tag.ToString())); }; ///鍒犻櫎鎺т欢 actiondevice.del.MouseUpEventHandler += (sender, e) => @@ -418,10 +424,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(); }; }; @@ -432,11 +439,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