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