private void AddPlanTButtonClick(object sender, EventArgs e) { var dlg = new PlanEditor { Text = "Add New Backup Plan", PlanName = "Untitled Plan" }; if (dlg.ShowDialog(this) == DialogResult.OK) { var plan = new BackupPlan.BackupPlan(dlg.PlanName, dlg.SourceFolder, dlg.DestinationFolder, null, AddLogEntry); AddPlan(plan); } }
private void EditPlanButtonClick(object sender, EventArgs e) { BackupPlan.BackupPlan plan = (BackupPlan.BackupPlan)planListView_.SelectedItems[0].Tag; var dlg = new PlanEditor { Text = "Edit Backup Plan", PlanName = plan.Name, EnableSource = false, EnableDestination = false, SourceFolder = plan.FolderToBackup, DestinationFolder = plan.DestinationFolder }; if (dlg.ShowDialog(this) == DialogResult.OK) { plan.Name = dlg.Name; SavePlans(); } }