From f1c3921b08bb22ac6f5db22d620e01d7e8e5c49f Mon Sep 17 00:00:00 2001 From: WJC <wjc@hdlchina.com.cn> Date: 星期一, 30 十二月 2019 13:32:33 +0800 Subject: [PATCH] 2019-12-30-1 --- ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs | 62 +++++++++++++++++++++---------- 1 files changed, 42 insertions(+), 20 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs index facfe17..8070799 100644 --- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs @@ -975,7 +975,7 @@ conditionIcon.UnSelectedImagePath = "ZigeeLogic/position.png"; var btnlocation = new Button { - Width = Application.GetRealWidth(700), + Width = Application.GetRealWidth(250), TextAlignment = TextAlignment.CenterLeft, Gravity = Gravity.CenterVertical, TextColor = ZigbeeColor.Current.LogicBtnCancelColor, @@ -1002,11 +1002,11 @@ var locationstatus = new Button { - Width = Application.GetRealWidth(300), + Width = Application.GetRealWidth(550), Height = Application.GetRealHeight(130), Gravity = Gravity.CenterVertical, TextAlignment = TextAlignment.CenterRight, - X = Application.GetRealWidth(500), + X = Application.GetRealWidth(250), TextColor = ZigbeeColor.Current.LogicBtnCancelColor, TextSize = 14, }; @@ -1986,18 +1986,31 @@ btncustompush.MouseUpEventHandler += customclick; custompushback.MouseUpEventHandler += customclick; custompushRowLayout.MouseUpEventHandler += customclick; + bool tag = false;//鏍囪寮�鍏崇姸鎬�; btnswitch.MouseUpEventHandler += (sender1, e1) => - { - btnswitch.IsSelected = !btnswitch.IsSelected; - if (btnswitch.IsSelected) - { - custompushFrameLayout.Height = Application.GetRealHeight(160); - } - else - { - custompushFrameLayout.Height = Application.GetRealHeight(0); - } - }; + { + btnswitch.IsSelected = !btnswitch.IsSelected; + if (btnswitch.IsSelected) + { + tag = true; + custompushFrameLayout.Height = Application.GetRealHeight(160); + if (Common.Logic.CurrentLogic.LogicId != 0) + { + Send.Data("娣诲姞/鏇存柊", "/App/HomeLogicConfig", "POST"); + } + + } + else + { + tag = false; + custompushFrameLayout.Height = Application.GetRealHeight(0); + if (Common.Logic.CurrentLogic.LogicId != 0) + { + Send.Data("鍒犻櫎", "/App/DelHomeLogicConfig", "POST"); + } + + } + }; #endregion @@ -2010,12 +2023,13 @@ new Alert(Language.StringByID(MyInternationalizationString.Tip), Language.StringByID(MyInternationalizationString.PleaseEnterLogicName), Language.StringByID(MyInternationalizationString.Close)).Show(); return; } - var logicname = Common.Logic.LogicList.Find((logic) => Common.Logic.CurrentLogic.LogicId != logic.LogicId && logic.LogicName == name); - if (logicname != null) - { - new Alert(Language.StringByID(MyInternationalizationString.Tip), Language.StringByID(MyInternationalizationString.Rename), Language.StringByID(MyInternationalizationString.Close)).Show(); - return; - } + ///鍏堥殣钘忓垽鏂悕瀛楃浉鍚岀殑鍔熻兘锛� + //var logicname = Common.Logic.LogicList.Find((logic) => Common.Logic.CurrentLogic.LogicId != logic.LogicId && logic.LogicName == name); + //if (logicname != null) + //{ + // new Alert(Language.StringByID(MyInternationalizationString.Tip), Language.StringByID(MyInternationalizationString.Rename), Language.StringByID(MyInternationalizationString.Close)).Show(); + // return; + //} Common.Logic.CurrentLogic.LogicName = name; bool succeed = false; @@ -2030,6 +2044,10 @@ succeed = true; Common.Logic.CurrentLogic.LogicId = logicifon.LogicId; Common.Logic.LogicList.Add(Common.Logic.CurrentLogic); + if (tag) + { + Send.Data("娣诲姞/鏇存柊", "/App/HomeLogicConfig", "POST"); + } } } else @@ -2589,5 +2607,9 @@ { IsBackground = true }.Start(); } + + + + } } -- Gitblit v1.8.0