| | |
| | | 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) => |
| | | { |
| | |
| | | //定义一个局部变量记录选中文本状态 |
| | | 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.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(); |
| | | }; |