diff --git a/MainForm.cs b/MainForm.cs index 12db87a..dd2ef52 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -14,18 +14,18 @@ namespace AutoBackup { public partial class MainForm : Form { - List sourceFolders = new List(); - List> destinationFolders = new List>(); - List optionsList = new List(); - readonly Backup backup; + private List sourceFolders = new List(); + private List> destinationFolders = new List>(); + private List optionsList = new List(); + private readonly Backup backup; - bool addSourceFolder = true; - bool blockWrite = false; + private bool addSourceFolder = true; + private bool blockWrite = false; - readonly string localApplicationDataPath; + private readonly string localApplicationDataPath; - const string AppName = "AutoBackup"; - const string registrykey = "HKEY_CURRENT_USER\\" + AppName; + private const string AppName = "AutoBackup"; + private const string registrykey = "HKEY_CURRENT_USER\\" + AppName; public MainForm() { @@ -63,7 +63,7 @@ namespace AutoBackup toolTip.SetToolTip(maxBackupsNumericUpDown, "0 = no limit"); - statusLabel.Location = new Point(13,13); + statusLabel.Location = new Point(13, 13); //CopyDirecotory("D:\\Test","D:\\TestCopy"); } @@ -103,7 +103,7 @@ namespace AutoBackup statusLabel.Text = textToDisplay; } - void LoadFolders() + private void LoadFolders() { if (!File.Exists(localApplicationDataPath + "\\data.save")) return; @@ -126,7 +126,7 @@ namespace AutoBackup string options = line.Substring(line.LastIndexOf(">")); line = line.Replace(options, ""); - string o3 = options.Substring(options.LastIndexOf(";")+1); + string o3 = options.Substring(options.LastIndexOf(";") + 1); options = options.Remove(options.LastIndexOf(";")); string o2 = options.Substring(options.LastIndexOf(";")); options = options.Replace(o2, ""); @@ -135,7 +135,7 @@ namespace AutoBackup optionsList[index][2] = int.Parse(o3); optionsList[index][1] = int.Parse(o2.Replace(";", "")); optionsList[index][0] = int.Parse(o1); - + while (line.Contains("|")) { string folder = line.Substring(line.LastIndexOf("|")); @@ -384,7 +384,6 @@ namespace AutoBackup private void MainForm_Load(object sender, EventArgs e) { - } } -} +} \ No newline at end of file