| | |
| | | topView.setBtn.Visible = true; |
| | | topView.clickSetBtn.Visible = true; |
| | | } |
| | | topView.clickSetBtn.MouseUpEventHandler += (sender,e) => { |
| | | topView.clickSetBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | Set set = new Set(); |
| | | MainPage.BasePageView.AddChidren(set); |
| | | set.Show(); |
| | |
| | | |
| | | }; |
| | | |
| | | VerticalScrolViewLayout viewLayout = new VerticalScrolViewLayout |
| | | VerticalScrolViewLayout viewLayout = new VerticalScrolViewLayout |
| | | { |
| | | Y = Application.GetRealHeight(64), |
| | | Width = Application.GetRealWidth(LogicView.TextSize.view375), |
| | |
| | | LogicView.LogicTypeTitleView titleOutpu = new LogicView.LogicTypeTitleView(); |
| | | titleOutpu.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight); |
| | | titleOutpu.btnText.TextID = StringId.theFollowingActions; |
| | | titleOutpu.btnNextIcon.Visible = false; |
| | | viewLayout.AddChidren(titleOutpu.FLayoutView()); |
| | | //目标处理方法 |
| | | InpOrOutLogicMethod.OutputTarget(this, viewLayout); |
| | |
| | | push.frameLayout.Height = Application.GetRealHeight(50); |
| | | push.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight); |
| | | push.btnText.TextID = StringId.push; |
| | | push.btnNextIcon.Width = Application.GetMinRealAverage(36); |
| | | push.btnNextIcon.Height = Application.GetMinRealAverage(36); |
| | | push.btnNextIcon.X = Application.GetRealWidth(305); |
| | | push.btnNextIcon.UnSelectedImagePath = "LogicIcon/off.png"; |
| | | push.btnNextIcon.SelectedImagePath = "LogicIcon/on.png"; |
| | | viewLayout.AddChidren(push.FLayoutView()); |
| | | ///发送通知View |
| | | LogicView.LogicTypeTitleView notification = new LogicView.LogicTypeTitleView(); |
| | |
| | | this.AddChidren(saveView.FLayoutView()); |
| | | saveView.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | if (string.IsNullOrEmpty(Logic.currlogic.sid)) |
| | | { |
| | | List<string> list = new List<string>(); |
| | | foreach (var logic in Logic.LogicList) |
| | | { |
| | | list.Add(logic.name); |
| | | } |
| | | new LogicView.TipPopView().InputBox(StringId.editName, Logic.currlogic.name, StringId.nameNull, StringId.NameAlreadyExists, list, (logicName) => |
| | | { |
| | | Logic.currlogic.name = logicName; |
| | | Logic.currlogic.sid = LogicMethod.NewSid(); |
| | | //发送新加修改逻辑命令; |
| | | var responsePackNew = Send.AddLogic(Logic.currlogic); |
| | | if (responsePackNew.Code == "0") |
| | | { |
| | | Logic.LogicList.Add(Logic.currlogic); |
| | | LogicMethod.RemoveAllView(); |
| | | MainView.MainShow(); |
| | | } |
| | | else { |
| | | new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.saveFail)); |
| | | } |
| | | |
| | | Logic.currlogic.sid = "000101000000000A0A0100CC1100"; |
| | | //Logic.currlogic.sid = LogicMethod.NewSid(); |
| | | //var f = Send.AddLogic(Logic.currlogic); |
| | | }); |
| | | |
| | | //var a = Send.getLogicIdList(); |
| | | |
| | | //var d = Send.getLogic(Logic.currlogic); |
| | | |
| | | // var c = Send.delLogic(Logic.currlogic); |
| | | |
| | | var e1= Send.switchLogic(Logic.currlogic); |
| | | |
| | | |
| | | |
| | | //if (string.IsNullOrEmpty(Logic.currlogic.sid)) |
| | | //{ |
| | | // List<string> list = new List<string>(); |
| | | // foreach (var logic in Logic.LogicList) |
| | | // { |
| | | // list.Add(logic.name); |
| | | // } |
| | | // new LogicView.TipPopView().InputBox(StringId.editName, Logic.currlogic.name, StringId.nameNull, StringId.NameAlreadyExists, list, (logicName) => |
| | | // { |
| | | // Logic.currlogic.name = logicName; |
| | | // Logic.currlogic.sid = LogicMethod.NewSid(); |
| | | // var responsePackNew = Send.AddLogic(Logic.currlogic); |
| | | // if (responsePackNew.Code == "0") |
| | | // { |
| | | // Logic.LogicList.Add(Logic.currlogic); |
| | | // LogicMethod.RemoveAllView(); |
| | | // MainView.MainShow(); |
| | | // } |
| | | // //发送新加修改逻辑命令; |
| | | |
| | | // }); |
| | | |
| | | //} |
| | | //else |
| | | //{ |
| | | // LogicMethod.RemoveAllView(); |
| | | // MainView.MainShow(); |
| | | // //发送新加修改逻辑命令; |
| | | //} |
| | | } |
| | | else |
| | | { |
| | | //发送新加修改逻辑命令; |
| | | var responsePackNew = Send.updateLogic(Logic.currlogic); |
| | | if (responsePackNew.Code == "0") |
| | | { |
| | | LogicMethod.RemoveAllView(); |
| | | MainView.MainShow(); |
| | | } |
| | | else { |
| | | new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.saveFail)); |
| | | } |
| | | } |
| | | |
| | | }; |
| | | #endregion |
| | |
| | | fLayout.RemoveFromParent(); |
| | | }; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 满足条件 |
| | | /// </summary> |