Imported MicronSync v1.2.5.0
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace MicronSync
|
||||
{
|
||||
@@ -90,6 +91,12 @@ namespace MicronSync
|
||||
return newPath;
|
||||
}
|
||||
|
||||
public double CalculateFileSizeMB (string file)
|
||||
{
|
||||
FileInfo fi = new FileInfo(file);
|
||||
return ConvertBytesToMB(fi.Length);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region String manipulation
|
||||
@@ -120,6 +127,56 @@ namespace MicronSync
|
||||
return result;
|
||||
}
|
||||
|
||||
public string GetRootPath(string input)
|
||||
{
|
||||
string result = null;
|
||||
Match unc = Regex.Match(input, @"(\\\\(\w+)\\)");
|
||||
Match drive = Regex.Match(input, @"(\w:\\)");
|
||||
|
||||
string varPath = ConvertPathToVariable(input);
|
||||
if (!string.IsNullOrEmpty(varPath))
|
||||
result = varPath;
|
||||
else
|
||||
{
|
||||
if (input.StartsWith(@"\\"))
|
||||
result = unc.Value;
|
||||
else
|
||||
result = drive.Value;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public string ConvertPathToVariable(string fullPath)
|
||||
{
|
||||
string result = null;
|
||||
|
||||
if (!string.IsNullOrEmpty(fullPath))
|
||||
foreach (var item in MSConfig.SysVars)
|
||||
if (fullPath.StartsWith(item.Value))
|
||||
{
|
||||
result = item.Key;
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public string ConvertVariableToPath(string variable)
|
||||
{
|
||||
string result = variable;
|
||||
|
||||
if (!string.IsNullOrEmpty(variable))
|
||||
foreach (var item in MSConfig.SysVars)
|
||||
if (variable.StartsWith(item.Key))
|
||||
{
|
||||
result = item.Value;
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion.
|
||||
|
||||
#region Filesystem Modification
|
||||
@@ -216,6 +273,15 @@ namespace MicronSync
|
||||
|
||||
#endregion
|
||||
|
||||
#region Conversion
|
||||
|
||||
public double ConvertBytesToMB(double bytes)
|
||||
{
|
||||
return Math.Round(bytes / 1024f / 1024f, 2);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public void Dispose() { GC.Collect(); }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
<data name="logoPictureBox.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAEWdJREFUeF7tnVlsVNcZx71gGy9gj7eZsT2e3UCI2QwY2zhgwmZWb0ASGkgDhKSQ
|
||||
wgAADsIBFShKgAAAEWdJREFUeF7tnVlsVNcZx71gGy9gj7eZsT2e3UCI2QwY2zhgwmZWb0ASGkgDhKSQ
|
||||
EDAEUUQTGkKCCJCUEiBsYYmqPlVRFVVVVVVVVUVVVEWoqqI+5KEPVVRVURWhKKoidPv9L3OGc6/PeO42
|
||||
dyae8/CTrHs8Z/v+33fPOffccwsURSmU5C9SAHmOFECeIwWQ50gB5DlSAHmOIQEUFBQUc5R8DynTUZ4C
|
||||
/f+J8sp1VDuJ7CgirQASGSJjvuMqc4QpAqoTeBLUJWjQ4eXQpwH2O5YPy1dUpqhu2YAXsioGkU15xhUA
|
||||
|
||||
+3
-1
@@ -28,6 +28,7 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ChangeLog));
|
||||
this.richTextBox = new System.Windows.Forms.RichTextBox();
|
||||
this.labelVersionInfo = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
@@ -59,9 +60,10 @@
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.ClientSize = new System.Drawing.Size(384, 411);
|
||||
this.ClientSize = new System.Drawing.Size(384, 412);
|
||||
this.Controls.Add(this.labelVersionInfo);
|
||||
this.Controls.Add(this.richTextBox);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MinimumSize = new System.Drawing.Size(400, 450);
|
||||
this.Name = "ChangeLog";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,39 @@
|
||||
// Comments are denoted at the beginning of a line with two forward slashes.
|
||||
[New Features]
|
||||
- The size of the source backup directory can now be calculated within MicronSync.
|
||||
- Backups created can have their size shown once calculated from the restore tab.
|
||||
|
||||
[Enhancements]
|
||||
- MicronSync now prompts to save unsaved changes prior to loading a new config or creating a new one.
|
||||
|
||||
[MicronSync 1.2.1.0]-------------------------------------------------------------------------------
|
||||
[New Features]
|
||||
- Completion time added to backup and restore tasks.
|
||||
- Compression presets for quicker and more optimal compression.
|
||||
|
||||
[Enhancements]
|
||||
- Ability to refresh list of available drives on the fly.
|
||||
|
||||
[MicronSync 1.2.0.0]-------------------------------------------------------------------------------
|
||||
// Comments are denoted at the beginning of a line with two forward slashes.
|
||||
//
|
||||
[New Features]
|
||||
- Paths have been partitioned to allow use of environment variables.
|
||||
- Directories which start with supported environment variables are automatically detected upon import.
|
||||
- Automatic conversion of environment variables for paths dragged in from explorer or browsed to from directory selector.
|
||||
|
||||
[Enhancements]
|
||||
- User interface redesigned to be more user friendly.
|
||||
- The Backup/Restore tab selection is now saved as part of config files.
|
||||
- Compression level indicator added beside slider control.
|
||||
|
||||
[Notes]
|
||||
- Old configuration files cannot be used with this new version due to changes made to paths. Sorry for the inconvenience!
|
||||
|
||||
[MicronSync 1.1.0.1]-------------------------------------------------------------------------------
|
||||
[Bug Fixes]
|
||||
- Fixed new pre-backup algorithm from placing backup inside of source directory when the path ended with a "\".
|
||||
|
||||
***[MicronSync 1.1.0.0]***
|
||||
[MicronSync 1.1.0.0]-------------------------------------------------------------------------------
|
||||
[New Features]
|
||||
- Inclusion of a changelog (the very thing you currently have open!)
|
||||
- Ability to replicate destination and source paths between backup and restore tabs.
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
namespace MicronSync.Components.Forms
|
||||
{
|
||||
partial class DirSizeCalculatorPrompt
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.labelCalculating = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
this.buttonCancel.Location = new System.Drawing.Point(100, 76);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonCancel.TabIndex = 3;
|
||||
this.buttonCancel.Text = "Cancel";
|
||||
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
|
||||
//
|
||||
// labelCalculating
|
||||
//
|
||||
this.labelCalculating.AutoSize = true;
|
||||
this.labelCalculating.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelCalculating.Location = new System.Drawing.Point(13, 13);
|
||||
this.labelCalculating.Name = "labelCalculating";
|
||||
this.labelCalculating.Size = new System.Drawing.Size(257, 25);
|
||||
this.labelCalculating.TabIndex = 2;
|
||||
this.labelCalculating.Text = "Calculating, please wait...";
|
||||
//
|
||||
// DirSizeCalculatorPrompt
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(284, 111);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
this.Controls.Add(this.labelCalculating);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "DirSizeCalculatorPrompt";
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "MicronSync";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.DirSizeCalculatorPrompt_FormClosing);
|
||||
this.Load += new System.EventHandler(this.DirSizeCalculatorPrompt_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button buttonCancel;
|
||||
private System.Windows.Forms.Label labelCalculating;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace MicronSync.Components.Forms
|
||||
{
|
||||
public partial class DirSizeCalculatorPrompt : Form
|
||||
{
|
||||
public DirSizeCalculatorPrompt()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
BackgroundWorker bw = new BackgroundWorker();
|
||||
public string TargetDirectory;
|
||||
public double Result = 0;
|
||||
private bool canClose;
|
||||
|
||||
#region Worker
|
||||
|
||||
private void FinishCalculation(object sender, RunWorkerCompletedEventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
private void StartCalculation(object sender, DoWorkEventArgs e)
|
||||
{
|
||||
double result = 0;
|
||||
|
||||
string[] allFiles = Directory.GetFiles(TargetDirectory, "*.*", SearchOption.AllDirectories);
|
||||
foreach (var file in allFiles)
|
||||
{
|
||||
if (!bw.CancellationPending)
|
||||
{
|
||||
FileInfo info = new FileInfo(file);
|
||||
result += info.Length;
|
||||
}
|
||||
else
|
||||
result = 0;
|
||||
}
|
||||
|
||||
using (CommonIO _cio = new CommonIO())
|
||||
Result = _cio.ConvertBytesToMB(result);
|
||||
|
||||
canClose = true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region UI
|
||||
|
||||
private void DirSizeCalculatorPrompt_Load(object sender, EventArgs e)
|
||||
{
|
||||
bw.WorkerSupportsCancellation = true;
|
||||
bw.DoWork += new DoWorkEventHandler(StartCalculation);
|
||||
bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(FinishCalculation);
|
||||
bw.RunWorkerAsync();
|
||||
}
|
||||
|
||||
private void DirSizeCalculatorPrompt_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
bw.Dispose();
|
||||
GC.Collect();
|
||||
|
||||
if (!canClose)
|
||||
e.Cancel = true;
|
||||
else
|
||||
e.Cancel = false;
|
||||
}
|
||||
|
||||
private void buttonCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
bw.CancelAsync();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -56,7 +56,7 @@ namespace MicronSync.Components
|
||||
while (progWait.Value < 100 &&
|
||||
!timerStopped)
|
||||
{
|
||||
Thread.Sleep(1000);
|
||||
Thread.Sleep(250);
|
||||
position += stepAmount;
|
||||
bwTimer.ReportProgress(position);
|
||||
}
|
||||
|
||||
+1
-1
@@ -112,7 +112,7 @@ namespace MicronSync.Components.Forms
|
||||
this.btnSzUseBackup.Name = "btnSzUseBackup";
|
||||
this.btnSzUseBackup.Size = new System.Drawing.Size(162, 23);
|
||||
this.btnSzUseBackup.TabIndex = 2;
|
||||
this.btnSzUseBackup.Text = "Overwrite file with new backup";
|
||||
this.btnSzUseBackup.Text = "Replace file with backup";
|
||||
this.btnSzUseBackup.UseVisualStyleBackColor = true;
|
||||
this.btnSzUseBackup.Click += new System.EventHandler(this.btnSzUseBackup_Click);
|
||||
//
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace MicronSync.Components
|
||||
@@ -22,6 +17,8 @@ namespace MicronSync.Components
|
||||
public LMZAParser.endResult _endResultLMZA = LMZAParser.endResult.Default;
|
||||
public CommonIO.endResult _endResultCIO = CommonIO.endResult.Default;
|
||||
private readonly MSConfig _ManageConfig_RO = MainWindow._MSConfig;
|
||||
private Stopwatch stopWatch = new Stopwatch();
|
||||
public TimeSpan compTime;
|
||||
|
||||
public WorkerUI()
|
||||
{
|
||||
@@ -93,6 +90,9 @@ namespace MicronSync.Components
|
||||
|
||||
private void WorkerUI_Load(object sender, EventArgs e)
|
||||
{
|
||||
// Start stopwatch.
|
||||
stopWatch.Start();
|
||||
|
||||
switch (SetWorkerMode)
|
||||
{
|
||||
case WorkerMode.Backup:
|
||||
@@ -115,6 +115,13 @@ namespace MicronSync.Components
|
||||
|
||||
private void WorkerUI_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
// Stop stopwatch.
|
||||
stopWatch.Stop();
|
||||
compTime = new TimeSpan(
|
||||
stopWatch.Elapsed.Hours,
|
||||
stopWatch.Elapsed.Minutes,
|
||||
stopWatch.Elapsed.Seconds);
|
||||
|
||||
if (!canClose)
|
||||
e.Cancel = true;
|
||||
else
|
||||
|
||||
@@ -13,12 +13,13 @@ namespace MicronSync
|
||||
MainWindow_Warn_OverwriteFile,
|
||||
NewRegKeyUI_CorrectKey,
|
||||
MainWindow_SaveChanges,
|
||||
MainWindow_LoadIncompatible,
|
||||
MainWindow_SZNotInstalled,
|
||||
}
|
||||
|
||||
public enum errCodes
|
||||
{
|
||||
_TestSample,
|
||||
MainWindow_SZNotInstalled,
|
||||
WorkerUI_BadBackupPath,
|
||||
WorkerUI_BadRestorePath,
|
||||
MainWindow_RestrictedPath,
|
||||
@@ -49,10 +50,6 @@ namespace MicronSync
|
||||
MessageBox.Show("This is a sample error message", "Sample Error Message",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
break;
|
||||
case errCodes.MainWindow_SZNotInstalled:
|
||||
MessageBox.Show("7-Zip is not currently installed but is required for MicronSync to run.", "MicronSync",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
break;
|
||||
case errCodes.WorkerUI_BadBackupPath:
|
||||
MessageBox.Show("The specified source path is inaccessible. Please ensure the path exists and you have read/write permission, then try again.", "MicronSync",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
@@ -146,8 +143,16 @@ namespace MicronSync
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
break;
|
||||
case msgCodes.MainWindow_SaveChanges:
|
||||
_dialogResult = MessageBox.Show($"There are currently unsaved changes, would you like to save before exiting?\n{info}", "MicronSync",
|
||||
MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
||||
_dialogResult = MessageBox.Show($"There are currently unsaved changes, would you like to save before exiting?\n\n{info}", "MicronSync",
|
||||
MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
|
||||
break;
|
||||
case msgCodes.MainWindow_LoadIncompatible:
|
||||
_dialogResult = MessageBox.Show($"You are trying load a legacy config file (v{info}) which is incompatible with this version of MicronSync. Please create a new config file, sorry for any inconvenience caused!", "MicronSync - Incompatible config",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
break;
|
||||
case msgCodes.MainWindow_SZNotInstalled:
|
||||
_dialogResult = MessageBox.Show("7-Zip is not currently installed but is required for MicronSync to run. Would you like to be taken to the download page?", "MicronSync",
|
||||
MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation);
|
||||
break;
|
||||
}
|
||||
return _dialogResult;
|
||||
|
||||
Binary file not shown.
Generated
+469
-174
@@ -44,28 +44,47 @@
|
||||
this.labelBackupDate = new System.Windows.Forms.Label();
|
||||
this.tabControl = new System.Windows.Forms.TabControl();
|
||||
this.tabBackup = new System.Windows.Forms.TabPage();
|
||||
this.btnRepBackupDest = new System.Windows.Forms.Button();
|
||||
this.btnRepBackupSource = new System.Windows.Forms.Button();
|
||||
this.cmbRootBDst = new System.Windows.Forms.ComboBox();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.btnSourceSize = new System.Windows.Forms.Button();
|
||||
this.labelSourceSizeValue = new System.Windows.Forms.Label();
|
||||
this.labelSourceSize = new System.Windows.Forms.Label();
|
||||
this.labelLastChange = new System.Windows.Forms.Label();
|
||||
this.panelBHighlight = new System.Windows.Forms.Panel();
|
||||
this.cmbRootBSrc = new System.Windows.Forms.ComboBox();
|
||||
this.btnRepBackupSource = new System.Windows.Forms.Button();
|
||||
this.labelBackupSource = new System.Windows.Forms.Label();
|
||||
this.btnBackupBrowseSource = new System.Windows.Forms.Button();
|
||||
this.textBackupSource = new System.Windows.Forms.TextBox();
|
||||
this.btnRepBackupDest = new System.Windows.Forms.Button();
|
||||
this.groupBackupOptions = new System.Windows.Forms.GroupBox();
|
||||
this.labelCompressionPreset = new System.Windows.Forms.Label();
|
||||
this.cmbComPreset = new System.Windows.Forms.ComboBox();
|
||||
this.textCompressionLevel = new System.Windows.Forms.MaskedTextBox();
|
||||
this.labelExclusions = new System.Windows.Forms.Label();
|
||||
this.btnFilters = new System.Windows.Forms.Button();
|
||||
this.labelMaxCompression = new System.Windows.Forms.Label();
|
||||
this.labelNoCompression = new System.Windows.Forms.Label();
|
||||
this.labelBackupSource = new System.Windows.Forms.Label();
|
||||
this.btnBackupBrowseDest = new System.Windows.Forms.Button();
|
||||
this.textBackupSource = new System.Windows.Forms.TextBox();
|
||||
this.btnBackupBrowseSource = new System.Windows.Forms.Button();
|
||||
this.labelBackupDest = new System.Windows.Forms.Label();
|
||||
this.textBackupDest = new System.Windows.Forms.TextBox();
|
||||
this.tabRestore = new System.Windows.Forms.TabPage();
|
||||
this.btnRepRestoreDest = new System.Windows.Forms.Button();
|
||||
this.btnRepRestoreSource = new System.Windows.Forms.Button();
|
||||
this.cmbRootRDst = new System.Windows.Forms.ComboBox();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.btnCalcBackupSize = new System.Windows.Forms.Button();
|
||||
this.labelBackupSizeValue = new System.Windows.Forms.Label();
|
||||
this.labelBackupSize = new System.Windows.Forms.Label();
|
||||
this.labelLastBackup = new System.Windows.Forms.Label();
|
||||
this.btnRepRestoreDest = new System.Windows.Forms.Button();
|
||||
this.labelRestoreSource = new System.Windows.Forms.Label();
|
||||
this.btnRestoreBrowseDest = new System.Windows.Forms.Button();
|
||||
this.textRestoreSource = new System.Windows.Forms.TextBox();
|
||||
this.btnRestoreBrowseSource = new System.Windows.Forms.Button();
|
||||
this.labelRestoreDest = new System.Windows.Forms.Label();
|
||||
this.textRestoreDest = new System.Windows.Forms.TextBox();
|
||||
this.panel3 = new System.Windows.Forms.Panel();
|
||||
this.btnRepRestoreSource = new System.Windows.Forms.Button();
|
||||
this.cmbRootRSrc = new System.Windows.Forms.ComboBox();
|
||||
this.btnRestoreBrowseSource = new System.Windows.Forms.Button();
|
||||
this.textRestoreSource = new System.Windows.Forms.TextBox();
|
||||
this.labelDescription = new System.Windows.Forms.Label();
|
||||
this.textDescription = new System.Windows.Forms.TextBox();
|
||||
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
|
||||
@@ -77,8 +96,8 @@
|
||||
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.refreshDrivesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.websiteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.changelogToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.registerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@@ -90,8 +109,12 @@
|
||||
this.statusStrip.SuspendLayout();
|
||||
this.tabControl.SuspendLayout();
|
||||
this.tabBackup.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
this.panelBHighlight.SuspendLayout();
|
||||
this.groupBackupOptions.SuspendLayout();
|
||||
this.tabRestore.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
this.panel3.SuspendLayout();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
@@ -99,9 +122,9 @@
|
||||
//
|
||||
this.groupRestoreOptions.Controls.Add(this.chkBackup);
|
||||
this.groupRestoreOptions.Controls.Add(this.chkPurge);
|
||||
this.groupRestoreOptions.Location = new System.Drawing.Point(161, 85);
|
||||
this.groupRestoreOptions.Location = new System.Drawing.Point(10, 85);
|
||||
this.groupRestoreOptions.Name = "groupRestoreOptions";
|
||||
this.groupRestoreOptions.Size = new System.Drawing.Size(229, 96);
|
||||
this.groupRestoreOptions.Size = new System.Drawing.Size(209, 96);
|
||||
this.groupRestoreOptions.TabIndex = 4;
|
||||
this.groupRestoreOptions.TabStop = false;
|
||||
this.groupRestoreOptions.Text = "Restore Options";
|
||||
@@ -111,9 +134,9 @@
|
||||
this.chkBackup.AutoSize = true;
|
||||
this.chkBackup.Location = new System.Drawing.Point(9, 42);
|
||||
this.chkBackup.Name = "chkBackup";
|
||||
this.chkBackup.Size = new System.Drawing.Size(174, 17);
|
||||
this.chkBackup.TabIndex = 8;
|
||||
this.chkBackup.Text = "Backup source before restoring";
|
||||
this.chkBackup.Size = new System.Drawing.Size(193, 17);
|
||||
this.chkBackup.TabIndex = 22;
|
||||
this.chkBackup.Text = "Backup destination before restoring";
|
||||
this.chkBackup.UseVisualStyleBackColor = true;
|
||||
this.chkBackup.CheckedChanged += new System.EventHandler(this.checkBackup_CheckedChanged);
|
||||
//
|
||||
@@ -122,40 +145,41 @@
|
||||
this.chkPurge.AutoSize = true;
|
||||
this.chkPurge.Location = new System.Drawing.Point(9, 19);
|
||||
this.chkPurge.Name = "chkPurge";
|
||||
this.chkPurge.Size = new System.Drawing.Size(132, 17);
|
||||
this.chkPurge.TabIndex = 7;
|
||||
this.chkPurge.Text = "Purge source directory";
|
||||
this.chkPurge.Size = new System.Drawing.Size(151, 17);
|
||||
this.chkPurge.TabIndex = 21;
|
||||
this.chkPurge.Text = "Purge destination directory";
|
||||
this.chkPurge.UseVisualStyleBackColor = true;
|
||||
this.chkPurge.CheckedChanged += new System.EventHandler(this.checkMirrorSrcToDst_CheckedChanged);
|
||||
//
|
||||
// trackBar
|
||||
//
|
||||
this.trackBar.BackColor = System.Drawing.Color.White;
|
||||
this.trackBar.Location = new System.Drawing.Point(9, 34);
|
||||
this.trackBar.Location = new System.Drawing.Point(6, 45);
|
||||
this.trackBar.Maximum = 9;
|
||||
this.trackBar.Name = "trackBar";
|
||||
this.trackBar.Size = new System.Drawing.Size(213, 45);
|
||||
this.trackBar.TabIndex = 6;
|
||||
this.trackBar.Size = new System.Drawing.Size(198, 45);
|
||||
this.trackBar.TabIndex = 10;
|
||||
this.trackBar.Value = 4;
|
||||
this.trackBar.ValueChanged += new System.EventHandler(this.trackBar_ValueChanged);
|
||||
//
|
||||
// labelCompressionLevel
|
||||
//
|
||||
this.labelCompressionLevel.AutoSize = true;
|
||||
this.labelCompressionLevel.Location = new System.Drawing.Point(123, 16);
|
||||
this.labelCompressionLevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelCompressionLevel.Location = new System.Drawing.Point(12, 20);
|
||||
this.labelCompressionLevel.Name = "labelCompressionLevel";
|
||||
this.labelCompressionLevel.Size = new System.Drawing.Size(99, 13);
|
||||
this.labelCompressionLevel.Size = new System.Drawing.Size(164, 13);
|
||||
this.labelCompressionLevel.TabIndex = 2;
|
||||
this.labelCompressionLevel.Text = "Compression Level:";
|
||||
this.labelCompressionLevel.Text = "Compression Level: Medium";
|
||||
//
|
||||
// statusStrip
|
||||
//
|
||||
this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripStatus,
|
||||
this.statusLabel});
|
||||
this.statusStrip.Location = new System.Drawing.Point(0, 294);
|
||||
this.statusStrip.Location = new System.Drawing.Point(0, 264);
|
||||
this.statusStrip.Name = "statusStrip";
|
||||
this.statusStrip.Size = new System.Drawing.Size(434, 22);
|
||||
this.statusStrip.Size = new System.Drawing.Size(684, 22);
|
||||
this.statusStrip.SizingGrip = false;
|
||||
this.statusStrip.TabIndex = 5;
|
||||
this.statusStrip.Text = "statusStrip1";
|
||||
@@ -173,10 +197,10 @@
|
||||
// btnRestore
|
||||
//
|
||||
this.btnRestore.Enabled = false;
|
||||
this.btnRestore.Location = new System.Drawing.Point(10, 145);
|
||||
this.btnRestore.Location = new System.Drawing.Point(9, 145);
|
||||
this.btnRestore.Name = "btnRestore";
|
||||
this.btnRestore.Size = new System.Drawing.Size(141, 36);
|
||||
this.btnRestore.TabIndex = 10;
|
||||
this.btnRestore.Size = new System.Drawing.Size(120, 36);
|
||||
this.btnRestore.TabIndex = 23;
|
||||
this.btnRestore.Text = "Restore";
|
||||
this.btnRestore.UseVisualStyleBackColor = true;
|
||||
this.btnRestore.Click += new System.EventHandler(this.btnRestore_Click);
|
||||
@@ -184,10 +208,10 @@
|
||||
// btnBackup
|
||||
//
|
||||
this.btnBackup.Enabled = false;
|
||||
this.btnBackup.Location = new System.Drawing.Point(10, 145);
|
||||
this.btnBackup.Location = new System.Drawing.Point(9, 145);
|
||||
this.btnBackup.Name = "btnBackup";
|
||||
this.btnBackup.Size = new System.Drawing.Size(141, 36);
|
||||
this.btnBackup.TabIndex = 9;
|
||||
this.btnBackup.Size = new System.Drawing.Size(120, 36);
|
||||
this.btnBackup.TabIndex = 11;
|
||||
this.btnBackup.Text = "Backup";
|
||||
this.btnBackup.UseVisualStyleBackColor = true;
|
||||
this.btnBackup.Click += new System.EventHandler(this.btnBackup_Click);
|
||||
@@ -195,7 +219,9 @@
|
||||
// labelSyncDate
|
||||
//
|
||||
this.labelSyncDate.AutoSize = true;
|
||||
this.labelSyncDate.Location = new System.Drawing.Point(8, 129);
|
||||
this.labelSyncDate.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelSyncDate.ForeColor = System.Drawing.SystemColors.Control;
|
||||
this.labelSyncDate.Location = new System.Drawing.Point(11, 28);
|
||||
this.labelSyncDate.Name = "labelSyncDate";
|
||||
this.labelSyncDate.Size = new System.Drawing.Size(27, 13);
|
||||
this.labelSyncDate.TabIndex = 11;
|
||||
@@ -205,7 +231,8 @@
|
||||
// labelBackupDate
|
||||
//
|
||||
this.labelBackupDate.AutoSize = true;
|
||||
this.labelBackupDate.Location = new System.Drawing.Point(8, 129);
|
||||
this.labelBackupDate.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelBackupDate.Location = new System.Drawing.Point(11, 28);
|
||||
this.labelBackupDate.Name = "labelBackupDate";
|
||||
this.labelBackupDate.Size = new System.Drawing.Size(27, 13);
|
||||
this.labelBackupDate.TabIndex = 12;
|
||||
@@ -220,77 +247,261 @@
|
||||
this.tabControl.Multiline = true;
|
||||
this.tabControl.Name = "tabControl";
|
||||
this.tabControl.SelectedIndex = 0;
|
||||
this.tabControl.Size = new System.Drawing.Size(407, 214);
|
||||
this.tabControl.Size = new System.Drawing.Size(672, 214);
|
||||
this.tabControl.TabIndex = 1;
|
||||
this.tabControl.SelectedIndexChanged += new System.EventHandler(this.tabControl_SelectedIndexChanged);
|
||||
//
|
||||
// tabBackup
|
||||
//
|
||||
this.tabBackup.Controls.Add(this.cmbRootBDst);
|
||||
this.tabBackup.Controls.Add(this.panel1);
|
||||
this.tabBackup.Controls.Add(this.panelBHighlight);
|
||||
this.tabBackup.Controls.Add(this.btnRepBackupDest);
|
||||
this.tabBackup.Controls.Add(this.btnRepBackupSource);
|
||||
this.tabBackup.Controls.Add(this.labelLastChange);
|
||||
this.tabBackup.Controls.Add(this.groupBackupOptions);
|
||||
this.tabBackup.Controls.Add(this.labelBackupSource);
|
||||
this.tabBackup.Controls.Add(this.btnBackupBrowseDest);
|
||||
this.tabBackup.Controls.Add(this.textBackupSource);
|
||||
this.tabBackup.Controls.Add(this.btnBackupBrowseSource);
|
||||
this.tabBackup.Controls.Add(this.labelBackupDest);
|
||||
this.tabBackup.Controls.Add(this.labelSyncDate);
|
||||
this.tabBackup.Controls.Add(this.textBackupDest);
|
||||
this.tabBackup.Controls.Add(this.btnBackup);
|
||||
this.tabBackup.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabBackup.Name = "tabBackup";
|
||||
this.tabBackup.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabBackup.Size = new System.Drawing.Size(399, 188);
|
||||
this.tabBackup.Size = new System.Drawing.Size(664, 188);
|
||||
this.tabBackup.TabIndex = 0;
|
||||
this.tabBackup.Text = "Backup";
|
||||
this.tabBackup.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnRepBackupDest
|
||||
// cmbRootBDst
|
||||
//
|
||||
this.btnRepBackupDest.Location = new System.Drawing.Point(366, 50);
|
||||
this.btnRepBackupDest.Name = "btnRepBackupDest";
|
||||
this.btnRepBackupDest.Size = new System.Drawing.Size(24, 20);
|
||||
this.btnRepBackupDest.TabIndex = 31;
|
||||
this.btnRepBackupDest.Text = ">";
|
||||
this.btnRepBackupDest.UseVisualStyleBackColor = true;
|
||||
this.btnRepBackupDest.Click += new System.EventHandler(this.btnRepBackupDest_Click);
|
||||
this.cmbRootBDst.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbRootBDst.FormattingEnabled = true;
|
||||
this.cmbRootBDst.Items.AddRange(new object[] {
|
||||
""});
|
||||
this.cmbRootBDst.Location = new System.Drawing.Point(88, 50);
|
||||
this.cmbRootBDst.Name = "cmbRootBDst";
|
||||
this.cmbRootBDst.Size = new System.Drawing.Size(125, 21);
|
||||
this.cmbRootBDst.TabIndex = 6;
|
||||
this.cmbRootBDst.SelectedIndexChanged += new System.EventHandler(this.cmbRootBDst_SelectedIndexChanged);
|
||||
//
|
||||
// btnRepBackupSource
|
||||
// panel1
|
||||
//
|
||||
this.btnRepBackupSource.Location = new System.Drawing.Point(366, 12);
|
||||
this.btnRepBackupSource.Name = "btnRepBackupSource";
|
||||
this.btnRepBackupSource.Size = new System.Drawing.Size(24, 20);
|
||||
this.btnRepBackupSource.TabIndex = 30;
|
||||
this.btnRepBackupSource.Text = ">";
|
||||
this.btnRepBackupSource.UseVisualStyleBackColor = true;
|
||||
this.btnRepBackupSource.Click += new System.EventHandler(this.btnRepBackupSource_Click);
|
||||
this.panel1.BackColor = System.Drawing.Color.MediumSeaGreen;
|
||||
this.panel1.Controls.Add(this.btnSourceSize);
|
||||
this.panel1.Controls.Add(this.labelSourceSizeValue);
|
||||
this.panel1.Controls.Add(this.labelSourceSize);
|
||||
this.panel1.Controls.Add(this.labelLastChange);
|
||||
this.panel1.Controls.Add(this.labelSyncDate);
|
||||
this.panel1.Controls.Add(this.btnBackup);
|
||||
this.panel1.Location = new System.Drawing.Point(528, 0);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(136, 188);
|
||||
this.panel1.TabIndex = 33;
|
||||
//
|
||||
// btnSourceSize
|
||||
//
|
||||
this.btnSourceSize.Location = new System.Drawing.Point(9, 93);
|
||||
this.btnSourceSize.Name = "btnSourceSize";
|
||||
this.btnSourceSize.Size = new System.Drawing.Size(60, 23);
|
||||
this.btnSourceSize.TabIndex = 34;
|
||||
this.btnSourceSize.Text = "Calculate";
|
||||
this.btnSourceSize.UseVisualStyleBackColor = true;
|
||||
this.btnSourceSize.Click += new System.EventHandler(this.btnSourceSize_Click);
|
||||
//
|
||||
// labelSourceSizeValue
|
||||
//
|
||||
this.labelSourceSizeValue.AutoSize = true;
|
||||
this.labelSourceSizeValue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelSourceSizeValue.ForeColor = System.Drawing.Color.White;
|
||||
this.labelSourceSizeValue.Location = new System.Drawing.Point(11, 72);
|
||||
this.labelSourceSizeValue.Name = "labelSourceSizeValue";
|
||||
this.labelSourceSizeValue.Size = new System.Drawing.Size(27, 13);
|
||||
this.labelSourceSizeValue.TabIndex = 33;
|
||||
this.labelSourceSizeValue.Text = "N/A";
|
||||
this.labelSourceSizeValue.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// labelSourceSize
|
||||
//
|
||||
this.labelSourceSize.AutoSize = true;
|
||||
this.labelSourceSize.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelSourceSize.ForeColor = System.Drawing.Color.White;
|
||||
this.labelSourceSize.Location = new System.Drawing.Point(11, 53);
|
||||
this.labelSourceSize.Name = "labelSourceSize";
|
||||
this.labelSourceSize.Size = new System.Drawing.Size(79, 13);
|
||||
this.labelSourceSize.TabIndex = 32;
|
||||
this.labelSourceSize.Text = "Source Size:";
|
||||
//
|
||||
// labelLastChange
|
||||
//
|
||||
this.labelLastChange.AutoSize = true;
|
||||
this.labelLastChange.Location = new System.Drawing.Point(8, 110);
|
||||
this.labelLastChange.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelLastChange.ForeColor = System.Drawing.SystemColors.Control;
|
||||
this.labelLastChange.Location = new System.Drawing.Point(11, 9);
|
||||
this.labelLastChange.Name = "labelLastChange";
|
||||
this.labelLastChange.Size = new System.Drawing.Size(117, 13);
|
||||
this.labelLastChange.Size = new System.Drawing.Size(111, 13);
|
||||
this.labelLastChange.TabIndex = 29;
|
||||
this.labelLastChange.Text = "Last change commited:";
|
||||
this.labelLastChange.Text = "Change commited:";
|
||||
//
|
||||
// panelBHighlight
|
||||
//
|
||||
this.panelBHighlight.BackColor = System.Drawing.Color.SeaGreen;
|
||||
this.panelBHighlight.Controls.Add(this.cmbRootBSrc);
|
||||
this.panelBHighlight.Controls.Add(this.btnRepBackupSource);
|
||||
this.panelBHighlight.Controls.Add(this.labelBackupSource);
|
||||
this.panelBHighlight.Controls.Add(this.btnBackupBrowseSource);
|
||||
this.panelBHighlight.Controls.Add(this.textBackupSource);
|
||||
this.panelBHighlight.Location = new System.Drawing.Point(0, 0);
|
||||
this.panelBHighlight.Name = "panelBHighlight";
|
||||
this.panelBHighlight.Size = new System.Drawing.Size(533, 41);
|
||||
this.panelBHighlight.TabIndex = 32;
|
||||
//
|
||||
// cmbRootBSrc
|
||||
//
|
||||
this.cmbRootBSrc.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbRootBSrc.FormattingEnabled = true;
|
||||
this.cmbRootBSrc.Items.AddRange(new object[] {
|
||||
""});
|
||||
this.cmbRootBSrc.Location = new System.Drawing.Point(88, 9);
|
||||
this.cmbRootBSrc.Name = "cmbRootBSrc";
|
||||
this.cmbRootBSrc.Size = new System.Drawing.Size(125, 21);
|
||||
this.cmbRootBSrc.TabIndex = 2;
|
||||
this.cmbRootBSrc.SelectedIndexChanged += new System.EventHandler(this.cmbRootBSrc_SelectedIndexChanged);
|
||||
//
|
||||
// btnRepBackupSource
|
||||
//
|
||||
this.btnRepBackupSource.Location = new System.Drawing.Point(498, 10);
|
||||
this.btnRepBackupSource.Name = "btnRepBackupSource";
|
||||
this.btnRepBackupSource.Size = new System.Drawing.Size(24, 20);
|
||||
this.btnRepBackupSource.TabIndex = 5;
|
||||
this.btnRepBackupSource.Text = ">";
|
||||
this.btnRepBackupSource.UseVisualStyleBackColor = true;
|
||||
this.btnRepBackupSource.Click += new System.EventHandler(this.btnRepBackupSource_Click);
|
||||
//
|
||||
// labelBackupSource
|
||||
//
|
||||
this.labelBackupSource.AutoSize = true;
|
||||
this.labelBackupSource.BackColor = System.Drawing.Color.SeaGreen;
|
||||
this.labelBackupSource.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelBackupSource.ForeColor = System.Drawing.SystemColors.Control;
|
||||
this.labelBackupSource.Location = new System.Drawing.Point(7, 12);
|
||||
this.labelBackupSource.Name = "labelBackupSource";
|
||||
this.labelBackupSource.Size = new System.Drawing.Size(56, 13);
|
||||
this.labelBackupSource.TabIndex = 14;
|
||||
this.labelBackupSource.Text = "*Source:";
|
||||
//
|
||||
// btnBackupBrowseSource
|
||||
//
|
||||
this.btnBackupBrowseSource.Location = new System.Drawing.Point(459, 10);
|
||||
this.btnBackupBrowseSource.Name = "btnBackupBrowseSource";
|
||||
this.btnBackupBrowseSource.Size = new System.Drawing.Size(40, 20);
|
||||
this.btnBackupBrowseSource.TabIndex = 4;
|
||||
this.btnBackupBrowseSource.Text = "...";
|
||||
this.btnBackupBrowseSource.UseVisualStyleBackColor = true;
|
||||
this.btnBackupBrowseSource.Click += new System.EventHandler(this.btnBackupBrowseSource_Click);
|
||||
//
|
||||
// textBackupSource
|
||||
//
|
||||
this.textBackupSource.Location = new System.Drawing.Point(218, 10);
|
||||
this.textBackupSource.Name = "textBackupSource";
|
||||
this.textBackupSource.Size = new System.Drawing.Size(240, 20);
|
||||
this.textBackupSource.TabIndex = 3;
|
||||
this.textBackupSource.TextChanged += new System.EventHandler(this.textBackupSource_TextChanged);
|
||||
//
|
||||
// btnRepBackupDest
|
||||
//
|
||||
this.btnRepBackupDest.Location = new System.Drawing.Point(498, 51);
|
||||
this.btnRepBackupDest.Name = "btnRepBackupDest";
|
||||
this.btnRepBackupDest.Size = new System.Drawing.Size(24, 20);
|
||||
this.btnRepBackupDest.TabIndex = 9;
|
||||
this.btnRepBackupDest.Text = ">";
|
||||
this.btnRepBackupDest.UseVisualStyleBackColor = true;
|
||||
this.btnRepBackupDest.Click += new System.EventHandler(this.btnRepBackupDest_Click);
|
||||
//
|
||||
// groupBackupOptions
|
||||
//
|
||||
this.groupBackupOptions.Controls.Add(this.labelCompressionPreset);
|
||||
this.groupBackupOptions.Controls.Add(this.cmbComPreset);
|
||||
this.groupBackupOptions.Controls.Add(this.textCompressionLevel);
|
||||
this.groupBackupOptions.Controls.Add(this.labelExclusions);
|
||||
this.groupBackupOptions.Controls.Add(this.btnFilters);
|
||||
this.groupBackupOptions.Controls.Add(this.labelMaxCompression);
|
||||
this.groupBackupOptions.Controls.Add(this.labelNoCompression);
|
||||
this.groupBackupOptions.Controls.Add(this.trackBar);
|
||||
this.groupBackupOptions.Controls.Add(this.labelCompressionLevel);
|
||||
this.groupBackupOptions.Location = new System.Drawing.Point(161, 85);
|
||||
this.groupBackupOptions.Location = new System.Drawing.Point(10, 85);
|
||||
this.groupBackupOptions.Name = "groupBackupOptions";
|
||||
this.groupBackupOptions.Size = new System.Drawing.Size(229, 96);
|
||||
this.groupBackupOptions.Size = new System.Drawing.Size(388, 96);
|
||||
this.groupBackupOptions.TabIndex = 21;
|
||||
this.groupBackupOptions.TabStop = false;
|
||||
this.groupBackupOptions.Text = "Backup Options";
|
||||
//
|
||||
// labelCompressionPreset
|
||||
//
|
||||
this.labelCompressionPreset.AutoSize = true;
|
||||
this.labelCompressionPreset.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelCompressionPreset.Location = new System.Drawing.Point(259, 20);
|
||||
this.labelCompressionPreset.Name = "labelCompressionPreset";
|
||||
this.labelCompressionPreset.Size = new System.Drawing.Size(47, 13);
|
||||
this.labelCompressionPreset.TabIndex = 52;
|
||||
this.labelCompressionPreset.Text = "Preset:";
|
||||
//
|
||||
// cmbComPreset
|
||||
//
|
||||
this.cmbComPreset.AutoCompleteCustomSource.AddRange(new string[] {
|
||||
"Images/Video",
|
||||
"Database/Text",
|
||||
"Virtual Machines",
|
||||
"Software/Games",
|
||||
"Mixed Content"});
|
||||
this.cmbComPreset.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbComPreset.FormattingEnabled = true;
|
||||
this.cmbComPreset.Items.AddRange(new object[] {
|
||||
"Databases/Text",
|
||||
"Images/Video",
|
||||
"Mixed Content",
|
||||
"Software/Games"});
|
||||
this.cmbComPreset.Location = new System.Drawing.Point(262, 52);
|
||||
this.cmbComPreset.Name = "cmbComPreset";
|
||||
this.cmbComPreset.Size = new System.Drawing.Size(114, 21);
|
||||
this.cmbComPreset.Sorted = true;
|
||||
this.cmbComPreset.TabIndex = 51;
|
||||
this.cmbComPreset.SelectedIndexChanged += new System.EventHandler(this.cmbComPreset_SelectedIndexChanged);
|
||||
//
|
||||
// textCompressionLevel
|
||||
//
|
||||
this.textCompressionLevel.BackColor = System.Drawing.Color.Gold;
|
||||
this.textCompressionLevel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.textCompressionLevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.textCompressionLevel.ForeColor = System.Drawing.SystemColors.Control;
|
||||
this.textCompressionLevel.Location = new System.Drawing.Point(208, 52);
|
||||
this.textCompressionLevel.Name = "textCompressionLevel";
|
||||
this.textCompressionLevel.ReadOnly = true;
|
||||
this.textCompressionLevel.Size = new System.Drawing.Size(41, 38);
|
||||
this.textCompressionLevel.TabIndex = 50;
|
||||
this.textCompressionLevel.Text = "4";
|
||||
this.textCompressionLevel.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// labelExclusions
|
||||
//
|
||||
this.labelExclusions.AutoSize = true;
|
||||
this.labelExclusions.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelExclusions.Location = new System.Drawing.Point(426, 20);
|
||||
this.labelExclusions.Name = "labelExclusions";
|
||||
this.labelExclusions.Size = new System.Drawing.Size(71, 13);
|
||||
this.labelExclusions.TabIndex = 10;
|
||||
this.labelExclusions.Text = "Exclusions:";
|
||||
//
|
||||
// btnFilters
|
||||
//
|
||||
this.btnFilters.Enabled = false;
|
||||
this.btnFilters.Location = new System.Drawing.Point(429, 45);
|
||||
this.btnFilters.Name = "btnFilters";
|
||||
this.btnFilters.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnFilters.TabIndex = 9;
|
||||
this.btnFilters.Text = "Filters...";
|
||||
this.btnFilters.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// labelMaxCompression
|
||||
//
|
||||
this.labelMaxCompression.AutoSize = true;
|
||||
this.labelMaxCompression.Location = new System.Drawing.Point(195, 65);
|
||||
this.labelMaxCompression.Location = new System.Drawing.Point(166, 77);
|
||||
this.labelMaxCompression.Name = "labelMaxCompression";
|
||||
this.labelMaxCompression.Size = new System.Drawing.Size(27, 13);
|
||||
this.labelMaxCompression.TabIndex = 8;
|
||||
@@ -300,188 +511,246 @@
|
||||
// labelNoCompression
|
||||
//
|
||||
this.labelNoCompression.AutoSize = true;
|
||||
this.labelNoCompression.Location = new System.Drawing.Point(15, 65);
|
||||
this.labelNoCompression.Location = new System.Drawing.Point(12, 76);
|
||||
this.labelNoCompression.Name = "labelNoCompression";
|
||||
this.labelNoCompression.Size = new System.Drawing.Size(33, 13);
|
||||
this.labelNoCompression.TabIndex = 7;
|
||||
this.labelNoCompression.Text = "None";
|
||||
//
|
||||
// labelBackupSource
|
||||
//
|
||||
this.labelBackupSource.AutoSize = true;
|
||||
this.labelBackupSource.Location = new System.Drawing.Point(7, 16);
|
||||
this.labelBackupSource.Name = "labelBackupSource";
|
||||
this.labelBackupSource.Size = new System.Drawing.Size(48, 13);
|
||||
this.labelBackupSource.TabIndex = 14;
|
||||
this.labelBackupSource.Text = "*Source:";
|
||||
//
|
||||
// btnBackupBrowseDest
|
||||
//
|
||||
this.btnBackupBrowseDest.Location = new System.Drawing.Point(334, 50);
|
||||
this.btnBackupBrowseDest.Location = new System.Drawing.Point(459, 51);
|
||||
this.btnBackupBrowseDest.Name = "btnBackupBrowseDest";
|
||||
this.btnBackupBrowseDest.Size = new System.Drawing.Size(30, 20);
|
||||
this.btnBackupBrowseDest.TabIndex = 5;
|
||||
this.btnBackupBrowseDest.Size = new System.Drawing.Size(40, 20);
|
||||
this.btnBackupBrowseDest.TabIndex = 8;
|
||||
this.btnBackupBrowseDest.Text = "...";
|
||||
this.btnBackupBrowseDest.UseVisualStyleBackColor = true;
|
||||
this.btnBackupBrowseDest.Click += new System.EventHandler(this.btnBackupBrowseDest_Click);
|
||||
//
|
||||
// textBackupSource
|
||||
//
|
||||
this.textBackupSource.Location = new System.Drawing.Point(84, 12);
|
||||
this.textBackupSource.Name = "textBackupSource";
|
||||
this.textBackupSource.Size = new System.Drawing.Size(244, 20);
|
||||
this.textBackupSource.TabIndex = 2;
|
||||
this.textBackupSource.TextChanged += new System.EventHandler(this.textBackupSource_TextChanged);
|
||||
//
|
||||
// btnBackupBrowseSource
|
||||
//
|
||||
this.btnBackupBrowseSource.Location = new System.Drawing.Point(334, 12);
|
||||
this.btnBackupBrowseSource.Name = "btnBackupBrowseSource";
|
||||
this.btnBackupBrowseSource.Size = new System.Drawing.Size(30, 20);
|
||||
this.btnBackupBrowseSource.TabIndex = 3;
|
||||
this.btnBackupBrowseSource.Text = "...";
|
||||
this.btnBackupBrowseSource.UseVisualStyleBackColor = true;
|
||||
this.btnBackupBrowseSource.Click += new System.EventHandler(this.btnBackupBrowseSource_Click);
|
||||
//
|
||||
// labelBackupDest
|
||||
//
|
||||
this.labelBackupDest.AutoSize = true;
|
||||
this.labelBackupDest.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelBackupDest.Location = new System.Drawing.Point(7, 54);
|
||||
this.labelBackupDest.Name = "labelBackupDest";
|
||||
this.labelBackupDest.Size = new System.Drawing.Size(67, 13);
|
||||
this.labelBackupDest.Size = new System.Drawing.Size(80, 13);
|
||||
this.labelBackupDest.TabIndex = 16;
|
||||
this.labelBackupDest.Text = "*Destination:";
|
||||
//
|
||||
// textBackupDest
|
||||
//
|
||||
this.textBackupDest.Location = new System.Drawing.Point(84, 50);
|
||||
this.textBackupDest.Location = new System.Drawing.Point(218, 51);
|
||||
this.textBackupDest.Name = "textBackupDest";
|
||||
this.textBackupDest.Size = new System.Drawing.Size(244, 20);
|
||||
this.textBackupDest.TabIndex = 4;
|
||||
this.textBackupDest.Size = new System.Drawing.Size(240, 20);
|
||||
this.textBackupDest.TabIndex = 7;
|
||||
this.textBackupDest.TextChanged += new System.EventHandler(this.textBackupDest_TextChanged);
|
||||
this.textBackupDest.Validating += new System.ComponentModel.CancelEventHandler(this.textBackupDest_Validating);
|
||||
//
|
||||
// tabRestore
|
||||
//
|
||||
this.tabRestore.Controls.Add(this.cmbRootRDst);
|
||||
this.tabRestore.Controls.Add(this.panel2);
|
||||
this.tabRestore.Controls.Add(this.btnRepRestoreDest);
|
||||
this.tabRestore.Controls.Add(this.btnRepRestoreSource);
|
||||
this.tabRestore.Controls.Add(this.labelLastBackup);
|
||||
this.tabRestore.Controls.Add(this.labelRestoreSource);
|
||||
this.tabRestore.Controls.Add(this.btnRestoreBrowseDest);
|
||||
this.tabRestore.Controls.Add(this.groupRestoreOptions);
|
||||
this.tabRestore.Controls.Add(this.textRestoreSource);
|
||||
this.tabRestore.Controls.Add(this.labelBackupDate);
|
||||
this.tabRestore.Controls.Add(this.btnRestoreBrowseSource);
|
||||
this.tabRestore.Controls.Add(this.btnRestore);
|
||||
this.tabRestore.Controls.Add(this.labelRestoreDest);
|
||||
this.tabRestore.Controls.Add(this.textRestoreDest);
|
||||
this.tabRestore.Controls.Add(this.panel3);
|
||||
this.tabRestore.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabRestore.Name = "tabRestore";
|
||||
this.tabRestore.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabRestore.Size = new System.Drawing.Size(399, 188);
|
||||
this.tabRestore.Size = new System.Drawing.Size(664, 188);
|
||||
this.tabRestore.TabIndex = 1;
|
||||
this.tabRestore.Text = "Restore";
|
||||
this.tabRestore.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnRepRestoreDest
|
||||
// cmbRootRDst
|
||||
//
|
||||
this.btnRepRestoreDest.Location = new System.Drawing.Point(366, 50);
|
||||
this.btnRepRestoreDest.Name = "btnRepRestoreDest";
|
||||
this.btnRepRestoreDest.Size = new System.Drawing.Size(24, 20);
|
||||
this.btnRepRestoreDest.TabIndex = 33;
|
||||
this.btnRepRestoreDest.Text = "<";
|
||||
this.btnRepRestoreDest.UseVisualStyleBackColor = true;
|
||||
this.btnRepRestoreDest.Click += new System.EventHandler(this.btnRepRestoreDest_Click);
|
||||
this.cmbRootRDst.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbRootRDst.FormattingEnabled = true;
|
||||
this.cmbRootRDst.Items.AddRange(new object[] {
|
||||
""});
|
||||
this.cmbRootRDst.Location = new System.Drawing.Point(88, 50);
|
||||
this.cmbRootRDst.Name = "cmbRootRDst";
|
||||
this.cmbRootRDst.Size = new System.Drawing.Size(125, 21);
|
||||
this.cmbRootRDst.TabIndex = 16;
|
||||
this.cmbRootRDst.SelectedIndexChanged += new System.EventHandler(this.cmbRootRDst_SelectedIndexChanged);
|
||||
//
|
||||
// btnRepRestoreSource
|
||||
// panel2
|
||||
//
|
||||
this.btnRepRestoreSource.Location = new System.Drawing.Point(366, 12);
|
||||
this.btnRepRestoreSource.Name = "btnRepRestoreSource";
|
||||
this.btnRepRestoreSource.Size = new System.Drawing.Size(24, 20);
|
||||
this.btnRepRestoreSource.TabIndex = 32;
|
||||
this.btnRepRestoreSource.Text = "<";
|
||||
this.btnRepRestoreSource.UseVisualStyleBackColor = true;
|
||||
this.btnRepRestoreSource.Click += new System.EventHandler(this.btnRepRestoreSource_Click);
|
||||
this.panel2.BackColor = System.Drawing.Color.GreenYellow;
|
||||
this.panel2.Controls.Add(this.btnCalcBackupSize);
|
||||
this.panel2.Controls.Add(this.labelBackupSizeValue);
|
||||
this.panel2.Controls.Add(this.labelBackupSize);
|
||||
this.panel2.Controls.Add(this.labelLastBackup);
|
||||
this.panel2.Controls.Add(this.labelBackupDate);
|
||||
this.panel2.Controls.Add(this.btnRestore);
|
||||
this.panel2.Location = new System.Drawing.Point(528, 0);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(136, 188);
|
||||
this.panel2.TabIndex = 35;
|
||||
//
|
||||
// btnCalcBackupSize
|
||||
//
|
||||
this.btnCalcBackupSize.Location = new System.Drawing.Point(9, 93);
|
||||
this.btnCalcBackupSize.Name = "btnCalcBackupSize";
|
||||
this.btnCalcBackupSize.Size = new System.Drawing.Size(60, 23);
|
||||
this.btnCalcBackupSize.TabIndex = 31;
|
||||
this.btnCalcBackupSize.Text = "Calculate";
|
||||
this.btnCalcBackupSize.UseVisualStyleBackColor = true;
|
||||
this.btnCalcBackupSize.Click += new System.EventHandler(this.btnCalcBackupSize_Click);
|
||||
//
|
||||
// labelBackupSizeValue
|
||||
//
|
||||
this.labelBackupSizeValue.AutoSize = true;
|
||||
this.labelBackupSizeValue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelBackupSizeValue.Location = new System.Drawing.Point(11, 72);
|
||||
this.labelBackupSizeValue.Name = "labelBackupSizeValue";
|
||||
this.labelBackupSizeValue.Size = new System.Drawing.Size(27, 13);
|
||||
this.labelBackupSizeValue.TabIndex = 30;
|
||||
this.labelBackupSizeValue.Text = "N/A";
|
||||
this.labelBackupSizeValue.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// labelBackupSize
|
||||
//
|
||||
this.labelBackupSize.AutoSize = true;
|
||||
this.labelBackupSize.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelBackupSize.Location = new System.Drawing.Point(11, 53);
|
||||
this.labelBackupSize.Name = "labelBackupSize";
|
||||
this.labelBackupSize.Size = new System.Drawing.Size(82, 13);
|
||||
this.labelBackupSize.TabIndex = 29;
|
||||
this.labelBackupSize.Text = "Backup Size:";
|
||||
//
|
||||
// labelLastBackup
|
||||
//
|
||||
this.labelLastBackup.AutoSize = true;
|
||||
this.labelLastBackup.Location = new System.Drawing.Point(8, 110);
|
||||
this.labelLastBackup.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelLastBackup.Location = new System.Drawing.Point(11, 9);
|
||||
this.labelLastBackup.Name = "labelLastBackup";
|
||||
this.labelLastBackup.Size = new System.Drawing.Size(69, 13);
|
||||
this.labelLastBackup.Size = new System.Drawing.Size(81, 13);
|
||||
this.labelLastBackup.TabIndex = 28;
|
||||
this.labelLastBackup.Text = "Last backup:";
|
||||
//
|
||||
// btnRepRestoreDest
|
||||
//
|
||||
this.btnRepRestoreDest.Location = new System.Drawing.Point(498, 51);
|
||||
this.btnRepRestoreDest.Name = "btnRepRestoreDest";
|
||||
this.btnRepRestoreDest.Size = new System.Drawing.Size(24, 20);
|
||||
this.btnRepRestoreDest.TabIndex = 19;
|
||||
this.btnRepRestoreDest.Text = "<";
|
||||
this.btnRepRestoreDest.UseVisualStyleBackColor = true;
|
||||
this.btnRepRestoreDest.Click += new System.EventHandler(this.btnRepRestoreDest_Click);
|
||||
//
|
||||
// labelRestoreSource
|
||||
//
|
||||
this.labelRestoreSource.AutoSize = true;
|
||||
this.labelRestoreSource.Location = new System.Drawing.Point(7, 16);
|
||||
this.labelRestoreSource.BackColor = System.Drawing.Color.YellowGreen;
|
||||
this.labelRestoreSource.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelRestoreSource.Location = new System.Drawing.Point(7, 12);
|
||||
this.labelRestoreSource.Name = "labelRestoreSource";
|
||||
this.labelRestoreSource.Size = new System.Drawing.Size(48, 13);
|
||||
this.labelRestoreSource.Size = new System.Drawing.Size(56, 13);
|
||||
this.labelRestoreSource.TabIndex = 22;
|
||||
this.labelRestoreSource.Text = "*Source:";
|
||||
//
|
||||
// btnRestoreBrowseDest
|
||||
//
|
||||
this.btnRestoreBrowseDest.Location = new System.Drawing.Point(334, 50);
|
||||
this.btnRestoreBrowseDest.Location = new System.Drawing.Point(459, 51);
|
||||
this.btnRestoreBrowseDest.Name = "btnRestoreBrowseDest";
|
||||
this.btnRestoreBrowseDest.Size = new System.Drawing.Size(30, 20);
|
||||
this.btnRestoreBrowseDest.TabIndex = 27;
|
||||
this.btnRestoreBrowseDest.Size = new System.Drawing.Size(40, 20);
|
||||
this.btnRestoreBrowseDest.TabIndex = 18;
|
||||
this.btnRestoreBrowseDest.Text = "...";
|
||||
this.btnRestoreBrowseDest.UseVisualStyleBackColor = true;
|
||||
this.btnRestoreBrowseDest.Click += new System.EventHandler(this.btnRestoreDest_Click);
|
||||
//
|
||||
// textRestoreSource
|
||||
//
|
||||
this.textRestoreSource.Location = new System.Drawing.Point(84, 12);
|
||||
this.textRestoreSource.Name = "textRestoreSource";
|
||||
this.textRestoreSource.Size = new System.Drawing.Size(244, 20);
|
||||
this.textRestoreSource.TabIndex = 23;
|
||||
this.textRestoreSource.TextChanged += new System.EventHandler(this.textRestoreSource_TextChanged);
|
||||
this.textRestoreSource.Validating += new System.ComponentModel.CancelEventHandler(this.textRestoreSource_Validating);
|
||||
//
|
||||
// btnRestoreBrowseSource
|
||||
//
|
||||
this.btnRestoreBrowseSource.Location = new System.Drawing.Point(334, 12);
|
||||
this.btnRestoreBrowseSource.Name = "btnRestoreBrowseSource";
|
||||
this.btnRestoreBrowseSource.Size = new System.Drawing.Size(30, 20);
|
||||
this.btnRestoreBrowseSource.TabIndex = 26;
|
||||
this.btnRestoreBrowseSource.Text = "...";
|
||||
this.btnRestoreBrowseSource.UseVisualStyleBackColor = true;
|
||||
this.btnRestoreBrowseSource.Click += new System.EventHandler(this.btnRestoreSource_Click);
|
||||
//
|
||||
// labelRestoreDest
|
||||
//
|
||||
this.labelRestoreDest.AutoSize = true;
|
||||
this.labelRestoreDest.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelRestoreDest.Location = new System.Drawing.Point(7, 54);
|
||||
this.labelRestoreDest.Name = "labelRestoreDest";
|
||||
this.labelRestoreDest.Size = new System.Drawing.Size(67, 13);
|
||||
this.labelRestoreDest.Size = new System.Drawing.Size(80, 13);
|
||||
this.labelRestoreDest.TabIndex = 24;
|
||||
this.labelRestoreDest.Text = "*Destination:";
|
||||
//
|
||||
// textRestoreDest
|
||||
//
|
||||
this.textRestoreDest.Location = new System.Drawing.Point(84, 50);
|
||||
this.textRestoreDest.Location = new System.Drawing.Point(218, 51);
|
||||
this.textRestoreDest.Name = "textRestoreDest";
|
||||
this.textRestoreDest.Size = new System.Drawing.Size(244, 20);
|
||||
this.textRestoreDest.TabIndex = 25;
|
||||
this.textRestoreDest.Size = new System.Drawing.Size(240, 20);
|
||||
this.textRestoreDest.TabIndex = 17;
|
||||
this.textRestoreDest.TextChanged += new System.EventHandler(this.textRestoreDest_TextChanged);
|
||||
this.textRestoreDest.Validating += new System.ComponentModel.CancelEventHandler(this.textRestoreDest_Validating);
|
||||
//
|
||||
// panel3
|
||||
//
|
||||
this.panel3.BackColor = System.Drawing.Color.YellowGreen;
|
||||
this.panel3.Controls.Add(this.btnRepRestoreSource);
|
||||
this.panel3.Controls.Add(this.cmbRootRSrc);
|
||||
this.panel3.Controls.Add(this.btnRestoreBrowseSource);
|
||||
this.panel3.Controls.Add(this.textRestoreSource);
|
||||
this.panel3.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel3.Name = "panel3";
|
||||
this.panel3.Size = new System.Drawing.Size(533, 41);
|
||||
this.panel3.TabIndex = 34;
|
||||
//
|
||||
// btnRepRestoreSource
|
||||
//
|
||||
this.btnRepRestoreSource.Location = new System.Drawing.Point(498, 10);
|
||||
this.btnRepRestoreSource.Name = "btnRepRestoreSource";
|
||||
this.btnRepRestoreSource.Size = new System.Drawing.Size(24, 20);
|
||||
this.btnRepRestoreSource.TabIndex = 15;
|
||||
this.btnRepRestoreSource.Text = "<";
|
||||
this.btnRepRestoreSource.UseVisualStyleBackColor = true;
|
||||
this.btnRepRestoreSource.Click += new System.EventHandler(this.btnRepRestoreSource_Click);
|
||||
//
|
||||
// cmbRootRSrc
|
||||
//
|
||||
this.cmbRootRSrc.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbRootRSrc.FormattingEnabled = true;
|
||||
this.cmbRootRSrc.Items.AddRange(new object[] {
|
||||
""});
|
||||
this.cmbRootRSrc.Location = new System.Drawing.Point(88, 9);
|
||||
this.cmbRootRSrc.Name = "cmbRootRSrc";
|
||||
this.cmbRootRSrc.Size = new System.Drawing.Size(125, 21);
|
||||
this.cmbRootRSrc.TabIndex = 12;
|
||||
this.cmbRootRSrc.SelectedIndexChanged += new System.EventHandler(this.cmbRootRSrc_SelectedIndexChanged);
|
||||
//
|
||||
// btnRestoreBrowseSource
|
||||
//
|
||||
this.btnRestoreBrowseSource.BackColor = System.Drawing.Color.Transparent;
|
||||
this.btnRestoreBrowseSource.Location = new System.Drawing.Point(459, 10);
|
||||
this.btnRestoreBrowseSource.Name = "btnRestoreBrowseSource";
|
||||
this.btnRestoreBrowseSource.Size = new System.Drawing.Size(40, 20);
|
||||
this.btnRestoreBrowseSource.TabIndex = 14;
|
||||
this.btnRestoreBrowseSource.Text = "...";
|
||||
this.btnRestoreBrowseSource.UseVisualStyleBackColor = false;
|
||||
this.btnRestoreBrowseSource.Click += new System.EventHandler(this.btnRestoreSource_Click);
|
||||
//
|
||||
// textRestoreSource
|
||||
//
|
||||
this.textRestoreSource.Location = new System.Drawing.Point(218, 10);
|
||||
this.textRestoreSource.Name = "textRestoreSource";
|
||||
this.textRestoreSource.Size = new System.Drawing.Size(240, 20);
|
||||
this.textRestoreSource.TabIndex = 13;
|
||||
this.textRestoreSource.TextChanged += new System.EventHandler(this.textRestoreSource_TextChanged);
|
||||
this.textRestoreSource.Validating += new System.ComponentModel.CancelEventHandler(this.textRestoreSource_Validating);
|
||||
//
|
||||
// labelDescription
|
||||
//
|
||||
this.labelDescription.AutoSize = true;
|
||||
this.labelDescription.Location = new System.Drawing.Point(13, 265);
|
||||
this.labelDescription.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelDescription.Location = new System.Drawing.Point(154, 35);
|
||||
this.labelDescription.Name = "labelDescription";
|
||||
this.labelDescription.Size = new System.Drawing.Size(63, 13);
|
||||
this.labelDescription.Size = new System.Drawing.Size(75, 13);
|
||||
this.labelDescription.TabIndex = 18;
|
||||
this.labelDescription.Text = "Description:";
|
||||
//
|
||||
// textDescription
|
||||
//
|
||||
this.textDescription.Location = new System.Drawing.Point(104, 262);
|
||||
this.textDescription.Location = new System.Drawing.Point(234, 32);
|
||||
this.textDescription.Name = "textDescription";
|
||||
this.textDescription.Size = new System.Drawing.Size(311, 20);
|
||||
this.textDescription.Size = new System.Drawing.Size(438, 20);
|
||||
this.textDescription.TabIndex = 0;
|
||||
this.textDescription.TextChanged += new System.EventHandler(this.textDescription_TextChanged);
|
||||
//
|
||||
@@ -494,8 +763,8 @@
|
||||
this.registerToolStripMenuItem});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(434, 24);
|
||||
this.menuStrip1.TabIndex = 22;
|
||||
this.menuStrip1.Size = new System.Drawing.Size(684, 24);
|
||||
this.menuStrip1.TabIndex = 24;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
@@ -507,8 +776,8 @@
|
||||
this.saveToolStripMenuItem,
|
||||
this.saveAsToolStripMenuItem,
|
||||
this.toolStripSeparator2,
|
||||
this.websiteToolStripMenuItem,
|
||||
this.exitToolStripMenuItem});
|
||||
this.refreshDrivesToolStripMenuItem,
|
||||
this.websiteToolStripMenuItem});
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||
this.fileToolStripMenuItem.Text = "File";
|
||||
@@ -557,6 +826,13 @@
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(192, 6);
|
||||
//
|
||||
// refreshDrivesToolStripMenuItem
|
||||
//
|
||||
this.refreshDrivesToolStripMenuItem.Name = "refreshDrivesToolStripMenuItem";
|
||||
this.refreshDrivesToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F5;
|
||||
this.refreshDrivesToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
|
||||
this.refreshDrivesToolStripMenuItem.Text = "Refresh Drives";
|
||||
//
|
||||
// websiteToolStripMenuItem
|
||||
//
|
||||
this.websiteToolStripMenuItem.Name = "websiteToolStripMenuItem";
|
||||
@@ -564,14 +840,6 @@
|
||||
this.websiteToolStripMenuItem.Text = "Website...";
|
||||
this.websiteToolStripMenuItem.Click += new System.EventHandler(this.websiteToolStripMenuItem_Click);
|
||||
//
|
||||
// exitToolStripMenuItem
|
||||
//
|
||||
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
|
||||
this.exitToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Q)));
|
||||
this.exitToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
|
||||
this.exitToolStripMenuItem.Text = "Exit";
|
||||
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
|
||||
//
|
||||
// changelogToolStripMenuItem
|
||||
//
|
||||
this.changelogToolStripMenuItem.Name = "changelogToolStripMenuItem";
|
||||
@@ -613,11 +881,11 @@
|
||||
//
|
||||
this.labelDevBuild.AutoSize = true;
|
||||
this.labelDevBuild.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelDevBuild.Location = new System.Drawing.Point(331, 6);
|
||||
this.labelDevBuild.Location = new System.Drawing.Point(614, 6);
|
||||
this.labelDevBuild.Name = "labelDevBuild";
|
||||
this.labelDevBuild.Size = new System.Drawing.Size(96, 13);
|
||||
this.labelDevBuild.Size = new System.Drawing.Size(64, 13);
|
||||
this.labelDevBuild.TabIndex = 23;
|
||||
this.labelDevBuild.Text = "Development Build";
|
||||
this.labelDevBuild.Text = "Beta Build 2";
|
||||
//
|
||||
// MainWindow
|
||||
//
|
||||
@@ -625,7 +893,7 @@
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.ClientSize = new System.Drawing.Size(434, 316);
|
||||
this.ClientSize = new System.Drawing.Size(684, 286);
|
||||
this.Controls.Add(this.labelDevBuild);
|
||||
this.Controls.Add(this.labelDescription);
|
||||
this.Controls.Add(this.textDescription);
|
||||
@@ -650,10 +918,18 @@
|
||||
this.tabControl.ResumeLayout(false);
|
||||
this.tabBackup.ResumeLayout(false);
|
||||
this.tabBackup.PerformLayout();
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.panelBHighlight.ResumeLayout(false);
|
||||
this.panelBHighlight.PerformLayout();
|
||||
this.groupBackupOptions.ResumeLayout(false);
|
||||
this.groupBackupOptions.PerformLayout();
|
||||
this.tabRestore.ResumeLayout(false);
|
||||
this.tabRestore.PerformLayout();
|
||||
this.panel2.ResumeLayout(false);
|
||||
this.panel2.PerformLayout();
|
||||
this.panel3.ResumeLayout(false);
|
||||
this.panel3.PerformLayout();
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
@@ -703,7 +979,6 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
|
||||
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
|
||||
private System.Windows.Forms.Label labelLastBackup;
|
||||
private System.Windows.Forms.Label labelLastChange;
|
||||
private System.Windows.Forms.ToolStripMenuItem registerToolStripMenuItem;
|
||||
@@ -717,6 +992,26 @@
|
||||
private System.Windows.Forms.Button btnRepRestoreDest;
|
||||
private System.Windows.Forms.Button btnRepRestoreSource;
|
||||
private System.Windows.Forms.Label labelDevBuild;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Panel panelBHighlight;
|
||||
private System.Windows.Forms.ComboBox cmbRootBDst;
|
||||
private System.Windows.Forms.ComboBox cmbRootBSrc;
|
||||
private System.Windows.Forms.Label labelExclusions;
|
||||
private System.Windows.Forms.Button btnFilters;
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
private System.Windows.Forms.Panel panel3;
|
||||
private System.Windows.Forms.ComboBox cmbRootRDst;
|
||||
private System.Windows.Forms.ComboBox cmbRootRSrc;
|
||||
private System.Windows.Forms.MaskedTextBox textCompressionLevel;
|
||||
private System.Windows.Forms.Label labelCompressionPreset;
|
||||
private System.Windows.Forms.ComboBox cmbComPreset;
|
||||
private System.Windows.Forms.ToolStripMenuItem refreshDrivesToolStripMenuItem;
|
||||
private System.Windows.Forms.Button btnCalcBackupSize;
|
||||
private System.Windows.Forms.Label labelBackupSizeValue;
|
||||
private System.Windows.Forms.Label labelBackupSize;
|
||||
private System.Windows.Forms.Button btnSourceSize;
|
||||
private System.Windows.Forms.Label labelSourceSizeValue;
|
||||
private System.Windows.Forms.Label labelSourceSize;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+425
-67
@@ -6,6 +6,7 @@ using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using MicronSync.Components.Forms;
|
||||
using System.Drawing;
|
||||
|
||||
namespace MicronSync
|
||||
{
|
||||
@@ -16,6 +17,7 @@ namespace MicronSync
|
||||
private readonly CommonIO _CommonIO = new CommonIO();
|
||||
private readonly ParseUserInput _ParseUserInput = new ParseUserInput();
|
||||
private bool isLoading;
|
||||
private bool hasCancelledExit;
|
||||
|
||||
public MainWindow() { InitializeComponent(); }
|
||||
|
||||
@@ -28,6 +30,7 @@ namespace MicronSync
|
||||
|
||||
CreateTooltips();
|
||||
ProcessLicence();
|
||||
PopulateRootLists();
|
||||
ProcessArgs(args);
|
||||
labelDevBuild.Visible = false; // Comment out before releasing.
|
||||
}
|
||||
@@ -72,7 +75,7 @@ namespace MicronSync
|
||||
/// </summary>
|
||||
private void CreateTooltips()
|
||||
{
|
||||
toolTip.AutomaticDelay = 5000;
|
||||
toolTip.AutomaticDelay = 8000;
|
||||
toolTip.InitialDelay = 1000;
|
||||
toolTip.ReshowDelay = 500;
|
||||
toolTip.ShowAlways = true;
|
||||
@@ -93,6 +96,48 @@ namespace MicronSync
|
||||
toolTip.SetToolTip(btnRepBackupDest, "Replicate path to restore source.");
|
||||
toolTip.SetToolTip(btnRepRestoreSource, "Replicate path to backup destination.");
|
||||
toolTip.SetToolTip(btnRepRestoreDest, "Replicate path to backup source.");
|
||||
toolTip.SetToolTip(labelCompressionPreset, "Selecting a preset to use will automatically choose optimal compression settings.");
|
||||
}
|
||||
|
||||
private void PopulateRootLists()
|
||||
{
|
||||
// Clear existing lists.
|
||||
cmbRootBSrc.Items.Clear();
|
||||
cmbRootBDst.Items.Clear();
|
||||
cmbRootRSrc.Items.Clear();
|
||||
cmbRootRDst.Items.Clear();
|
||||
|
||||
// Add blank header for each of the dropdowns.
|
||||
cmbRootBSrc.Items.Add("");
|
||||
cmbRootBDst.Items.Add("");
|
||||
cmbRootRSrc.Items.Add("");
|
||||
cmbRootRDst.Items.Add("");
|
||||
|
||||
string[] drives = Directory.GetLogicalDrives();
|
||||
foreach (var drive in drives)
|
||||
{
|
||||
cmbRootBSrc.Items.Add(drive);
|
||||
cmbRootBDst.Items.Add(drive);
|
||||
cmbRootRSrc.Items.Add(drive);
|
||||
cmbRootRDst.Items.Add(drive);
|
||||
}
|
||||
foreach (var var in MSConfig.SysVars)
|
||||
{
|
||||
cmbRootBSrc.Items.Add(var.Key);
|
||||
cmbRootBDst.Items.Add(var.Key);
|
||||
cmbRootRSrc.Items.Add(var.Key);
|
||||
cmbRootRDst.Items.Add(var.Key);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes registration entry from menu if registered.
|
||||
/// </summary>
|
||||
/// <param name="isLicenced"></param>
|
||||
private void RemoveRegInfoMenubar(bool isLicenced)
|
||||
{
|
||||
if (isLicenced)
|
||||
menuStrip1.Items.RemoveByKey("registerToolStripMenuItem");
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -114,14 +159,19 @@ namespace MicronSync
|
||||
if(!string.IsNullOrEmpty(loadedFile))
|
||||
if (loadedFile.EndsWith(".ini"))
|
||||
{
|
||||
_MSConfig = new MSConfig {openFile = loadedFile};
|
||||
_MSConfig.Load();
|
||||
UpdateWithConfig();
|
||||
_MSConfig = new MSConfig { openFile = loadedFile };
|
||||
int result = _MSConfig.Load();
|
||||
if (result == 0)
|
||||
{
|
||||
// Set titlebar name.
|
||||
UpTitlebar = loadedFile;
|
||||
UpStatus = "Load successful";
|
||||
saveToolStripMenuItem.Enabled = true;
|
||||
}
|
||||
else
|
||||
_MSConfig = new MSConfig();
|
||||
|
||||
// Set titlebar name.
|
||||
UpdateTitlebar = loadedFile;
|
||||
UpdateStatus = "Load successful";
|
||||
saveToolStripMenuItem.Enabled = true;
|
||||
UpdateWithConfig();
|
||||
}
|
||||
else
|
||||
if (!fromExe)
|
||||
@@ -130,6 +180,7 @@ namespace MicronSync
|
||||
MessageHandler.errorMessage(MessageHandler.errCodes.MainWindow_BadConfigFile_FromEXE, null);
|
||||
//
|
||||
isLoading = false;
|
||||
_MSConfig.userModifiedConfig = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -137,17 +188,22 @@ namespace MicronSync
|
||||
/// </summary>
|
||||
private void UpdateWithConfig()
|
||||
{
|
||||
UpdateTitlebar = _MSConfig.openFile;
|
||||
UpTitlebar = _MSConfig.openFile;
|
||||
textDescription.Text = _MSConfig.Description;
|
||||
textBackupSource.Text = _MSConfig.BackupSource;
|
||||
textBackupDest.Text = _MSConfig.BackupDestination;
|
||||
textRestoreSource.Text = _MSConfig.RestoreSource;
|
||||
textRestoreDest.Text = _MSConfig.RestoreDestination;
|
||||
UpRootBackupSourceUI = _MSConfig.RootBackupSource;
|
||||
textBackupSource.Text = _MSConfig.PathBackupSource;
|
||||
UpRootBackupDestinationUI = _MSConfig.RootBackupDestination;
|
||||
textBackupDest.Text = _MSConfig.PathBackupDestination;
|
||||
UpRootRestoreSourceUI = _MSConfig.RootRestoreSource;
|
||||
textRestoreSource.Text = _MSConfig.PathRestoreSource;
|
||||
UpRootRestoreDestinationUI = _MSConfig.RootRestoreDestination;
|
||||
textRestoreDest.Text = _MSConfig.PathRestoreDestination;
|
||||
trackBar.Value = _MSConfig.CompressionLevel;
|
||||
chkBackup.Checked = _MSConfig.EnableBackup;
|
||||
chkPurge.Checked = _MSConfig.EnablePurge;
|
||||
|
||||
_MSConfig.userModifiedConfig = false;
|
||||
UpTabSelection = _MSConfig.InBackupMode;
|
||||
UpBackupSizeValue = "N/A";
|
||||
UpSourceSizeValue = "N/A";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -192,8 +248,11 @@ namespace MicronSync
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageHandler.errorMessage(MessageHandler.errCodes.MainWindow_SZNotInstalled, null);
|
||||
DialogResult dr = MessageHandler.stdMessage(MessageHandler.msgCodes.MainWindow_SZNotInstalled, null);
|
||||
errors++;
|
||||
|
||||
if (dr == DialogResult.Yes)
|
||||
Process.Start("http://www.7-zip.org/");
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -211,8 +270,11 @@ namespace MicronSync
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageHandler.errorMessage(MessageHandler.errCodes.MainWindow_SZNotInstalled, null);
|
||||
DialogResult dr = MessageHandler.stdMessage(MessageHandler.msgCodes.MainWindow_SZNotInstalled, null);
|
||||
errors++;
|
||||
|
||||
if (dr == DialogResult.Yes)
|
||||
Process.Start("http://www.7-zip.org/");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,12 +293,12 @@ namespace MicronSync
|
||||
if (count == 2)
|
||||
{
|
||||
btnBackup.Enabled = true;
|
||||
UpdateStatus = "Ready";
|
||||
UpStatus = "Ready";
|
||||
}
|
||||
else
|
||||
{
|
||||
btnBackup.Enabled = false;
|
||||
UpdateStatus = "Please fill in the required fields";
|
||||
UpStatus = "Please fill in the required fields";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -252,12 +314,12 @@ namespace MicronSync
|
||||
if (count == 2)
|
||||
{
|
||||
btnRestore.Enabled = true;
|
||||
UpdateStatus = "Ready";
|
||||
UpStatus = "Ready";
|
||||
}
|
||||
else
|
||||
{
|
||||
btnRestore.Enabled = false;
|
||||
UpdateStatus = "Please fill in the required fields";
|
||||
UpStatus = "Please fill in the required fields";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -289,7 +351,7 @@ namespace MicronSync
|
||||
case LMZAParser.endResult.Error:
|
||||
break;
|
||||
case LMZAParser.endResult.Default:
|
||||
statusLabel.Text = "Operation successful";
|
||||
statusLabel.Text = $"Operation successful, completion time: {wui.compTime}";
|
||||
break;
|
||||
case LMZAParser.endResult.TestArchive_Aborted:
|
||||
statusLabel.Text = "Aborted test archive operation";
|
||||
@@ -318,7 +380,9 @@ namespace MicronSync
|
||||
|
||||
#region UI Functionality
|
||||
|
||||
private string UpdateStatus
|
||||
#region UpdateUI
|
||||
|
||||
private string UpStatus
|
||||
{
|
||||
set
|
||||
{
|
||||
@@ -326,7 +390,7 @@ namespace MicronSync
|
||||
}
|
||||
}
|
||||
|
||||
private string UpdateTitlebar
|
||||
private string UpTitlebar
|
||||
{
|
||||
set
|
||||
{
|
||||
@@ -337,21 +401,199 @@ namespace MicronSync
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes registration entry from menu if registered.
|
||||
/// </summary>
|
||||
/// <param name="isLicenced"></param>
|
||||
private void RemoveRegInfoMenubar(bool isLicenced)
|
||||
private string UpSyncDate
|
||||
{
|
||||
if (isLicenced)
|
||||
menuStrip1.Items.RemoveByKey("registerToolStripMenuItem");
|
||||
set
|
||||
{ labelSyncDate.Text = _CommonIO.CalculateDirectoryModifyDate(value); }
|
||||
}
|
||||
|
||||
private string UpBackupDate
|
||||
{
|
||||
set
|
||||
{ labelBackupDate.Text = _CommonIO.CalculateFileModifyDate(value); }
|
||||
}
|
||||
|
||||
private string UpRootBackupSourceUI
|
||||
{
|
||||
set
|
||||
{
|
||||
if (!string.IsNullOrEmpty(value))
|
||||
if (!cmbRootBSrc.Items.Contains(value))
|
||||
cmbRootBSrc.Items.Add(value);
|
||||
cmbRootBSrc.SelectedItem = value;
|
||||
}
|
||||
}
|
||||
|
||||
private string UpRootBackupDestinationUI
|
||||
{
|
||||
set
|
||||
{
|
||||
if (!string.IsNullOrEmpty(value))
|
||||
if (!cmbRootBDst.Items.Contains(value))
|
||||
cmbRootBDst.Items.Add(value);
|
||||
cmbRootBDst.SelectedItem = value;
|
||||
}
|
||||
}
|
||||
|
||||
private string UpRootRestoreSourceUI
|
||||
{
|
||||
set
|
||||
{
|
||||
if (!string.IsNullOrEmpty(value))
|
||||
if (!cmbRootRSrc.Items.Contains(value))
|
||||
cmbRootRSrc.Items.Add(value);
|
||||
cmbRootRSrc.SelectedItem = value;
|
||||
}
|
||||
}
|
||||
|
||||
private string UpRootRestoreDestinationUI
|
||||
{
|
||||
set
|
||||
{
|
||||
if (!string.IsNullOrEmpty(value))
|
||||
if (!cmbRootRDst.Items.Contains(value))
|
||||
cmbRootRDst.Items.Add(value);
|
||||
cmbRootRDst.SelectedItem = value;
|
||||
}
|
||||
}
|
||||
|
||||
private bool UpTabSelection
|
||||
{
|
||||
set
|
||||
{
|
||||
if (value == true)
|
||||
tabControl.SelectedTab = tabBackup;
|
||||
else
|
||||
tabControl.SelectedTab = tabRestore;
|
||||
}
|
||||
}
|
||||
|
||||
private int UpCompressionLevelText
|
||||
{
|
||||
set
|
||||
{
|
||||
textCompressionLevel.Text = Convert.ToString(value);
|
||||
|
||||
if (value == 0)
|
||||
{
|
||||
labelCompressionLevel.Text = "Compression Level: None";
|
||||
cmbComPreset.SelectedItem = "Images/Video";
|
||||
textCompressionLevel.BackColor = Color.RoyalBlue;
|
||||
}
|
||||
else if (value <= 3)
|
||||
{
|
||||
labelCompressionLevel.Text = "Compression Level: Low";
|
||||
cmbComPreset.SelectedItem = "Software/Games";
|
||||
textCompressionLevel.BackColor = Color.Turquoise;
|
||||
}
|
||||
else if (value <= 5)
|
||||
{
|
||||
labelCompressionLevel.Text = "Compression Level: Medium";
|
||||
cmbComPreset.SelectedItem = "Mixed Content";
|
||||
textCompressionLevel.BackColor = Color.Gold;
|
||||
}
|
||||
else if (value <= 7)
|
||||
{
|
||||
labelCompressionLevel.Text = "Compression Level: High";
|
||||
textCompressionLevel.BackColor = Color.Orange;
|
||||
}
|
||||
else if (value == 9)
|
||||
{
|
||||
labelCompressionLevel.Text = "Compression Level: Maximum";
|
||||
cmbComPreset.SelectedItem = "Databases/Text";
|
||||
textCompressionLevel.BackColor = Color.Crimson;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private string UpBackupSizeValue
|
||||
{
|
||||
set { labelBackupSizeValue.Text = value; }
|
||||
}
|
||||
|
||||
private string UpSourceSizeValue
|
||||
{
|
||||
set { labelSourceSizeValue.Text = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Update Paths
|
||||
|
||||
private void SetBackupSource(string fullPath)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(fullPath))
|
||||
{
|
||||
string newRoot = _CommonIO.GetRootPath(fullPath);
|
||||
if (!string.IsNullOrEmpty(newRoot))
|
||||
{
|
||||
_MSConfig.RootBackupSource = newRoot;
|
||||
_MSConfig.PathBackupSource = fullPath.Replace(_CommonIO.ConvertVariableToPath(
|
||||
_MSConfig.RootBackupSource), String.Empty);
|
||||
}
|
||||
|
||||
UpdateWithConfig();
|
||||
}
|
||||
}
|
||||
|
||||
private void SetBackupDestination(string fullPath)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(fullPath))
|
||||
{
|
||||
string newRoot = _CommonIO.GetRootPath(fullPath);
|
||||
if (!string.IsNullOrEmpty(newRoot))
|
||||
{
|
||||
_MSConfig.RootBackupDestination = newRoot;
|
||||
_MSConfig.PathBackupDestination = fullPath.Replace(_CommonIO.ConvertVariableToPath(
|
||||
_MSConfig.RootBackupDestination), String.Empty);
|
||||
}
|
||||
|
||||
UpdateWithConfig();
|
||||
}
|
||||
}
|
||||
|
||||
private void SetRestoreSource(string fullPath)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(fullPath))
|
||||
{
|
||||
string newRoot = _CommonIO.GetRootPath(fullPath);
|
||||
if (!string.IsNullOrEmpty(newRoot))
|
||||
{
|
||||
_MSConfig.RootRestoreSource = newRoot;
|
||||
_MSConfig.PathRestoreSource = fullPath.Replace(_CommonIO.ConvertVariableToPath(
|
||||
_MSConfig.RootRestoreSource), String.Empty);
|
||||
}
|
||||
|
||||
UpdateWithConfig();
|
||||
}
|
||||
}
|
||||
|
||||
private void SetRestoreDestination(string fullPath)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(fullPath))
|
||||
{
|
||||
string newRoot = _CommonIO.GetRootPath(fullPath);
|
||||
if (!string.IsNullOrEmpty(newRoot))
|
||||
{
|
||||
_MSConfig.RootRestoreDestination = newRoot;
|
||||
_MSConfig.PathRestoreDestination = fullPath.Replace(_CommonIO.ConvertVariableToPath(
|
||||
_MSConfig.RootRestoreDestination), String.Empty);
|
||||
}
|
||||
|
||||
UpdateWithConfig();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Show save changes dialog on exit.
|
||||
/// </summary>
|
||||
private void PromptSaveChanges()
|
||||
{
|
||||
// Reset value before proceeding.
|
||||
hasCancelledExit = false;
|
||||
|
||||
// Only prompt if there are unsaved changes.
|
||||
if (!_MSConfig.userModifiedConfig) return;
|
||||
DialogResult result;
|
||||
@@ -360,18 +602,30 @@ namespace MicronSync
|
||||
// Save to currently open file or to new one if there isn't one loaded.
|
||||
if (result == DialogResult.Yes)
|
||||
{
|
||||
if (!string.IsNullOrEmpty( _MSConfig.openFile))
|
||||
if (!string.IsNullOrEmpty(_MSConfig.openFile))
|
||||
{ _MSConfig.Save(); }
|
||||
else
|
||||
{ _MSConfig.openFile =
|
||||
_CommonIO.SaveFile(null, CommonIO.FileType.ini); }
|
||||
{
|
||||
_MSConfig.openFile =
|
||||
_CommonIO.SaveFile(null, CommonIO.FileType.ini);
|
||||
}
|
||||
|
||||
_MSConfig.Save();
|
||||
}
|
||||
else if (result == DialogResult.Cancel)
|
||||
hasCancelledExit = true;
|
||||
}
|
||||
|
||||
#region Form
|
||||
|
||||
private void tabControl_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (tabControl.SelectedTab == tabBackup)
|
||||
_MSConfig.InBackupMode = true;
|
||||
else
|
||||
_MSConfig.InBackupMode = false;
|
||||
}
|
||||
|
||||
private void textDescription_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
_MSConfig.Description = textDescription.Text;
|
||||
@@ -380,34 +634,41 @@ namespace MicronSync
|
||||
private void MainWindow_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
PromptSaveChanges();
|
||||
|
||||
if (!hasCancelledExit)
|
||||
e.Cancel = false;
|
||||
else
|
||||
e.Cancel = true;
|
||||
|
||||
hasCancelledExit = false;
|
||||
}
|
||||
|
||||
private void textBackupSource_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
_MSConfig.BackupSource = textBackupSource.Text;
|
||||
labelSyncDate.Text = _CommonIO.CalculateDirectoryModifyDate(_MSConfig.BackupSource);
|
||||
_MSConfig.PathBackupSource = textBackupSource.Text;
|
||||
UpSyncDate = _MSConfig.BackupSource;
|
||||
|
||||
BackupButtonQualifier();
|
||||
}
|
||||
|
||||
private void textBackupDest_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
_MSConfig.BackupDestination = textBackupDest.Text;
|
||||
_MSConfig.PathBackupDestination = textBackupDest.Text;
|
||||
|
||||
BackupButtonQualifier();
|
||||
}
|
||||
|
||||
private void textRestoreSource_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
_MSConfig.RestoreSource = textRestoreSource.Text;
|
||||
labelBackupDate.Text = _CommonIO.CalculateFileModifyDate(_MSConfig.RestoreSource);
|
||||
_MSConfig.PathRestoreSource = textRestoreSource.Text;
|
||||
UpBackupDate = _MSConfig.RestoreSource;
|
||||
|
||||
RestoreButtonQualifier();
|
||||
}
|
||||
|
||||
private void textRestoreDest_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
_MSConfig.RestoreDestination = textRestoreDest.Text;
|
||||
_MSConfig.PathRestoreDestination = textRestoreDest.Text;
|
||||
|
||||
RestoreButtonQualifier();
|
||||
}
|
||||
@@ -439,26 +700,34 @@ namespace MicronSync
|
||||
|
||||
private void btnBackupBrowseSource_Click(object sender, EventArgs e)
|
||||
{
|
||||
textBackupSource.Text = _CommonIO.BrowseFolder(
|
||||
string fullPath = _CommonIO.BrowseFolder(
|
||||
textBackupSource.Text);
|
||||
|
||||
SetBackupSource(fullPath);
|
||||
}
|
||||
|
||||
private void btnBackupBrowseDest_Click(object sender, EventArgs e)
|
||||
{
|
||||
textBackupDest.Text = _CommonIO.SaveFile(
|
||||
string fullPath = _CommonIO.SaveFile(
|
||||
textBackupDest.Text, CommonIO.FileType.sz);
|
||||
|
||||
SetBackupDestination(fullPath);
|
||||
}
|
||||
|
||||
private void btnRestoreSource_Click(object sender, EventArgs e)
|
||||
{
|
||||
textRestoreSource.Text = _CommonIO.OpenFile(
|
||||
string fullPath = _CommonIO.OpenFile(
|
||||
textRestoreSource.Text, CommonIO.FileType.sz);
|
||||
|
||||
SetRestoreSource(fullPath);
|
||||
}
|
||||
|
||||
private void btnRestoreDest_Click(object sender, EventArgs e)
|
||||
{
|
||||
textRestoreDest.Text = _CommonIO.BrowseFolder(
|
||||
string fullPath = _CommonIO.BrowseFolder(
|
||||
textRestoreDest.Text);
|
||||
|
||||
SetRestoreDestination(fullPath);
|
||||
}
|
||||
|
||||
private void checkMirrorSrcToDst_CheckedChanged(object sender, EventArgs e)
|
||||
@@ -492,6 +761,7 @@ namespace MicronSync
|
||||
private void trackBar_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
_MSConfig.CompressionLevel = trackBar.Value;
|
||||
UpCompressionLevelText = trackBar.Value;
|
||||
}
|
||||
|
||||
private void btnRestore_Click(object sender, EventArgs e)
|
||||
@@ -530,6 +800,65 @@ namespace MicronSync
|
||||
}
|
||||
}
|
||||
|
||||
private void cmbRootBSrc_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
_MSConfig.RootBackupSource = cmbRootBSrc.SelectedItem.ToString();
|
||||
|
||||
UpSyncDate = _MSConfig.BackupSource;
|
||||
}
|
||||
|
||||
private void cmbRootBDst_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
_MSConfig.RootBackupDestination = cmbRootBDst.SelectedItem.ToString();
|
||||
}
|
||||
|
||||
private void cmbRootRSrc_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
_MSConfig.RootRestoreSource = cmbRootRSrc.SelectedItem.ToString();
|
||||
|
||||
UpBackupDate = _MSConfig.RestoreSource;
|
||||
}
|
||||
|
||||
private void cmbRootRDst_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
_MSConfig.RootRestoreDestination = cmbRootRDst.SelectedItem.ToString();
|
||||
}
|
||||
|
||||
private void cmbComPreset_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (cmbComPreset.SelectedItem.ToString() == "Software/Games")
|
||||
trackBar.Value = 2;
|
||||
else if (cmbComPreset.SelectedItem.ToString() == "Images/Video")
|
||||
trackBar.Value = 0;
|
||||
else if (cmbComPreset.SelectedItem.ToString() == "Databases/Text")
|
||||
trackBar.Value = 9;
|
||||
else if (cmbComPreset.SelectedItem.ToString() == "Mixed Content")
|
||||
trackBar.Value = 4;
|
||||
}
|
||||
|
||||
private void btnCalcBackupSize_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (File.Exists(_MSConfig.RestoreSource))
|
||||
UpBackupSizeValue = $"{_CommonIO.CalculateFileSizeMB(_MSConfig.RestoreSource)}MB";
|
||||
else
|
||||
UpBackupSizeValue = "N/A";
|
||||
}
|
||||
|
||||
private void btnSourceSize_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Directory.Exists(_MSConfig.BackupSource))
|
||||
{
|
||||
DirSizeCalculatorPrompt dirCalc = new DirSizeCalculatorPrompt();
|
||||
dirCalc.TargetDirectory = _MSConfig.BackupSource;
|
||||
dirCalc.ShowDialog();
|
||||
|
||||
UpSourceSizeValue = $"{dirCalc.Result}MB";
|
||||
|
||||
}
|
||||
else
|
||||
UpSourceSizeValue = "N/A";
|
||||
}
|
||||
|
||||
#region Drag and drop
|
||||
|
||||
private void MainWindow_DragEnter(object sender, DragEventArgs e)
|
||||
@@ -550,19 +879,19 @@ namespace MicronSync
|
||||
switch (dropUi.DropResult)
|
||||
{
|
||||
case DropUI.DropAction.SzUseRestore:
|
||||
textRestoreSource.Text = DropUI.dropData;
|
||||
SetRestoreSource(DropUI.dropData);
|
||||
tabControl.SelectedTab = tabRestore;
|
||||
break;
|
||||
case DropUI.DropAction.SzUseBackup:
|
||||
textBackupDest.Text = DropUI.dropData;
|
||||
SetBackupDestination(DropUI.dropData);
|
||||
tabControl.SelectedTab = tabBackup;
|
||||
break;
|
||||
case DropUI.DropAction.DirUseBackup:
|
||||
textBackupSource.Text = DropUI.dropData;
|
||||
SetBackupSource(DropUI.dropData);
|
||||
tabControl.SelectedTab = tabBackup;
|
||||
break;
|
||||
case DropUI.DropAction.DirUseRestore:
|
||||
textRestoreDest.Text = DropUI.dropData;
|
||||
SetRestoreDestination(DropUI.dropData);
|
||||
tabControl.SelectedTab = tabRestore;
|
||||
break;
|
||||
case DropUI.DropAction.LoadConfig:
|
||||
@@ -581,25 +910,25 @@ namespace MicronSync
|
||||
|
||||
private void btnRepBackupSource_Click(object sender, EventArgs e)
|
||||
{
|
||||
textRestoreDest.Text = textBackupSource.Text;
|
||||
SetRestoreDestination(_MSConfig.BackupSource);
|
||||
tabControl.SelectedTab = tabRestore;
|
||||
}
|
||||
|
||||
private void btnRepBackupDest_Click(object sender, EventArgs e)
|
||||
{
|
||||
textRestoreSource.Text = textBackupDest.Text;
|
||||
SetRestoreSource(_MSConfig.BackupDestination);
|
||||
tabControl.SelectedTab = tabRestore;
|
||||
}
|
||||
|
||||
private void btnRepRestoreSource_Click(object sender, EventArgs e)
|
||||
{
|
||||
textBackupDest.Text = textRestoreSource.Text;
|
||||
SetBackupDestination(_MSConfig.RestoreSource);
|
||||
tabControl.SelectedTab = tabBackup;
|
||||
}
|
||||
|
||||
private void btnRepRestoreDest_Click(object sender, EventArgs e)
|
||||
{
|
||||
textBackupSource.Text = textRestoreDest.Text;
|
||||
SetBackupSource(_MSConfig.RestoreDestination);
|
||||
tabControl.SelectedTab = tabBackup;
|
||||
}
|
||||
|
||||
@@ -611,17 +940,26 @@ namespace MicronSync
|
||||
|
||||
private void newToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
saveToolStripMenuItem.Enabled = false;
|
||||
if (_MSConfig.userModifiedConfig)
|
||||
PromptSaveChanges();
|
||||
if (!hasCancelledExit)
|
||||
{
|
||||
|
||||
_MSConfig = new MSConfig();
|
||||
UpdateWithConfig();
|
||||
_MSConfig = new MSConfig();
|
||||
UpdateWithConfig();
|
||||
|
||||
UpdateStatus = "New job";
|
||||
UpStatus = "New job";
|
||||
saveToolStripMenuItem.Enabled = false;
|
||||
_MSConfig.userModifiedConfig = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void openToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenConfig(true, null, false);
|
||||
if (_MSConfig.userModifiedConfig)
|
||||
PromptSaveChanges();
|
||||
if (!hasCancelledExit)
|
||||
OpenConfig(true, null, false);
|
||||
}
|
||||
|
||||
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
@@ -629,7 +967,7 @@ namespace MicronSync
|
||||
if (!string.IsNullOrEmpty(_MSConfig.openFile))
|
||||
_MSConfig.Save();
|
||||
|
||||
UpdateStatus = "Save successful";
|
||||
UpStatus = "Save successful";
|
||||
}
|
||||
|
||||
private void saveAsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
@@ -640,19 +978,13 @@ namespace MicronSync
|
||||
{
|
||||
_MSConfig.openFile = saveFile;
|
||||
_MSConfig.Save();
|
||||
UpdateStatus = "Save successful";
|
||||
UpStatus = "Save successful";
|
||||
}
|
||||
|
||||
UpdateTitlebar = saveFile;
|
||||
UpTitlebar = saveFile;
|
||||
saveToolStripMenuItem.Enabled = true;
|
||||
}
|
||||
|
||||
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
PromptSaveChanges();
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
||||
private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
AboutBox about = new AboutBox();
|
||||
@@ -683,6 +1015,29 @@ namespace MicronSync
|
||||
cl.ShowDialog();
|
||||
}
|
||||
|
||||
private void refreshDrivesToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Retrieve user modified config status before altering values.
|
||||
bool _userModifiedConfig = _MSConfig.userModifiedConfig;
|
||||
|
||||
string RootBSource = (cmbRootBSrc.SelectedItem != null) ? cmbRootBSrc.SelectedItem.ToString() : null;
|
||||
string RootBDestination = (cmbRootBDst.SelectedItem != null) ? cmbRootBDst.SelectedItem.ToString() : null;
|
||||
string RootRSource = (cmbRootRSrc.SelectedItem != null) ? cmbRootRSrc.SelectedItem.ToString() : null;
|
||||
string RootRDestination = (cmbRootRDst.SelectedItem != null) ? cmbRootRDst.SelectedItem.ToString() : null;
|
||||
|
||||
PopulateRootLists();
|
||||
|
||||
// Match selected items with loaded values.
|
||||
UpRootBackupSourceUI = RootBSource;
|
||||
UpRootBackupDestinationUI = RootBDestination;
|
||||
UpRootRestoreSourceUI = RootRSource;
|
||||
UpRootRestoreDestinationUI = RootRDestination;
|
||||
|
||||
// Unflag save prompt if no changes have been made to config.
|
||||
if (!_userModifiedConfig)
|
||||
_MSConfig.userModifiedConfig = false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
@@ -699,7 +1054,7 @@ namespace MicronSync
|
||||
@"C:\System Volume Information"
|
||||
};
|
||||
|
||||
private readonly int minPathLength = 4;
|
||||
//private readonly int minPathLength = 4;
|
||||
|
||||
private bool IsDirectoryAllowed(string input)
|
||||
{
|
||||
@@ -761,11 +1116,14 @@ namespace MicronSync
|
||||
MessageHandler.errorMessage(MessageHandler.errCodes.MainWindow_RestrictedPath, dst);
|
||||
errors++;
|
||||
}
|
||||
|
||||
/* No longer checking for length/
|
||||
else if (src.Length < minPathLength || dst.Length < minPathLength)
|
||||
{
|
||||
MessageHandler.errorMessage(MessageHandler.errCodes.MainWindow_PathRootInvalid, null);
|
||||
errors++;
|
||||
}
|
||||
*/
|
||||
|
||||
return errors;
|
||||
}
|
||||
|
||||
+211
-63
@@ -1,7 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace MicronSync
|
||||
{
|
||||
@@ -15,6 +18,7 @@ namespace MicronSync
|
||||
/// Flags value to be included in configuration.
|
||||
/// </summary>
|
||||
internal class SaveToConfigAttribute : Attribute { }
|
||||
CommonIO _CIO = new CommonIO();
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
protected void OnPropertyChanged()
|
||||
@@ -23,6 +27,13 @@ namespace MicronSync
|
||||
userModifiedConfig = true;
|
||||
}
|
||||
|
||||
public static readonly Dictionary<string, string> SysVars = new Dictionary<string, string>()
|
||||
{
|
||||
{ "%appdata%\\", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\" },
|
||||
{ "%localappdata%\\", Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\" },
|
||||
{ "%userprofile%\\", Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "\\" },
|
||||
};
|
||||
|
||||
[SaveToConfig]
|
||||
public Version MSVersion
|
||||
{
|
||||
@@ -42,55 +53,7 @@ namespace MicronSync
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
private string _Description;
|
||||
|
||||
[SaveToConfig]
|
||||
public string BackupSource
|
||||
{
|
||||
get { return _BackupSource; }
|
||||
set
|
||||
{
|
||||
_BackupSource = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
private string _BackupSource;
|
||||
|
||||
[SaveToConfig]
|
||||
public string BackupDestination
|
||||
{
|
||||
get { return _BackupDestination; }
|
||||
set
|
||||
{
|
||||
_BackupDestination = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
private string _BackupDestination;
|
||||
|
||||
[SaveToConfig]
|
||||
public string RestoreSource
|
||||
{
|
||||
get { return _RestoreSource; }
|
||||
set
|
||||
{
|
||||
_RestoreSource = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
private string _RestoreSource;
|
||||
|
||||
[SaveToConfig]
|
||||
public string RestoreDestination
|
||||
{
|
||||
get { return _RestoreDestintation; }
|
||||
set
|
||||
{
|
||||
_RestoreDestintation = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
private string _RestoreDestintation;
|
||||
private string _Description = "";
|
||||
|
||||
[SaveToConfig]
|
||||
public bool EnablePurge
|
||||
@@ -128,9 +91,177 @@ namespace MicronSync
|
||||
}
|
||||
private int _CompressionLevel = 4;
|
||||
|
||||
[SaveToConfig]
|
||||
public bool InBackupMode
|
||||
{
|
||||
get { return _InBackupMode; }
|
||||
set
|
||||
{
|
||||
_InBackupMode = value;
|
||||
}
|
||||
}
|
||||
private bool _InBackupMode = true;
|
||||
|
||||
[SaveToConfig]
|
||||
public string RootBackupSource
|
||||
{
|
||||
get { return _RootBackupSource; }
|
||||
set
|
||||
{
|
||||
|
||||
_RootBackupSource = value;
|
||||
|
||||
BackupSource = _CIO.ConvertVariableToPath(_RootBackupSource) + _PathBackupSource;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
private string _RootBackupSource = "";
|
||||
[SaveToConfig]
|
||||
public string PathBackupSource
|
||||
{
|
||||
get { return _PathBackupSource; }
|
||||
set
|
||||
{
|
||||
_PathBackupSource = value;
|
||||
BackupSource = _CIO.ConvertVariableToPath(_RootBackupSource) + value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
private string _PathBackupSource = "";
|
||||
|
||||
[SaveToConfig]
|
||||
public string RootBackupDestination
|
||||
{
|
||||
get { return _RootBackupDestination; }
|
||||
set
|
||||
{
|
||||
_RootBackupDestination = value;
|
||||
|
||||
BackupDestination = _CIO.ConvertVariableToPath(_RootBackupDestination) + _PathBackupDestination;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
private string _RootBackupDestination = "";
|
||||
[SaveToConfig]
|
||||
public string PathBackupDestination
|
||||
{
|
||||
get { return _PathBackupDestination; }
|
||||
set
|
||||
{
|
||||
_PathBackupDestination = value;
|
||||
|
||||
BackupDestination = _CIO.ConvertVariableToPath(_RootBackupDestination) + value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
private string _PathBackupDestination = "";
|
||||
|
||||
[SaveToConfig]
|
||||
public string RootRestoreSource
|
||||
{
|
||||
get { return _RootRestoreSource; }
|
||||
set
|
||||
{
|
||||
_RootRestoreSource = value;
|
||||
|
||||
RestoreSource = _CIO.ConvertVariableToPath(_RootRestoreSource) + _PathRestoreSource;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
private string _RootRestoreSource = "";
|
||||
[SaveToConfig]
|
||||
public string PathRestoreSource
|
||||
{
|
||||
get { return _PathRestoreSource; }
|
||||
set
|
||||
{
|
||||
_PathRestoreSource = value;
|
||||
|
||||
RestoreSource = _CIO.ConvertVariableToPath(_RootRestoreSource) + value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
private string _PathRestoreSource = "";
|
||||
|
||||
[SaveToConfig]
|
||||
public string RootRestoreDestination
|
||||
{
|
||||
get { return _RootRestoreDestination; }
|
||||
set
|
||||
{
|
||||
_RootRestoreDestination = value;
|
||||
|
||||
RestoreDestination = _CIO.ConvertVariableToPath(_RootRestoreDestination) + _PathRestoreDestination;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
private string _RootRestoreDestination = "";
|
||||
[SaveToConfig]
|
||||
public string PathRestoreDestination
|
||||
{
|
||||
get { return _PathRestoreDestination; }
|
||||
set
|
||||
{
|
||||
_PathRestoreDestination = value;
|
||||
RestoreDestination = _CIO.ConvertVariableToPath(_RootRestoreDestination) + value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
private string _PathRestoreDestination = "";
|
||||
|
||||
#region Temporary Values
|
||||
|
||||
public string BackupSource
|
||||
{
|
||||
get { return _BackupSource; }
|
||||
set
|
||||
{
|
||||
_BackupSource = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
private string _BackupSource;
|
||||
|
||||
public string BackupDestination
|
||||
{
|
||||
get { return _BackupDestination; }
|
||||
set
|
||||
{
|
||||
_BackupDestination = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
private string _BackupDestination;
|
||||
|
||||
public string RestoreSource
|
||||
{
|
||||
get { return _RestoreSource; }
|
||||
set
|
||||
{
|
||||
_RestoreSource = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
private string _RestoreSource;
|
||||
|
||||
public string RestoreDestination
|
||||
{
|
||||
get { return _RestoreDestintation; }
|
||||
set
|
||||
{
|
||||
_RestoreDestintation = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
private string _RestoreDestintation;
|
||||
|
||||
public string openFile { get; set; }
|
||||
|
||||
public bool userModifiedConfig { get; set; } = false;
|
||||
|
||||
public Version loadedVersion { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
public class MSConfig : Values
|
||||
@@ -168,22 +299,26 @@ namespace MicronSync
|
||||
try
|
||||
{
|
||||
foreach (var item in GetType().GetProperties())
|
||||
foreach (var attr in item.GetCustomAttributes(true))
|
||||
{
|
||||
///
|
||||
string line;
|
||||
using (StreamReader reader = new StreamReader(openFile, true))
|
||||
while (!string.IsNullOrEmpty(
|
||||
line = reader.ReadLine()))
|
||||
{
|
||||
if (line.StartsWith(item.Name) && item.CanWrite)
|
||||
foreach (var attr in item.GetCustomAttributes(true))
|
||||
{
|
||||
string line;
|
||||
using (StreamReader reader = new StreamReader(openFile, true))
|
||||
while (!string.IsNullOrEmpty(
|
||||
line = reader.ReadLine()))
|
||||
{
|
||||
string readValue = line.ToString().Replace(item.Name, "").TrimStart('=');
|
||||
item.SetValue(this, Convert.ChangeType(readValue, item.PropertyType));
|
||||
if (line.StartsWith(item.Name) && item.CanWrite) // Update all values applicable for config file writing.
|
||||
{
|
||||
string readValue = line.ToString().Replace(item.Name, "").TrimStart('=');
|
||||
item.SetValue(this, Convert.ChangeType(readValue, item.PropertyType));
|
||||
}
|
||||
else if (line.StartsWith("MSVersion")) // Check the config file version is acceptible.
|
||||
{
|
||||
Version readValue = null;
|
||||
if (Version.TryParse(line.ToString().Replace(item.Name, "").TrimStart('='), out readValue))
|
||||
errors += CheckConfigVersion(readValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
///
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
@@ -193,5 +328,18 @@ namespace MicronSync
|
||||
|
||||
return errors;
|
||||
}
|
||||
|
||||
private int CheckConfigVersion(Version readValue)
|
||||
{
|
||||
int errors = 0;
|
||||
Version minValue = new Version(1, 2, 0, 0);
|
||||
if (readValue < minValue)
|
||||
{
|
||||
MessageHandler.stdMessage(MessageHandler.msgCodes.MainWindow_LoadIncompatible, readValue.ToString());
|
||||
errors++;
|
||||
}
|
||||
|
||||
return errors;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -105,6 +105,12 @@
|
||||
<DependentUpon>ChangeLog.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Components\CommonIO.cs" />
|
||||
<Compile Include="Components\Forms\DirSizeCalculatorPrompt.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Components\Forms\DirSizeCalculatorPrompt.Designer.cs">
|
||||
<DependentUpon>DirSizeCalculatorPrompt.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Components\Forms\DonationUI.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -147,6 +153,9 @@
|
||||
<EmbeddedResource Include="Components\Forms\ChangeLog.resx">
|
||||
<DependentUpon>ChangeLog.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Components\Forms\DirSizeCalculatorPrompt.resx">
|
||||
<DependentUpon>DirSizeCalculatorPrompt.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Components\Forms\DonationUI.resx">
|
||||
<DependentUpon>DonationUI.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
||||
<StartArguments>
|
||||
</StartArguments>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -33,7 +33,7 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.1.0.1")]
|
||||
[assembly: AssemblyFileVersion("1.1.0.1")]
|
||||
[assembly: AssemblyVersion("1.2.5.0")]
|
||||
[assembly: AssemblyFileVersion("1.2.5.0")]
|
||||
[assembly: NeutralResourcesLanguage("en-GB")]
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user