From c6ff92e84b6cb2815cb98065ecb0ecf95d0689c3 Mon Sep 17 00:00:00 2001 From: WJC <wjc@hdlchina.com.cn> Date: 星期三, 15 一月 2020 09:42:29 +0800 Subject: [PATCH] 2020-01-15-1 --- ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs | 75 +++++++++++++++++++------------------ 1 files changed, 39 insertions(+), 36 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs index c2e85ca..9231d7a 100644 --- a/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs @@ -494,21 +494,18 @@ del.MouseUpEventHandler += (sender, e) => { - - var alert = new Alert(Language.StringByID(MyInternationalizationString.tip), Language.StringByID(MyInternationalizationString.doyouwanttodelete), - Language.StringByID(MyInternationalizationString.cancel), Language.StringByID(MyInternationalizationString.confrim)); - alert.ResultEventHandler += (sender1, e1) => - { - if (e1) - { - Common.Logic.CurrentLogic.Conditions.Remove(conditions); - var templatePage = new TemplatePage(); - UserView.HomePage.Instance.AddChidren(templatePage); - UserView.HomePage.Instance.PageIndex += 1; - templatePage.Show(); - } - }; + var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Confirm, + Language.StringByID(MyInternationalizationString.doyouwanttodelete), + Language.StringByID(MyInternationalizationString.confrim)); alert.Show(); + alert.ConfirmClickEvent += () => + { + Common.Logic.CurrentLogic.Conditions.Remove(conditions); + var templatePage = new TemplatePage(); + UserView.HomePage.Instance.AddChidren(templatePage); + UserView.HomePage.Instance.PageIndex += 1; + templatePage.Show(); + }; }; @@ -996,20 +993,19 @@ del.MouseUpEventHandler += (sender, e) => { - var alert = new Alert(Language.StringByID(MyInternationalizationString.tip), Language.StringByID(MyInternationalizationString.doyouwanttodelete), - Language.StringByID(MyInternationalizationString.cancel), Language.StringByID(MyInternationalizationString.confrim)); - alert.ResultEventHandler += (sender1, e1) => - { - if (e1) - { - Common.Logic.CurrentLogic.Actions.Remove(actions); - var templatePage = new TemplatePage(); - UserView.HomePage.Instance.AddChidren(templatePage); - UserView.HomePage.Instance.PageIndex += 1; - templatePage.Show(); - } - }; + + var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Confirm, + Language.StringByID(MyInternationalizationString.doyouwanttodelete), + Language.StringByID(MyInternationalizationString.confrim)); alert.Show(); + alert.ConfirmClickEvent += () => + { + Common.Logic.CurrentLogic.Actions.Remove(actions); + var templatePage = new TemplatePage(); + UserView.HomePage.Instance.AddChidren(templatePage); + UserView.HomePage.Instance.PageIndex += 1; + templatePage.Show(); + }; }; @@ -1203,23 +1199,30 @@ { tag = true; custompushFrameLayout.Height = Application.GetRealHeight(160); - if (Common.Logic.CurrentLogic.LogicId != 0) - { - Send.Data("娣诲姞/鏇存柊", "/App/HomeLogicConfig", "POST"); - } + Common.Logic.CurrentLogic.LogicIsCustomPushText = 1; } else { tag = false; custompushFrameLayout.Height = Application.GetRealHeight(0); - if (Common.Logic.CurrentLogic.LogicId != 0) - { - Send.Data("鍒犻櫎", "/App/DelHomeLogicConfig", "POST"); - } + Common.Logic.CurrentLogic.LogicIsCustomPushText = 0; } + Send.Zj(tag, Common.Logic.CurrentLogic); }; + if (Common.Logic.CurrentLogic.LogicIsCustomPushText == 0) + { + tag = false; + btnswitch.IsSelected = false; + custompushFrameLayout.Height = Application.GetRealHeight(0); + } + else + { + tag = true; + btnswitch.IsSelected = true; + custompushFrameLayout.Height = Application.GetRealHeight(160); + } var saveFrameLayout = new FrameLayout { Y = middle.Bottom, @@ -1275,7 +1278,7 @@ Common.Logic.LogicList.Add(Common.Logic.CurrentLogic); if (tag) { - Send.Data("娣诲姞/鏇存柊", "/App/HomeLogicConfig", "POST"); + Send.Zj(tag, Common.Logic.CurrentLogic); } } } -- Gitblit v1.8.0