예제 #1
0
 private void Cal_SelectedTimeChanged(object sender, MahApps.Metro.Controls.TimePickerBaseSelectionChangedEventArgs <TimeSpan?> e)
 {
     if (cal.SelectedDate != null)
     {
         Date = (DateTime)cal.SelectedDate - DateTime.Now;
         DateTime dateTime = DateTime.Now.Add(Date);
         box.Text = (dateTime).ToShortDateString() + " " + dateTime.ToShortTimeString();
         IOData.EcrireDate(Date);
     }
 }
예제 #2
0
 private void Cb_Click(object sender, RoutedEventArgs e)
 {
     if ((bool)cb.IsChecked)
     {
         Date          = new TimeSpan(0, 0, 0);
         cal.IsEnabled = false;
         DateTime dateTime = DateTime.Now;
         box.Text = (dateTime).ToShortDateString() + " " + dateTime.ToShortTimeString();
         IOData.EcrireDate(Date);
     }
     else
     {
         cal.IsEnabled = true;
     }
 }