| | |
| | | custompushback.MouseUpEventHandler += customclick; |
| | | custompushRowLayout.MouseUpEventHandler += customclick; |
| | | bool tag = false;//标记开关状态; |
| | | btnswitch.MouseUpEventHandler += (sender1, e1) => |
| | | btnswitch.MouseUpEventHandler +=(sender1, e1) => |
| | | { |
| | | btnswitch.IsSelected = !btnswitch.IsSelected; |
| | | if (btnswitch.IsSelected) |
| | |
| | | tag = true; |
| | | custompushFrameLayout.Height = Application.GetRealHeight(160); |
| | | Common.Logic.CurrentLogic.LogicIsCustomPushText = 1; |
| | | if (Common.Logic.CurrentLogic.LogicId != 0) |
| | | { |
| | | Send.Data("添加/更新", "/App/HomeLogicConfig", "POST"); |
| | | } |
| | | |
| | | } |
| | | else |
| | |
| | | tag = false; |
| | | custompushFrameLayout.Height = Application.GetRealHeight(0); |
| | | Common.Logic.CurrentLogic.LogicIsCustomPushText = 0; |
| | | if (Common.Logic.CurrentLogic.LogicId != 0) |
| | | { |
| | | Send.Data("删除", "/App/DelHomeLogicConfig", "POST"); |
| | | } |
| | | |
| | | } |
| | | 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); |
| | | } |
| | | #endregion |
| | | |
| | |
| | | Common.Logic.LogicList.Add(Common.Logic.CurrentLogic); |
| | | if (tag) |
| | | { |
| | | Send.Data("添加/更新", "/App/HomeLogicConfig", "POST"); |
| | | Send.Zj(tag, Common.Logic.CurrentLogic); |
| | | } |
| | | } |
| | | } |