private void btnSave_Click(object sender, RoutedEventArgs e) { string[] strs = timeContext.Text.Split(':'); try { Time.Time time = new Time.Time(Convert.ToInt32(strs[0]), Convert.ToInt32(strs[1]), Convert.ToInt32(strs[2])); switch (statusEnum) { case Status.Timer: Data.Timer = new Time.Timer(time); break; case Status.OverTime: Data.OverTimer = new Time.Overtime(time); break; case Status.HourMeter: Data.HourMeter = new Time.HourMeter(time); break; } OrdinaryPage.Updata(); } catch { MainWindow.OperateMessage(Message.ParameterError); } }
private void timeShow(Time.Time timeContext) { showHour.Text = timeContext.Hour.ToString(); showMinute.Text = timeContext.Minute.ToString("d2"); showSecond.Text = timeContext.Second.ToString("d2"); }
private void showTime(Time.Time time) => timeContext.Text = $"{time.Hour.ToString()}:{time.Minute.ToString("d2")}:{time.Second.ToString("d2")}";
private void userTimeShow(ref Time.Time time) { digiteHour.Value = time.Hour; digiteMinute.Value = time.Minute; digiteSecond.Value = time.Second; }