Example #1
0
 public BackupConfig(bool isBackupEnabled, OffsetInterval backupTimes,
                     DateTime nextScheduledBackup, IEnumerable <BackupItem> backupItems)
 {
     IsBackupEnabled     = isBackupEnabled;
     BackupTimes         = backupTimes;
     NextScheduledBackup = nextScheduledBackup;
     BackupItems         = new ObservableCollection <BackupItem>(backupItems);
 }
Example #2
0
        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);
        }
Example #3
0
 public OffsetInterval(OffsetInterval oi) : this(oi.Offset, oi.Interval)
 {
 }