| | |
| | | //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.Width = Application.GetRealWidth(36); |
| | | //push.btnNextIcon.Height = Application.GetRealWidth(36); |
| | | //push.btnNextIcon.X = Application.GetRealWidth(305); |
| | | //push.btnNextIcon.UnSelectedImagePath = "LogicIcon/off.png"; |
| | | //push.btnNextIcon.SelectedImagePath = "LogicIcon/on.png"; |
| | |
| | | //notification.btnText.TextID = StringId.notification; |
| | | //viewLayout.AddChidren(notification.FLayoutView()); |
| | | /////上下间隔62像素 |
| | | //viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(62) }); |
| | | //viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(40) }); |
| | | #endregion |
| | | |
| | | #region 保存 |
| | |
| | | { |
| | | list.Add(logic.name); |
| | | } |
| | | new LogicView.TipPopView().InputBox(StringId.editName, InterfaceDsplaysLogic.GetLogicName(Logic.currlogic), StringId.nameNull, StringId.NameAlreadyExists, list, (logicName) => |
| | | new LogicView.TipPopView().InputBox(StringId.editName, InpOrOutLogicMethod.GetLogicName(Logic.currlogic), StringId.nameNull, StringId.NameAlreadyExists, list, (logicName,view |
| | | ) => |
| | | { |
| | | Logic.currlogic.name = logicName; |
| | | Logic.currlogic.sid = LogicMethod.NewSid(); |
| | |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | |
| | | }); |
| | | },()=> { }); |
| | | |
| | | } |
| | | else |
| | |
| | | /// <param name="button">显示文本</param> |
| | | public void WeekMethod(FrameLayout fLayout, Button button) |
| | | { |
| | | List<string> weekStr = new List<string> { |
| | | Language.StringByID(StringId.monday), |
| | | Language.StringByID(StringId.tuesday), |
| | | Language.StringByID(StringId.wednesday), |
| | | Language.StringByID(StringId.thursday), |
| | | Language.StringByID(StringId.friday), |
| | | Language.StringByID(StringId.saturday), |
| | | Language.StringByID(StringId.sunday), |
| | | }; |
| | | |
| | | //定义一个局部weekList列表用来记录选中数据; |
| | | List<string> weekStateList = new List<string>(); |
| | | weekStateList.Clear(); |
| | | |
| | | PublicInterface weekView = new PublicInterface(); |
| | | if (Logic.currlogic.cycle.type == "week") |
| | | { |
| | | var list = InterfaceDsplaysLogic.GetWeekString(Logic.currlogic.cycle.value, "int"); |
| | | //数据转换 |
| | | var list = weekView.GetWeekString(Logic.currlogic.cycle.value, "int"); |
| | | //加载之前保存的数据 |
| | | weekStateList.AddRange(list); |
| | | } |
| | | PublicInterface weekView = new PublicInterface(); |
| | | weekView.MultiSelectShow(fLayout, weekStr, Language.StringByID(StringId.cyclic), weekStateList |
| | | var weekListStr= weekView.GetViewList("week"); |
| | | weekView.MultiSelectShow(fLayout, weekListStr, Language.StringByID(StringId.cyclic), weekStateList |
| | | , (list) => |
| | | { |
| | | var statelist = InterfaceDsplaysLogic.GetWeekString(list, "str"); |
| | | |
| | | //选中数据处理 |
| | | var statelist = weekView.GetWeekString(list, "str"); |
| | | string textStr = MainView.GetWeekString(statelist); |
| | | //显示选中数据 |
| | | button.Text = textStr; |
| | | //封装数据 |
| | | Logic.currlogic.cycle.type = "week"; |
| | | Logic.currlogic.cycle.value = statelist; |
| | | button.Text = MainView.GetWeekString(statelist); |
| | | |
| | | }); |
| | | } |
| | |
| | | PublicInterface weekView = new PublicInterface(); |
| | | weekView.MonSelectShow(fLayout, Logic.currlogic, (monList) => |
| | | { |
| | | //选中数据处理 |
| | | string textStr= MainView.GetMonString(monList); |
| | | //显示选中数据 |
| | | button.Text = textStr; |
| | | //封装数据 |
| | | Logic.currlogic.cycle.type = "mon"; |
| | | Logic.currlogic.cycle.value = monList; |
| | | button.Text = MainView.GetMonString(monList); |
| | | }); |
| | | |
| | | } |
| | |
| | | /// <param name="button">显示文本</param> |
| | | public void AndOrMethod(Button button) |
| | | { |
| | | List<string> strList = new List<string> { |
| | | Language.StringByID(StringId.andCondition), |
| | | Language.StringByID(StringId.orCondition), |
| | | }; |
| | | |
| | | ///之前的状态文本 |
| | | string currCondition = button.Text; |
| | | |
| | | PublicInterface conditionView = new PublicInterface(); |
| | | var strList = conditionView.GetViewList("andor"); |
| | | conditionView.SingleSelectionShow(this, strList, Language.StringByID(StringId.meetTheCondition), currCondition |
| | | , (stateValue) => |
| | | { |
| | | //界面显示选中值 |
| | | button.Text = stateValue; |
| | | //封装数据 |
| | | if (stateValue == Language.StringByID(StringId.orCondition)) |
| | | { |
| | | Logic.currlogic.relation = "or"; |