public PropertiesForm(Settings settings, string[] takenBackupNames, bool backupIsImport=false) { InitializeComponent(); this.Saved = false; this.settings = settings; this.takenBackupNames = takenBackupNames; // Only use this info if the backup isn't new. New backups don't yet exist, in the scheduler or in the filesystem this.initialBackupName = backupIsImport ? null : settings.Name; if (backupIsImport) { this.Text = "Importing Backup: "+settings.Name; } this.loadValues(); }
public RestoreForm(Settings settings) { InitializeComponent(); this.settings = settings; this.Saved = false; this.labelBackupName.Text = settings.Name; if (settings.MirrorEnabled) this.comboBoxBackends.Items.Add("Mirror"); if (settings.S3Enabled) this.comboBoxBackends.Items.Add("S3"); this.comboBoxBackends.SelectedIndex = 0; if (comboBoxBackends.Items.Count == 1) this.comboBoxBackends.Enabled = false; this.textBoxRestoreTo.Text = settings.Source; }