| | |
| | | |
| | | public LockLogicList() |
| | | { |
| | | Tag = "Logic"; |
| | | Tag = "LockListView"; |
| | | } |
| | | VerticalRefreshLayout middle; |
| | | public void Show() |
| | |
| | | //new一个新逻辑对象; |
| | | Common.Logic.CurrentLogic = new Common.Logic(); |
| | | Common.Logic.CurrentLogic.IsEnable = 1;//默认为开 |
| | | Common.Logic.CurrentLogic.LogicType = 1; |
| | | Common.Logic.CurrentLogic.LogicType = 1;//标记自动化类型 |
| | | Common.Logic.CurrentLogic.Relationship = 1; |
| | | Common.Logic.CurrentLogic.LogicName = Language.StringByID(MyInternationalizationString.automation1); |
| | | //Common.Logic.CurrentLogic.LogicCustomPushText = Common.Logic.CurrentLogic.LogicName + Language.StringByID(MyInternationalizationString.defaulttext); |
| | | Common.Logic.CurrentLogic.LogicName = Language.StringByID(MyInternationalizationString.linkageevent); |
| | | var lockLogicCommunalPage = new LockLogicCommunalPage(); |
| | | UserView.HomePage.Instance.AddChidren(lockLogicCommunalPage); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | |
| | | for (int j = 0; j < listlogic.Count; j++) |
| | | { |
| | | var logic = listlogic[j]; |
| | | if (logic.LogicType == 0) |
| | | if (logic.LogicType != 1) |
| | | { |
| | | continue; |
| | | } |
| | |
| | | |
| | | }; |
| | | |
| | | |
| | | ///删除 |
| | | var del = new Button |
| | | { |
| | |
| | | logicRowlayout.AddRightView(del); |
| | | 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) => |
| | | var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Confirm, |
| | | Language.StringByID(MyInternationalizationString.doyouwanttodelete), |
| | | Language.StringByID(MyInternationalizationString.confrim));
|
| | | alert.Show();
|
| | | alert.ConfirmClickEvent += () =>
|
| | | { |
| | | if (e1) |
| | | { |
| | | Common.Logic.LockLogicList.Remove(logic); |
| | | Automationview(); |
| | | Send.DelLogic(logic.LogicId); |
| | | } |
| | | Common.Logic.LockLogicList.Remove(logic); |
| | | Automationview(); |
| | | Send.DelLogic(logic.LogicId);
|
| | | }; |
| | | alert.Show(); |
| | | |
| | | }; |
| | | } |