| | |
| | | LogicView.LogicTypeTitleView cyclicTitle = new LogicView.LogicTypeTitleView(); |
| | | cyclicTitle.frameLayout.Height = Application.GetRealHeight(50); |
| | | cyclicTitle.frameLayout.Radius = (uint)Application.GetRealHeight(12); |
| | | cyclicTitle.btnText.TextID = StringId.days; |
| | | cyclicTitle.btnText.Text = MainView.GetWeekText(Logic.currlogic); |
| | | viewLayout.AddChidren(cyclicTitle.FLayoutView()); |
| | | cyclicTitle.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | |
| | | #endregion |
| | | |
| | | #region 执行推送 发送通知 |
| | | ///上下间隔12像素 |
| | | viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(12) }); |
| | | ///执行推送iew |
| | | LogicView.LogicTypeTitleView push = new LogicView.LogicTypeTitleView(); |
| | | 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(); |
| | | notification.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight); |
| | | notification.btnText.TextID = StringId.notification; |
| | | viewLayout.AddChidren(notification.FLayoutView()); |
| | | ///上下间隔62像素 |
| | | viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(62) }); |
| | | /////上下间隔12像素 |
| | | //viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(12) }); |
| | | /////执行推送iew |
| | | //LogicView.LogicTypeTitleView push = new LogicView.LogicTypeTitleView(); |
| | | //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(); |
| | | //notification.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight); |
| | | //notification.btnText.TextID = StringId.notification; |
| | | //viewLayout.AddChidren(notification.FLayoutView()); |
| | | /////上下间隔62像素 |
| | | //viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(62) }); |
| | | #endregion |
| | | |
| | | #region 保存 |
| | |
| | | //定义一个局部变量记录选中文本状态 |
| | | string weekName = ""; |
| | | //定义一个局部Btn用来记录选中Btn; |
| | | var selecetdBtn = new Button(); |
| | | var selecetdBtn = new Button() { Text=""}; |
| | | for (int i = 0; i < 4; i++) |
| | | { |
| | | LogicView.SelectTypeView dateTypeView = new LogicView.SelectTypeView(); |
| | |
| | | dateTypeView.btnLine.Width = Application.GetRealWidth(303); |
| | | dateView.frameLayout.AddChidren(dateTypeView.FLayoutView()); |
| | | dateTypeView.btnClick.Tag = i;//标记类型 |
| | | |
| | | switch (i) |
| | | { |
| | | case 0: |
| | |
| | | { |
| | | dateTypeView.btnText.TextColor = CSS.CSS_Color.textConfirmColor; |
| | | selecetdBtn = dateTypeView.btnText; |
| | | } |
| | | else if (button.Text == weekName) |
| | | { |
| | | dateTypeView.btnText.TextColor = CSS.CSS_Color.textConfirmColor; |
| | | selecetdBtn = dateTypeView.btnText; |
| | | |
| | | } |
| | | } |
| | | //确定保存 |
| | | dateView.btnConfirm.MouseUpEventHandler += (sender3, e3) => |
| | | { |
| | | if (weekName == Language.StringByID(StringId.monthly)|| weekName== Language.StringByID(StringId.weekly)) { |
| | | if (selecetdBtn.Text == Language.StringByID(StringId.monthly)|| selecetdBtn.Text == Language.StringByID(StringId.weekly)) { |
| | | //提示:还未选 |
| | | return; |
| | | |
| | | } |
| | | |
| | | if (weekName == Language.StringByID(StringId.performA)) |
| | | if (selecetdBtn.Text == Language.StringByID(StringId.performA)) |
| | | { |
| | | //执行一次 |
| | | Logic.currlogic.cycle.type = "once"; |
| | | } |
| | | else if (weekName == Language.StringByID(StringId.days)) |
| | | else if (selecetdBtn.Text == Language.StringByID(StringId.days)) |
| | | { |
| | | //每天 |
| | | Logic.currlogic.cycle.type = "day"; |
| | | |
| | | } |
| | | //选中保存之后显示文本 |
| | | button.Text = weekName; |
| | | button.Text = selecetdBtn.Text; |
| | | //移除fLayout界面 |
| | | fLayout.RemoveFromParent(); |
| | | }; |