mirror of
https://github.com/Stone-Red-Code/AutoBackup.git
synced 2026-09-04 08:56:07 +02:00
a
This commit is contained in:
+14
-15
@@ -14,18 +14,18 @@ namespace AutoBackup
|
|||||||
{
|
{
|
||||||
public partial class MainForm : Form
|
public partial class MainForm : Form
|
||||||
{
|
{
|
||||||
List<string> sourceFolders = new List<string>();
|
private List<string> sourceFolders = new List<string>();
|
||||||
List<List<string>> destinationFolders = new List<List<string>>();
|
private List<List<string>> destinationFolders = new List<List<string>>();
|
||||||
List<int[]> optionsList = new List<int[]>();
|
private List<int[]> optionsList = new List<int[]>();
|
||||||
readonly Backup backup;
|
private readonly Backup backup;
|
||||||
|
|
||||||
bool addSourceFolder = true;
|
private bool addSourceFolder = true;
|
||||||
bool blockWrite = false;
|
private bool blockWrite = false;
|
||||||
|
|
||||||
readonly string localApplicationDataPath;
|
private readonly string localApplicationDataPath;
|
||||||
|
|
||||||
const string AppName = "AutoBackup";
|
private const string AppName = "AutoBackup";
|
||||||
const string registrykey = "HKEY_CURRENT_USER\\" + AppName;
|
private const string registrykey = "HKEY_CURRENT_USER\\" + AppName;
|
||||||
|
|
||||||
public MainForm()
|
public MainForm()
|
||||||
{
|
{
|
||||||
@@ -63,7 +63,7 @@ namespace AutoBackup
|
|||||||
|
|
||||||
toolTip.SetToolTip(maxBackupsNumericUpDown, "0 = no limit");
|
toolTip.SetToolTip(maxBackupsNumericUpDown, "0 = no limit");
|
||||||
|
|
||||||
statusLabel.Location = new Point(13,13);
|
statusLabel.Location = new Point(13, 13);
|
||||||
//CopyDirecotory("D:\\Test","D:\\TestCopy");
|
//CopyDirecotory("D:\\Test","D:\\TestCopy");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ namespace AutoBackup
|
|||||||
statusLabel.Text = textToDisplay;
|
statusLabel.Text = textToDisplay;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadFolders()
|
private void LoadFolders()
|
||||||
{
|
{
|
||||||
if (!File.Exists(localApplicationDataPath + "\\data.save"))
|
if (!File.Exists(localApplicationDataPath + "\\data.save"))
|
||||||
return;
|
return;
|
||||||
@@ -126,7 +126,7 @@ namespace AutoBackup
|
|||||||
string options = line.Substring(line.LastIndexOf(">"));
|
string options = line.Substring(line.LastIndexOf(">"));
|
||||||
line = line.Replace(options, "");
|
line = line.Replace(options, "");
|
||||||
|
|
||||||
string o3 = options.Substring(options.LastIndexOf(";")+1);
|
string o3 = options.Substring(options.LastIndexOf(";") + 1);
|
||||||
options = options.Remove(options.LastIndexOf(";"));
|
options = options.Remove(options.LastIndexOf(";"));
|
||||||
string o2 = options.Substring(options.LastIndexOf(";"));
|
string o2 = options.Substring(options.LastIndexOf(";"));
|
||||||
options = options.Replace(o2, "");
|
options = options.Replace(o2, "");
|
||||||
@@ -135,7 +135,7 @@ namespace AutoBackup
|
|||||||
optionsList[index][2] = int.Parse(o3);
|
optionsList[index][2] = int.Parse(o3);
|
||||||
optionsList[index][1] = int.Parse(o2.Replace(";", ""));
|
optionsList[index][1] = int.Parse(o2.Replace(";", ""));
|
||||||
optionsList[index][0] = int.Parse(o1);
|
optionsList[index][0] = int.Parse(o1);
|
||||||
|
|
||||||
while (line.Contains("|"))
|
while (line.Contains("|"))
|
||||||
{
|
{
|
||||||
string folder = line.Substring(line.LastIndexOf("|"));
|
string folder = line.Substring(line.LastIndexOf("|"));
|
||||||
@@ -384,7 +384,6 @@ namespace AutoBackup
|
|||||||
|
|
||||||
private void MainForm_Load(object sender, EventArgs e)
|
private void MainForm_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user