| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextID = StringId.ColorfulFunction, |
| | | TextID = StringId.CulorfulTest, |
| | | }; |
| | | viewSwitch.AddChidren(btnSwitchText); |
| | | |
| | |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | | |
| | | contentView.AddChidren(new Button |
| | | { |
| | | Height = Application.GetRealHeight(10), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | }); |
| | | |
| | | #endregion |
| | | |
| | |
| | | btnStartColor.MouseUpEventHandler = (sender, e) => { |
| | | Action<uint> action = (color) => { |
| | | btnStartColor.BackgroundColor = color; |
| | | function.SetAttrState(FunctionAttributeKey.ColorfulBegin, color); |
| | | //function.SetAttrState(FunctionAttributeKey.ColorfulBegin, color); |
| | | }; |
| | | var rgbView = new ColorfulSettingPage(function, action,true); |
| | | MainPage.BasePageView.AddChidren(rgbView); |
| | |
| | | }; |
| | | workHoursView.AddChidren(btnWorkHours); |
| | | |
| | | var time = Convert.ToInt32( function.GetAttrState(FunctionAttributeKey.ColorfulTime)); |
| | | |
| | | |
| | | //btnWorkHours.Text = time/ 360 + Language.StringByID(StringId.h); |
| | | btnWorkHours.Text = time / 60 + Language.StringByID(StringId.m); |
| | | btnWorkHours.Text += time % 60 + Language.StringByID(StringId.s); |
| | | |
| | | var waitPage = new Loading(); |
| | | this.AddChidren(waitPage); |
| | | |
| | |
| | | { |
| | | LoadEditDialog(() => |
| | | { |
| | | btnWorkHours.Text = hour + "时"; |
| | | btnWorkHours.Text += minute + "分"; |
| | | btnWorkHours.Text += second + "秒"; |
| | | if( second == 0) |
| | | { |
| | | new PublicAssmebly().TipMsg(StringId.Tip, StringId.TimeInvalid); |
| | | return; |
| | | } |
| | | //btnWorkHours.Text = hour + "时"; |
| | | btnWorkHours.Text = second/60 + "分"; |
| | | btnWorkHours.Text += second%60 + "秒"; |
| | | new System.Threading.Thread(() => { |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.ColorfulTime, (hour * 360 + minute * 60 + second).ToString()); |
| | | var d = new Dictionary<string, string>(); |
| | | function.SetAttrState(FunctionAttributeKey.ColorfulTime, ( minute * 60 + second).ToString()); |
| | | d.Add(FunctionAttributeKey.ColorfulTime, ( minute * 60 + second).ToString()); |
| | | Control.Ins.SendWriteCommand(function, d); |
| | | }) { IsBackground = true }.Start(); |
| | | }); |
| | |
| | | btnWorkHours.MouseUpEventHandler = eventHandler; |
| | | workHoursView.MouseUpEventHandler = eventHandler; |
| | | btnWorkHoursRight.MouseUpEventHandler = eventHandler; |
| | | |
| | | |
| | | #endregion |
| | | |
| | | |
| | |
| | | { |
| | | item1.Add(i+Language.StringByID(StringId.h)); |
| | | } |
| | | for (int i = 0; i <= 59; i += 1) |
| | | for (int i = 1; i <= 120; i += 1) |
| | | { |
| | | item2.Add(i + Language.StringByID(StringId.m)); |
| | | item3.Add(i + Language.StringByID(StringId.s)); |
| | | } |
| | | uIPickerView.setNPicker(item1, item2,item3); |
| | | uIPickerView.setCurrentItems(hour, minute, second); |
| | | uIPickerView.setNPicker( item3,null,null); |
| | | uIPickerView.setCurrentItems(second-1,0,0); |
| | | optionBaseView.AddChidren(uIPickerView); |
| | | |
| | | dialog.Show(); |
| | |
| | | dialog.Close(); |
| | | }; |
| | | uIPickerView.OnSelectChangeEvent = (int1, int2, int3) => { |
| | | hour = int1; |
| | | minute = int2; |
| | | second = int3; |
| | | second = int1+1; |
| | | }; |
| | | btnConfrim.MouseUpEventHandler = (sender, e) => { |
| | | dialog.Close(); |