public BackupConfig(bool isBackupEnabled, OffsetInterval backupTimes, DateTime nextScheduledBackup, IEnumerable <BackupItem> backupItems) { IsBackupEnabled = isBackupEnabled; BackupTimes = backupTimes; NextScheduledBackup = nextScheduledBackup; BackupItems = new ObservableCollection <BackupItem>(backupItems); }
private static void OnBackupTimesPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { BackupTimesControl s = (BackupTimesControl)sender; OffsetInterval newValue = (OffsetInterval)e.NewValue; DateTime?next = newValue.GetNextDateTime(); s.dprNextDate.SelectedDate = next?.Date; s.tbxNextTime.Text = ConvertTimeSpanToStringShort(next?.TimeOfDay ?? TimeSpan.Zero); s.tbxInterval.Text = ConvertTimeSpanToStringShort(newValue.Interval); }
public OffsetInterval(OffsetInterval oi) : this(oi.Offset, oi.Interval) { }