| | |
| | | Button btnStartTimeText = new Button |
| | | { |
| | | TextSize = LogicView.TextSize.text12, |
| | | Width = Application.GetRealWidth(32 + 3), |
| | | Width = Application.GetRealWidth(32 + 3+20), |
| | | Height = Application.GetRealHeight(17), |
| | | TextColor = CSS.CSS_Color.textCancelColor, |
| | | Y = Application.GetRealHeight(17), |
| | | X = Application.GetRealWidth(260), |
| | | X = Application.GetRealWidth(260-20), |
| | | Tag = "0", |
| | | }; |
| | | startTimeView.frameLayout.AddChidren(btnStartTimeText); |
| | |
| | | Button btnEndTimeText = new Button |
| | | { |
| | | TextSize = LogicView.TextSize.text12, |
| | | Width = Application.GetRealWidth(32 + 3), |
| | | Width = Application.GetRealWidth(32 + 3+20), |
| | | Height = Application.GetRealHeight(17), |
| | | TextColor = CSS.CSS_Color.textCancelColor, |
| | | Y = Application.GetRealHeight(17), |
| | | X = Application.GetRealWidth(260), |
| | | X = Application.GetRealWidth(260-20), |
| | | Tag = "0", |
| | | }; |
| | | endTimeView.frameLayout.AddChidren(btnEndTimeText); |
| | |
| | | LogicMethod.dictionary(dic, "key", "timesection"); |
| | | LogicMethod.dictionary(dic, "comparator", "="); |
| | | LogicMethod.dictionary(dic, "data_type", "string"); |
| | | LogicMethod.dictionary(dic, "value", btnStartTimeText.Text + "~" + btnEndTimeText.Text); |
| | | LogicMethod.dictionary(dic, "value", btnStartTimeText.Text + "-" + btnEndTimeText.Text); |
| | | inputTime.condition.Add(dic); |
| | | if (edit) |
| | | { |
| | |
| | | foreach (var dic in dicList) |
| | | { |
| | | string value = dic["value"]; |
| | | string startTime = value.Split('~')[0]; |
| | | string endtTime = value.Split('~')[1]; |
| | | string startTime = value.Split('-')[0]; |
| | | string endtTime = value.Split('-')[1]; |
| | | btnStartTimeText.Text = startTime; |
| | | btnStartTimeText.Tag = int.Parse(startTime.Split(':')[0]) * 60 + int.Parse(startTime.Split(':')[1]); |
| | | btnEndTimeText.Text = endtTime; |