/// <summary> /// Adapt the day planning /// </summary> /// <param name="o"></param> /// <param name="e"></param> public void AdaptDayPlanning(object o, EventArgs e) { if (!(e is TimeEventArgs)) { return; } TimeEventArgs args = (TimeEventArgs)e; }
/// <summary> /// To adapt the end time according to the start time /// </summary> /// <param name="o"></param> /// <param name="e"></param> public void TimeChangeFunc(object o, EventArgs e) { if (!(e is TimeEventArgs)) { return; } TimeEventArgs args = (TimeEventArgs)e; End.MinTime = Start.tt; }
public static void TimeChangedCallBack(DependencyObject d, DependencyPropertyChangedEventArgs e) { HourControl THIS = d as HourControl; THIS.tt = (DateTime)e.NewValue; THIS.hh = THIS.tt.Hour.ToString(); THIS.hour.Content = THIS.hh; THIS.mm = THIS.tt.Minute.ToString(); THIS.minute.Content = THIS.mm; TimeEventArgs args = new TimeEventArgs(THIS.tt); THIS.OnTimeChanged(args); }
/// <summary> /// Event for time changed /// </summary> /// <param name="args"></param> public void OnTimeChanged(TimeEventArgs args) { TimeChanged?.Invoke(this, args); }