예제 #1
0
 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); }
 }
예제 #2
0
 private void timeShow(Time.Time timeContext)
 {
     showHour.Text   = timeContext.Hour.ToString();
     showMinute.Text = timeContext.Minute.ToString("d2");
     showSecond.Text = timeContext.Second.ToString("d2");
 }
예제 #3
0
 private void showTime(Time.Time time) => timeContext.Text = $"{time.Hour.ToString()}:{time.Minute.ToString("d2")}:{time.Second.ToString("d2")}";
예제 #4
0
 private void userTimeShow(ref Time.Time time)
 {
     digiteHour.Value   = time.Hour;
     digiteMinute.Value = time.Minute;
     digiteSecond.Value = time.Second;
 }