3 Commits

Author SHA1 Message Date
a5aed4649b Imported MicronSync v.1.3.0.2 2019-03-05 21:32:12 +00:00
4cea242a17 Imported MicronSync v.1.3.0.0 2019-03-05 21:31:19 +00:00
65acd57b40 Imported MicronSync v1.2.5.0 2019-03-05 21:29:51 +00:00
59 changed files with 10893 additions and 7787 deletions
+92 -4
View File
@@ -1,5 +1,6 @@
using System;
using System.IO;
using System.Text.RegularExpressions;
namespace MicronSync
{
@@ -23,8 +24,8 @@ namespace MicronSync
file.DefaultExt = ".7z";
break;
case FileType.ini:
file.Filter = "Config File|*.ini";
file.DefaultExt = ".ini";
file.Filter = "Config Files (*.mini;*.ini)|*.mini;*.ini";
file.DefaultExt = "*.mini";
break;
default:
break;
@@ -52,8 +53,7 @@ namespace MicronSync
file.DefaultExt = ".7z";
break;
case FileType.ini:
file.Filter = "Config File|*.ini";
file.DefaultExt = ".ini";
file.Filter = "Config Files (*.mini;*.ini)|*.mini;*.ini";
break;
default:
break;
@@ -90,6 +90,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 +126,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 UserConfig.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 UserConfig.SysVars)
if (variable.StartsWith(item.Key))
{
result = item.Value;
break;
}
return result;
}
#endregion.
#region Filesystem Modification
@@ -130,6 +186,7 @@ namespace MicronSync
CopyEntireDirectory_Error,
Default,
RenameEntireDirectory_Error,
WriteToDirectory_Error,
}
public endResult ClearEntireDirectory(string dir)
@@ -214,6 +271,37 @@ namespace MicronSync
return _endResult;
}
public endResult WriteToDirectory(string file)
{
endResult _endResult = endResult.Default;
try
{
using (StreamWriter w = new StreamWriter(file))
{
w.WriteLine("Write access is functional");
w.Close();
}
if (File.Exists(file))
File.Delete(file);
}
catch (UnauthorizedAccessException)
{
_endResult = endResult.WriteToDirectory_Error;
}
return _endResult;
}
#endregion
#region Conversion
public double ConvertBytesToMB(double bytes)
{
return Math.Round(bytes / 1024f / 1024f, 2);
}
#endregion
public void Dispose() { GC.Collect(); }
+89 -104
View File
@@ -28,25 +28,97 @@
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutBox));
this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
this.labelRegistered = new System.Windows.Forms.Label();
this.logoPictureBox = new System.Windows.Forms.PictureBox();
this.labelProductName = new System.Windows.Forms.Label();
this.labelVersion = new System.Windows.Forms.Label();
this.labelCopyright = new System.Windows.Forms.Label();
this.labelCompanyName = new System.Windows.Forms.Label();
this.okButton = new System.Windows.Forms.Button();
this.textBoxDescription = new System.Windows.Forms.TextBox();
this.tableLayoutPanel.SuspendLayout();
this.labelCompanyName = new System.Windows.Forms.Label();
this.labelCopyright = new System.Windows.Forms.Label();
this.labelVersion = new System.Windows.Forms.Label();
this.labelProductName = new System.Windows.Forms.Label();
this.logoPictureBox = new System.Windows.Forms.PictureBox();
this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
this.okButton = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).BeginInit();
this.tableLayoutPanel.SuspendLayout();
this.SuspendLayout();
//
// textBoxDescription
//
this.textBoxDescription.Dock = System.Windows.Forms.DockStyle.Fill;
this.textBoxDescription.Location = new System.Drawing.Point(153, 133);
this.textBoxDescription.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3);
this.textBoxDescription.Multiline = true;
this.textBoxDescription.Name = "textBoxDescription";
this.textBoxDescription.ReadOnly = true;
this.textBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.textBoxDescription.Size = new System.Drawing.Size(261, 100);
this.textBoxDescription.TabIndex = 23;
this.textBoxDescription.TabStop = false;
this.textBoxDescription.Text = "Description";
//
// labelCompanyName
//
this.labelCompanyName.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelCompanyName.Location = new System.Drawing.Point(153, 78);
this.labelCompanyName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0);
this.labelCompanyName.MaximumSize = new System.Drawing.Size(0, 17);
this.labelCompanyName.Name = "labelCompanyName";
this.labelCompanyName.Size = new System.Drawing.Size(261, 17);
this.labelCompanyName.TabIndex = 22;
this.labelCompanyName.Text = "Company Name";
this.labelCompanyName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// labelCopyright
//
this.labelCopyright.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelCopyright.Location = new System.Drawing.Point(153, 52);
this.labelCopyright.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0);
this.labelCopyright.MaximumSize = new System.Drawing.Size(0, 17);
this.labelCopyright.Name = "labelCopyright";
this.labelCopyright.Size = new System.Drawing.Size(261, 17);
this.labelCopyright.TabIndex = 21;
this.labelCopyright.Text = "Copyright";
this.labelCopyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// labelVersion
//
this.labelVersion.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelVersion.Location = new System.Drawing.Point(153, 26);
this.labelVersion.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0);
this.labelVersion.MaximumSize = new System.Drawing.Size(0, 17);
this.labelVersion.Name = "labelVersion";
this.labelVersion.Size = new System.Drawing.Size(261, 17);
this.labelVersion.TabIndex = 0;
this.labelVersion.Text = "Version";
this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// labelProductName
//
this.labelProductName.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelProductName.Location = new System.Drawing.Point(153, 0);
this.labelProductName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0);
this.labelProductName.MaximumSize = new System.Drawing.Size(0, 17);
this.labelProductName.Name = "labelProductName";
this.labelProductName.Size = new System.Drawing.Size(261, 17);
this.labelProductName.TabIndex = 19;
this.labelProductName.Text = "Product Name";
this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// logoPictureBox
//
this.logoPictureBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.logoPictureBox.Image = ((System.Drawing.Image)(resources.GetObject("logoPictureBox.Image")));
this.logoPictureBox.Location = new System.Drawing.Point(3, 3);
this.logoPictureBox.Name = "logoPictureBox";
this.tableLayoutPanel.SetRowSpan(this.logoPictureBox, 6);
this.logoPictureBox.Size = new System.Drawing.Size(141, 230);
this.logoPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.logoPictureBox.TabIndex = 12;
this.logoPictureBox.TabStop = false;
//
// tableLayoutPanel
//
this.tableLayoutPanel.ColumnCount = 2;
this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 35.48387F));
this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 64.51613F));
this.tableLayoutPanel.Controls.Add(this.labelRegistered, 1, 4);
this.tableLayoutPanel.Controls.Add(this.logoPictureBox, 0, 0);
this.tableLayoutPanel.Controls.Add(this.labelProductName, 1, 0);
this.tableLayoutPanel.Controls.Add(this.labelVersion, 1, 1);
@@ -68,78 +140,6 @@
this.tableLayoutPanel.Size = new System.Drawing.Size(417, 265);
this.tableLayoutPanel.TabIndex = 0;
//
// labelRegistered
//
this.labelRegistered.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelRegistered.Location = new System.Drawing.Point(153, 104);
this.labelRegistered.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0);
this.labelRegistered.MaximumSize = new System.Drawing.Size(0, 17);
this.labelRegistered.Name = "labelRegistered";
this.labelRegistered.Size = new System.Drawing.Size(261, 17);
this.labelRegistered.TabIndex = 25;
this.labelRegistered.Text = "Registered:";
this.labelRegistered.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// logoPictureBox
//
this.logoPictureBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.logoPictureBox.Image = ((System.Drawing.Image)(resources.GetObject("logoPictureBox.Image")));
this.logoPictureBox.Location = new System.Drawing.Point(3, 3);
this.logoPictureBox.Name = "logoPictureBox";
this.tableLayoutPanel.SetRowSpan(this.logoPictureBox, 6);
this.logoPictureBox.Size = new System.Drawing.Size(141, 230);
this.logoPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.logoPictureBox.TabIndex = 12;
this.logoPictureBox.TabStop = false;
//
// labelProductName
//
this.labelProductName.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelProductName.Location = new System.Drawing.Point(153, 0);
this.labelProductName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0);
this.labelProductName.MaximumSize = new System.Drawing.Size(0, 17);
this.labelProductName.Name = "labelProductName";
this.labelProductName.Size = new System.Drawing.Size(261, 17);
this.labelProductName.TabIndex = 19;
this.labelProductName.Text = "Product Name";
this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// labelVersion
//
this.labelVersion.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelVersion.Location = new System.Drawing.Point(153, 26);
this.labelVersion.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0);
this.labelVersion.MaximumSize = new System.Drawing.Size(0, 17);
this.labelVersion.Name = "labelVersion";
this.labelVersion.Size = new System.Drawing.Size(261, 17);
this.labelVersion.TabIndex = 0;
this.labelVersion.Text = "Version";
this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// labelCopyright
//
this.labelCopyright.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelCopyright.Location = new System.Drawing.Point(153, 52);
this.labelCopyright.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0);
this.labelCopyright.MaximumSize = new System.Drawing.Size(0, 17);
this.labelCopyright.Name = "labelCopyright";
this.labelCopyright.Size = new System.Drawing.Size(261, 17);
this.labelCopyright.TabIndex = 21;
this.labelCopyright.Text = "Copyright";
this.labelCopyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// labelCompanyName
//
this.labelCompanyName.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelCompanyName.Location = new System.Drawing.Point(153, 78);
this.labelCompanyName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0);
this.labelCompanyName.MaximumSize = new System.Drawing.Size(0, 17);
this.labelCompanyName.Name = "labelCompanyName";
this.labelCompanyName.Size = new System.Drawing.Size(261, 17);
this.labelCompanyName.TabIndex = 22;
this.labelCompanyName.Text = "Company Name";
this.labelCompanyName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// okButton
//
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
@@ -150,20 +150,6 @@
this.okButton.TabIndex = 24;
this.okButton.Text = "&OK";
//
// textBoxDescription
//
this.textBoxDescription.Dock = System.Windows.Forms.DockStyle.Fill;
this.textBoxDescription.Location = new System.Drawing.Point(153, 133);
this.textBoxDescription.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3);
this.textBoxDescription.Multiline = true;
this.textBoxDescription.Name = "textBoxDescription";
this.textBoxDescription.ReadOnly = true;
this.textBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.textBoxDescription.Size = new System.Drawing.Size(261, 100);
this.textBoxDescription.TabIndex = 23;
this.textBoxDescription.TabStop = false;
this.textBoxDescription.Text = "Description";
//
// AboutBox
//
this.AcceptButton = this.okButton;
@@ -180,23 +166,22 @@
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "AboutBox";
((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).EndInit();
this.tableLayoutPanel.ResumeLayout(false);
this.tableLayoutPanel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel;
private System.Windows.Forms.PictureBox logoPictureBox;
private System.Windows.Forms.Label labelProductName;
private System.Windows.Forms.Label labelVersion;
private System.Windows.Forms.Label labelCopyright;
private System.Windows.Forms.Label labelCompanyName;
private System.Windows.Forms.TextBox textBoxDescription;
private System.Windows.Forms.Label labelCompanyName;
private System.Windows.Forms.Label labelCopyright;
private System.Windows.Forms.Label labelVersion;
private System.Windows.Forms.Label labelProductName;
private System.Windows.Forms.PictureBox logoPictureBox;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel;
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.Label labelRegistered;
}
}
-19
View File
@@ -20,7 +20,6 @@ namespace MicronSync.Components
this.labelCopyright.Text = AssemblyCopyright;
this.labelCompanyName.Text = AssemblyCompany;
this.textBoxDescription.Text = AssemblyDescription;
this.labelRegistered.Text += " " + RegisteredStatus;
}
#region Assembly Attribute Accessors
@@ -101,24 +100,6 @@ namespace MicronSync.Components
return ((AssemblyCompanyAttribute)attributes[0]).Company;
}
}
public string RegisteredStatus
{
get
{
string status = null;
if (Licencer.isRegistered)
{
status = "Yes";
}
else
{
status = "No";
}
return status;
}
}
#endregion
}
}
+1 -1
View File
@@ -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
+4 -2
View File
@@ -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();
@@ -41,7 +42,7 @@
this.richTextBox.Location = new System.Drawing.Point(13, 38);
this.richTextBox.Name = "richTextBox";
this.richTextBox.ReadOnly = true;
this.richTextBox.Size = new System.Drawing.Size(359, 361);
this.richTextBox.Size = new System.Drawing.Size(679, 360);
this.richTextBox.TabIndex = 0;
this.richTextBox.Text = "";
//
@@ -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(704, 411);
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
+69 -2
View File
@@ -1,9 +1,76 @@
// Comments are denoted at the beginning of a line with two forward slashes.
[Enhancements]
- 7-zip is no longer required to be installed. MicronSync comes with the required dependencies.
[MicronSync 1.3.0.2]-------------------------------------------------------------------------------
[Bug Fixes]
- Fixed bug which prevented configs loaded from jump-lists from working correctly.
[Enhancements]
- Window location is now preserved.
- MicronSync no longer requires write access from the starting directory.
[MicronSync 1.3.0.1]-------------------------------------------------------------------------------
MicronSync is now freeware, donation screen has been completely removed :)
[Bug Fixes]
- Refreshing drives now works again as intended.
[Enhancements]
- Major under the hood changes to .ini loading/saving functionality.
- Support for new .mini files which can be associated with MicronSync for direct opening in Windows.
- Configs are now saved with the .mini extension by default, .ini is still fully supported going forwards.
[MicronSync 1.3.0.0]-------------------------------------------------------------------------------
[New Features]
- Browse directly to any of the backup and restore paths with a conveniently placed shortcut.
- Restore backups can now be triggered every time a restore operation is run.
- Choose between dark and light themes which are persistent on the system..
[Enhancements]
- Ability to resize main window horizontally for easier legibility of long paths. Horizontal window size is
also stored in a per config basis to accommodate different jobs.
[MicronSync 1.2.5.1]-------------------------------------------------------------------------------
[Enhancements]
- MicronSync now notifies you when importing an invalid or bad configuration file.
[MicronSync 1.2.5.0]-------------------------------------------------------------------------------
[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
}
}
-172
View File
@@ -1,172 +0,0 @@
namespace MicronSync.Components
{
partial class DonationUI
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DonationUI));
this.textInfo = new System.Windows.Forms.RichTextBox();
this.progWait = new System.Windows.Forms.ProgressBar();
this.btnContinue = new System.Windows.Forms.Button();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.registerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.enterRegistrationKeyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.buyKeyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.websiteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.menuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// textInfo
//
this.textInfo.BackColor = System.Drawing.SystemColors.Window;
this.textInfo.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textInfo.Location = new System.Drawing.Point(112, 36);
this.textInfo.Name = "textInfo";
this.textInfo.ReadOnly = true;
this.textInfo.Size = new System.Drawing.Size(460, 96);
this.textInfo.TabIndex = 2;
this.textInfo.Text = resources.GetString("textInfo.Text");
//
// progWait
//
this.progWait.Location = new System.Drawing.Point(12, 138);
this.progWait.Name = "progWait";
this.progWait.Size = new System.Drawing.Size(479, 23);
this.progWait.Step = 20;
this.progWait.TabIndex = 1;
//
// btnContinue
//
this.btnContinue.Enabled = false;
this.btnContinue.Location = new System.Drawing.Point(497, 138);
this.btnContinue.Name = "btnContinue";
this.btnContinue.Size = new System.Drawing.Size(75, 23);
this.btnContinue.TabIndex = 0;
this.btnContinue.Text = "Continue";
this.btnContinue.UseVisualStyleBackColor = true;
this.btnContinue.Click += new System.EventHandler(this.btnContinue_Click);
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.registerToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(584, 24);
this.menuStrip1.TabIndex = 3;
this.menuStrip1.Text = "menuStrip1";
//
// registerToolStripMenuItem
//
this.registerToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.enterRegistrationKeyToolStripMenuItem,
this.buyKeyToolStripMenuItem,
this.toolStripSeparator1,
this.websiteToolStripMenuItem});
this.registerToolStripMenuItem.Name = "registerToolStripMenuItem";
this.registerToolStripMenuItem.Size = new System.Drawing.Size(61, 20);
this.registerToolStripMenuItem.Text = "Register";
//
// enterRegistrationKeyToolStripMenuItem
//
this.enterRegistrationKeyToolStripMenuItem.Name = "enterRegistrationKeyToolStripMenuItem";
this.enterRegistrationKeyToolStripMenuItem.Size = new System.Drawing.Size(182, 22);
this.enterRegistrationKeyToolStripMenuItem.Text = "Enter donation key...";
this.enterRegistrationKeyToolStripMenuItem.Click += new System.EventHandler(this.enterRegistrationKeyToolStripMenuItem_Click);
//
// buyKeyToolStripMenuItem
//
this.buyKeyToolStripMenuItem.Name = "buyKeyToolStripMenuItem";
this.buyKeyToolStripMenuItem.Size = new System.Drawing.Size(182, 22);
this.buyKeyToolStripMenuItem.Text = "Donate...";
this.buyKeyToolStripMenuItem.Click += new System.EventHandler(this.donateToolStripMenuItem_Click);
//
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(12, 36);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(94, 96);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 4;
this.pictureBox1.TabStop = false;
//
// websiteToolStripMenuItem
//
this.websiteToolStripMenuItem.Name = "websiteToolStripMenuItem";
this.websiteToolStripMenuItem.Size = new System.Drawing.Size(182, 22);
this.websiteToolStripMenuItem.Text = "Website...";
this.websiteToolStripMenuItem.Click += new System.EventHandler(this.websiteToolStripMenuItem_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(179, 6);
//
// DonationUI
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Window;
this.ClientSize = new System.Drawing.Size(584, 171);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.btnContinue);
this.Controls.Add(this.progWait);
this.Controls.Add(this.textInfo);
this.Controls.Add(this.menuStrip1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
this.Name = "DonationUI";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "MicronSync - Donation";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.DonationUI_FormClosing);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.RichTextBox textInfo;
private System.Windows.Forms.ProgressBar progWait;
private System.Windows.Forms.Button btnContinue;
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem registerToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem enterRegistrationKeyToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem buyKeyToolStripMenuItem;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.ToolStripMenuItem websiteToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
}
}
-116
View File
@@ -1,116 +0,0 @@
using System;
using System.ComponentModel;
using System.Threading;
using System.Windows.Forms;
namespace MicronSync.Components
{
public partial class DonationUI : Form
{
public static readonly string donateUrl = "http://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=K5TKEUREWNCA8";
public static readonly string websiteUrl = "http://reboundsoftware.weebly.com";
private bool userCloseForm = false;
private bool timerStopped = false;
public DonationUI()
{
InitializeComponent();
StartTimer();
}
private void StartTimer()
{
timerStopped = false;
bwTimer.DoWork += BwTimer_DoWork;
bwTimer.RunWorkerCompleted += BwTimer_RunWorkerCompleted;
bwTimer.ProgressChanged += BwTimer_ProgressChanged;
bwTimer.WorkerReportsProgress = true;
bwTimer.RunWorkerAsync();
}
#region Timer
BackgroundWorker bwTimer = new BackgroundWorker();
private void BwTimer_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
progWait.PerformStep();
}
private void BwTimer_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
if (progWait.Value == 100)
{
userCloseForm = true;
btnContinue.Enabled = true;
}
}
private void BwTimer_DoWork(object sender, DoWorkEventArgs e)
{
int position = progWait.Value;
int stepAmount = progWait.Step;
while (progWait.Value < 100 &&
!timerStopped)
{
Thread.Sleep(1000);
position += stepAmount;
bwTimer.ReportProgress(position);
}
}
#endregion
#region Form
private void DonationUI_FormClosing(object sender, FormClosingEventArgs e)
{
e.Cancel = true;
if (userCloseForm)
e.Cancel = false;
}
private void btnContinue_Click(object sender, EventArgs e)
{
Close();
}
private void enterRegistrationKeyToolStripMenuItem_Click(object sender, EventArgs e)
{
timerStopped = true;
NewRegKeyUI newKey = new NewRegKeyUI();
newKey.ShowDialog();
if (!newKey.userKeyValid)
{
StartTimer();
}
else
{
bwTimer.Dispose();
userCloseForm = true;
Close();
}
}
private void donateToolStripMenuItem_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start(
donateUrl);
}
private void websiteToolStripMenuItem_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start(
websiteUrl);
}
#endregion
}
}
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -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 -1
View File
@@ -29,7 +29,7 @@ namespace MicronSync.Components.Forms
// Idenfify dropped data
FileAttributes attr = File.GetAttributes(DropUI.dropData);
if (dropData.EndsWith(".ini"))
if (dropData.EndsWith(".ini") || dropData.EndsWith(".mini"))
{
DropResult = DropAction.LoadConfig;
Close();
-196
View File
@@ -1,196 +0,0 @@
namespace MicronSync.Components
{
partial class NewRegKeyUI
{
/// <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.textKey1 = new System.Windows.Forms.TextBox();
this.btnAccept = new System.Windows.Forms.Button();
this.textKey2 = new System.Windows.Forms.TextBox();
this.textKey3 = new System.Windows.Forms.TextBox();
this.textKey4 = new System.Windows.Forms.TextBox();
this.labelDash1 = new System.Windows.Forms.Label();
this.labelDash2 = new System.Windows.Forms.Label();
this.labelDash3 = new System.Windows.Forms.Label();
this.btnClipboard = new System.Windows.Forms.Button();
this.btnClear = new System.Windows.Forms.Button();
this.labelEnterKey = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// textKey1
//
this.textKey1.Font = new System.Drawing.Font("Times New Roman", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textKey1.Location = new System.Drawing.Point(16, 51);
this.textKey1.MaxLength = 5;
this.textKey1.Name = "textKey1";
this.textKey1.Size = new System.Drawing.Size(48, 20);
this.textKey1.TabIndex = 0;
this.textKey1.TextChanged += new System.EventHandler(this.textKey1_TextChanged);
this.textKey1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textKey1_KeyPress);
//
// btnAccept
//
this.btnAccept.Location = new System.Drawing.Point(297, 50);
this.btnAccept.Name = "btnAccept";
this.btnAccept.Size = new System.Drawing.Size(75, 23);
this.btnAccept.TabIndex = 4;
this.btnAccept.Text = "Accept";
this.btnAccept.UseVisualStyleBackColor = true;
this.btnAccept.Click += new System.EventHandler(this.btnAccept_Click);
//
// textKey2
//
this.textKey2.Font = new System.Drawing.Font("Times New Roman", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textKey2.Location = new System.Drawing.Point(87, 51);
this.textKey2.MaxLength = 5;
this.textKey2.Name = "textKey2";
this.textKey2.Size = new System.Drawing.Size(48, 20);
this.textKey2.TabIndex = 1;
this.textKey2.TextChanged += new System.EventHandler(this.textKey2_TextChanged);
this.textKey2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textKey2_KeyPress);
//
// textKey3
//
this.textKey3.Font = new System.Drawing.Font("Times New Roman", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textKey3.Location = new System.Drawing.Point(158, 51);
this.textKey3.MaxLength = 5;
this.textKey3.Name = "textKey3";
this.textKey3.Size = new System.Drawing.Size(48, 20);
this.textKey3.TabIndex = 2;
this.textKey3.TextChanged += new System.EventHandler(this.textKey3_TextChanged);
this.textKey3.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textKey3_KeyPress);
//
// textKey4
//
this.textKey4.Font = new System.Drawing.Font("Times New Roman", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textKey4.Location = new System.Drawing.Point(230, 51);
this.textKey4.MaxLength = 5;
this.textKey4.Name = "textKey4";
this.textKey4.Size = new System.Drawing.Size(48, 20);
this.textKey4.TabIndex = 3;
this.textKey4.TextChanged += new System.EventHandler(this.textKey4_TextChanged);
this.textKey4.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textKey4_KeyPress);
//
// labelDash1
//
this.labelDash1.AutoSize = true;
this.labelDash1.Location = new System.Drawing.Point(71, 54);
this.labelDash1.Name = "labelDash1";
this.labelDash1.Size = new System.Drawing.Size(10, 13);
this.labelDash1.TabIndex = 6;
this.labelDash1.Text = "-";
//
// labelDash2
//
this.labelDash2.AutoSize = true;
this.labelDash2.Location = new System.Drawing.Point(142, 55);
this.labelDash2.Name = "labelDash2";
this.labelDash2.Size = new System.Drawing.Size(10, 13);
this.labelDash2.TabIndex = 7;
this.labelDash2.Text = "-";
//
// labelDash3
//
this.labelDash3.AutoSize = true;
this.labelDash3.Location = new System.Drawing.Point(214, 55);
this.labelDash3.Name = "labelDash3";
this.labelDash3.Size = new System.Drawing.Size(10, 13);
this.labelDash3.TabIndex = 8;
this.labelDash3.Text = "-";
//
// btnClipboard
//
this.btnClipboard.Location = new System.Drawing.Point(16, 86);
this.btnClipboard.Name = "btnClipboard";
this.btnClipboard.Size = new System.Drawing.Size(119, 23);
this.btnClipboard.TabIndex = 5;
this.btnClipboard.Text = "Paste from clipboard";
this.btnClipboard.UseVisualStyleBackColor = true;
this.btnClipboard.Click += new System.EventHandler(this.btnClipboard_Click);
//
// btnClear
//
this.btnClear.Location = new System.Drawing.Point(297, 86);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(75, 23);
this.btnClear.TabIndex = 6;
this.btnClear.Text = "Clear";
this.btnClear.UseVisualStyleBackColor = true;
this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
//
// labelEnterKey
//
this.labelEnterKey.AutoSize = true;
this.labelEnterKey.Location = new System.Drawing.Point(13, 13);
this.labelEnterKey.Name = "labelEnterKey";
this.labelEnterKey.Size = new System.Drawing.Size(143, 13);
this.labelEnterKey.TabIndex = 9;
this.labelEnterKey.Text = "Please enter your key below:";
//
// NewRegKeyUI
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(384, 121);
this.Controls.Add(this.labelEnterKey);
this.Controls.Add(this.btnClear);
this.Controls.Add(this.btnClipboard);
this.Controls.Add(this.labelDash3);
this.Controls.Add(this.labelDash2);
this.Controls.Add(this.labelDash1);
this.Controls.Add(this.textKey4);
this.Controls.Add(this.textKey3);
this.Controls.Add(this.textKey2);
this.Controls.Add(this.btnAccept);
this.Controls.Add(this.textKey1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "NewRegKeyUI";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "MicronSync - Enter key";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.NewRegKeyUI_FormClosing);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox textKey1;
private System.Windows.Forms.Button btnAccept;
private System.Windows.Forms.TextBox textKey2;
private System.Windows.Forms.TextBox textKey3;
private System.Windows.Forms.TextBox textKey4;
private System.Windows.Forms.Label labelDash1;
private System.Windows.Forms.Label labelDash2;
private System.Windows.Forms.Label labelDash3;
private System.Windows.Forms.Button btnClipboard;
private System.Windows.Forms.Button btnClear;
private System.Windows.Forms.Label labelEnterKey;
}
}
-146
View File
@@ -1,146 +0,0 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace MicronSync.Components
{
public partial class NewRegKeyUI : Form
{
public bool userKeyValid = false;
private readonly Licencer _licencer = new Licencer();
public NewRegKeyUI()
{
InitializeComponent();
}
#region Transform text to uppercase.
private void textKey1_KeyPress(object sender, KeyPressEventArgs e)
{
e.KeyChar = Char.ToUpper(e.KeyChar);
}
private void textKey2_KeyPress(object sender, KeyPressEventArgs e)
{
e.KeyChar = Char.ToUpper(e.KeyChar);
}
private void textKey3_KeyPress(object sender, KeyPressEventArgs e)
{
e.KeyChar = Char.ToUpper(e.KeyChar);
}
private void textKey4_KeyPress(object sender, KeyPressEventArgs e)
{
e.KeyChar = Char.ToUpper(e.KeyChar);
}
#endregion
#region Automatically move cursor to next element.
private void textKey1_TextChanged(object sender, EventArgs e)
{
if (textKey1.TextLength == 5)
textKey2.Focus();
}
private void textKey2_TextChanged(object sender, EventArgs e)
{
if (textKey2.TextLength == 5)
textKey3.Focus();
}
private void textKey3_TextChanged(object sender, EventArgs e)
{
if (textKey3.TextLength == 5)
textKey4.Focus();
}
private void textKey4_TextChanged(object sender, EventArgs e)
{
if (textKey4.TextLength == 5)
btnAccept.Focus();
}
#endregion
private void ClearAllText()
{
textKey1.Clear();
textKey2.Clear();
textKey3.Clear();
textKey4.Clear();
}
private void btnAccept_Click(object sender, EventArgs e)
{
List<string> keyParts = new List<string>();
keyParts.Add(textKey1.Text + "-");
keyParts.Add(textKey2.Text + "-");
keyParts.Add(textKey3.Text + "-");
keyParts.Add(textKey4.Text);
string fullKey = null;
foreach (var part in keyParts)
{
fullKey += part;
}
userKeyValid = _licencer.ValidateKey(fullKey);
if (userKeyValid)
{
MessageHandler.stdMessage(MessageHandler.msgCodes.NewRegKeyUI_CorrectKey, null);
_licencer.SetKey(fullKey);
Close();
}
else
{
MessageHandler.errorMessage(MessageHandler.errCodes.NewRegKeyUI_InvalidKey, null);
}
}
private void btnClipboard_Click(object sender, EventArgs e)
{
ClearAllText();
string clipboard = Clipboard.GetText(TextDataFormat.Text)
.Replace("-", "").ToUpper();
for (int i = 0; i < clipboard.Length; i++)
{
if (i < 5)
{
textKey1.Text += clipboard[i].ToString();
}
else if (i < 10)
{
textKey2.Text += clipboard[i].ToString();
}
else if (i < 15)
{
textKey3.Text += clipboard[i].ToString();
}
else if (i < 20)
{
textKey4.Text += clipboard[i].ToString();
}
}
}
private void btnClear_Click(object sender, EventArgs e)
{
ClearAllText();
}
/// Update is user registered status.
private void NewRegKeyUI_FormClosing(object sender, FormClosingEventArgs e)
{
Licencer.isRegistered = userKeyValid;
}
}
}
+45 -24
View File
@@ -1,12 +1,8 @@
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.Threading;
using System.Windows.Forms;
namespace MicronSync.Components
@@ -21,7 +17,9 @@ 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 readonly UserConfig _userConfig = MainWindow._userConfig;
private Stopwatch stopWatch = new Stopwatch();
public TimeSpan compTime;
public WorkerUI()
{
@@ -43,10 +41,10 @@ namespace MicronSync.Components
private void LmzaBackup_DoWork(object sender, DoWorkEventArgs e)
{
_endResultLMZA = lmzaParser.MakePackage(
Path.GetFileName(_ManageConfig_RO.BackupDestination),
_ManageConfig_RO.BackupSource,
Path.GetDirectoryName(_ManageConfig_RO.BackupDestination),
_ManageConfig_RO.CompressionLevel,
Path.GetFileName(_userConfig.BackupDestination),
_userConfig.BackupSource,
Path.GetDirectoryName(_userConfig.BackupDestination),
_userConfig.CompressionLevel,
"",
false);
}
@@ -62,26 +60,39 @@ namespace MicronSync.Components
// Process params.
using (CommonIO cio = new CommonIO())
{
// Move source directory if also purging, otherwise perform standard copy.
if (_ManageConfig_RO.EnableBackup && !_ManageConfig_RO.EnablePurge)
_endResultCIO = cio.CopyEntireDirectory(_ManageConfig_RO.RestoreDestination,
_ManageConfig_RO.RestoreDestination + ".Backup");
else if (_ManageConfig_RO.EnableBackup && _ManageConfig_RO.EnablePurge)
var restoreBackupDir = _userConfig.RestoreDestination + ".Backup";
// Clear out old backup directory if it exists.
if (_userConfig.OverwriteBackup && Directory.Exists(restoreBackupDir))
{
_endResultCIO = cio.RenameEntireDirectory(_ManageConfig_RO.RestoreDestination,
_ManageConfig_RO.RestoreDestination + ".Backup");
Directory.CreateDirectory(_ManageConfig_RO.RestoreDestination);
Directory.Delete(restoreBackupDir, true);
Thread.Sleep(500); // Delay needed for reliability!
}
if (_ManageConfig_RO.EnablePurge)
_endResultCIO = cio.ClearEntireDirectory(_ManageConfig_RO.RestoreDestination);
// Move source directory if also purging, otherwise perform standard copy.
if (_userConfig.EnableBackup && !_userConfig.EnablePurge)
{
_endResultCIO = cio.CopyEntireDirectory(
_userConfig.RestoreDestination,
restoreBackupDir);
}
else if (_userConfig.EnableBackup && _userConfig.EnablePurge)
{
_endResultCIO = cio.RenameEntireDirectory(
_userConfig.RestoreDestination,
restoreBackupDir);
Directory.CreateDirectory(_userConfig.RestoreDestination);
}
if (_userConfig.EnablePurge)
_endResultCIO = cio.ClearEntireDirectory(_userConfig.RestoreDestination);
}
if (_endResultCIO == CommonIO.endResult.Default)
_endResultLMZA = lmzaParser.ExtractPackage(
Path.GetFileName(_ManageConfig_RO.RestoreSource),
Path.GetDirectoryName(_ManageConfig_RO.RestoreSource),
_ManageConfig_RO.RestoreDestination,
Path.GetFileName(_userConfig.RestoreSource),
Path.GetDirectoryName(_userConfig.RestoreSource),
_userConfig.RestoreDestination,
"");
}
@@ -93,6 +104,9 @@ namespace MicronSync.Components
private void WorkerUI_Load(object sender, EventArgs e)
{
// Start stopwatch.
stopWatch.Start();
switch (SetWorkerMode)
{
case WorkerMode.Backup:
@@ -115,6 +129,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
-94
View File
@@ -1,94 +0,0 @@
using Microsoft.Win32;
using System;
namespace MicronSync.Components
{
public class Licencer
{
private readonly string privateKey = "TRZzjAutdtA542aeQj";
private readonly string msRegPath = @"SOFTWARE\MicronSync\";
private readonly string msRegKey = "Key";
public static bool isRegistered { get; set; } = false;
public bool CheckForExistingLicence()
{
bool licenceExists = false;
try
{
var regPath = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Registry32);
var regKey = regPath?.OpenSubKey(msRegPath);
var value = regKey?.GetValue(msRegKey);
bool isValidKey = ValidateKey((string)value);
if (isValidKey)
{
licenceExists = true;
}
else if (regKey != null && !isValidKey)
{
MessageHandler.errorMessage(MessageHandler.errCodes.NewRegKeyUI_PirateKey, null);
Environment.Exit(2);
}
}
catch (Exception)
{
licenceExists = false;
}
return licenceExists;
}
public void ShowDonationPrompt()
{
DonationUI dui = new DonationUI();
dui.ShowDialog();
}
/// <summary>
/// Returns legitimacy of key.
/// </summary>
/// <param name="input">Key to check.</param>
/// <returns>Key is genuine.</returns>
public bool ValidateKey(string input)
{
SKGL.Validate skgl = new SKGL.Validate();
skgl.secretPhase = privateKey;
skgl.Key = input.ToUpper();
return skgl.IsValid;
}
/// <summary>
/// Stores key into user level registry.
/// </summary>
/// <param name="key"></param>
public void SetKey(string key)
{
try
{
var regPath = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Registry32);
var regKey = regPath.CreateSubKey(msRegPath);
regKey.SetValue(msRegKey, key.ToUpper(), RegistryValueKind.String);
}
catch (Exception)
{
throw;
}
}
/// <summary>
/// Generate new key based on internal private key.
/// </summary>
/// <returns></returns>
public string CreateNewKey()
{
SKGL.Generate skgl = new SKGL.Generate();
skgl.secretPhase = privateKey;
return skgl.doKey(0, DateTime.Now);
}
}
}
+28 -13
View File
@@ -13,12 +13,12 @@ namespace MicronSync
MainWindow_Warn_OverwriteFile,
NewRegKeyUI_CorrectKey,
MainWindow_SaveChanges,
MainWindow_LoadIncompatible,
}
public enum errCodes
{
_TestSample,
MainWindow_SZNotInstalled,
WorkerUI_BadBackupPath,
WorkerUI_BadRestorePath,
MainWindow_RestrictedPath,
@@ -26,7 +26,6 @@ namespace MicronSync
MainWindow_DstWithinSrc,
MainWindow_RestoreError,
MainWindow_BackupError,
Config_WriteError,
Config_ReadError,
MainWindow_ArchiveNotFound,
NewRegKeyUI_InvalidKey,
@@ -34,6 +33,10 @@ namespace MicronSync
MainWindow_BadConfigFile,
MainWindow_BadConfigFile_FromEXE,
MainWindow_DirectoryNotFound,
Config_BadFile,
MainWindow_BadExplorePath,
MainWindow_EmptyExplorePath,
MainWindow_SZNotInstalled,
}
/// <summary>
@@ -49,10 +52,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);
@@ -81,10 +80,6 @@ namespace MicronSync
MessageBox.Show($"There was a problem backing up the selected directory, check you have entered the correct path. Additionally, ensure you have sufficient read/write access.", "MicronSync",
MessageBoxButtons.OK, MessageBoxIcon.Error);
break;
case errCodes.Config_WriteError:
MessageBox.Show($"Failed to write configuration file.", "MicronSync",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
break;
case errCodes.Config_ReadError:
MessageBox.Show($"The current directory is either write-protected or the configuration file is corrupt.", "MicronSync",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
@@ -102,7 +97,7 @@ namespace MicronSync
MessageBoxButtons.OK, MessageBoxIcon.Error);
break;
case errCodes.NewRegKeyUI_PirateKey:
MessageBox.Show($"You have imported a bad key onto your system. Please delete it to continue using this software.", "MicronSync",
MessageBox.Show($"You have imported a bad key onto your system. It will now be deleted for the continued use of this software.", "MicronSync",
MessageBoxButtons.OK, MessageBoxIcon.Error);
break;
case errCodes.MainWindow_BadConfigFile:
@@ -113,6 +108,22 @@ namespace MicronSync
MessageBox.Show($"Unsupported data.\nOnly config files are supported when loaded directly from application!", "MicronSync",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
break;
case errCodes.Config_BadFile:
MessageBox.Show($"The following configuration file is corrupt or invalid:\n\n{info}", "MicronSync",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
break;
case errCodes.MainWindow_BadExplorePath:
MessageBox.Show($"The following path could not be found:\n\n{info}", "MicronSync",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
break;
case errCodes.MainWindow_EmptyExplorePath:
MessageBox.Show($"Cannot browse to an empty path.", "MicronSync",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
break;
case errCodes.MainWindow_SZNotInstalled:
MessageBox.Show("7z.exe/7z.dll can not be found in the working directory. Please ensure they both exist and try again.", "MicronSync",
MessageBoxButtons.OK, MessageBoxIcon.Error);
break;
}
}
@@ -146,8 +157,12 @@ 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.\nPlease load a config file which is at least of version 1.2.0.0 or create a new one, sorry for any inconvenience caused!", "MicronSync - Incompatible config",
MessageBoxButtons.OK, MessageBoxIcon.Warning);
break;
}
return _dialogResult;
Binary file not shown.
+67
View File
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8" ?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- -->
<!-- ILMerge project-specific settings. Almost never need to be set explicitly. -->
<!-- for details, see http://research.microsoft.com/en-us/people/mbarnett/ilmerge.aspx -->
<!-- -->
<!-- *** set this file to Type=None, CopyToOutput=Never *** -->
<!-- If True, all copy local dependencies will also be merged from referenced projects whether they are referenced in the current project explicitly or not -->
<ILMergeTransitive>true</ILMergeTransitive>
<!-- Extra ILMerge library paths (semicolon-separated). Dont put your package dependencies here, they will be added automagically -->
<ILMergeLibraryPath></ILMergeLibraryPath>
<!-- The solution NuGet package directory if not standard 'SOLUTION\packages' -->
<ILMergePackagesPath></ILMergePackagesPath>
<!-- The merge order file name if differs from standard 'ILMergeOrder.txt' -->
<ILMergeOrderFile></ILMergeOrderFile>
<!-- The strong key file name if not specified in the project -->
<ILMergeKeyFile></ILMergeKeyFile>
<!-- The assembly version if differs for the version of the main assembly -->
<ILMergeAssemblyVersion></ILMergeAssemblyVersion>
<!-- added in Version 1.0.4 -->
<ILMergeFileAlignment></ILMergeFileAlignment>
<!-- added in Version 1.0.4, default=none -->
<ILMergeAllowDuplicateType></ILMergeAllowDuplicateType>
<!-- If the <see cref="CopyAttributes"/> is also set, any assembly-level attributes names that have the same type are copied over into the target assembly -->
<ILMergeAllowMultipleAssemblyLevelAttributes></ILMergeAllowMultipleAssemblyLevelAttributes>
<!-- See ILMerge documentation -->
<ILMergeAllowZeroPeKind></ILMergeAllowZeroPeKind>
<!-- The assembly level attributes of each input assembly are copied over into the target assembly -->
<ILMergeCopyAttributes></ILMergeCopyAttributes>
<!-- Creates a .pdb file for the output assembly and merges into it any .pdb files found for input assemblies, default=true -->
<ILMergeDebugInfo></ILMergeDebugInfo>
<!-- Target assembly will be delay signed -->
<ILMergeDelaySign></ILMergeDelaySign>
<!-- Types in assemblies other than the primary assembly have their visibility modified -->
<ILMergeInternalize></ILMergeInternalize>
<!-- The path name of the file that will be used to identify types that are not to have their visibility modified -->
<ILMergeInternalizeExcludeFile></ILMergeInternalizeExcludeFile>
<!-- XML documentation files are merged to produce an XML documentation file for the target assembly -->
<ILMergeXmlDocumentation></ILMergeXmlDocumentation>
<!-- External assembly references in the manifest of the target assembly will use full public keys (false) or public key tokens (true, default value) -->
<ILMergePublicKeyTokens></ILMergePublicKeyTokens>
<!-- Types with the same name are all merged into a single type in the target assembly -->
<ILMergeUnionMerge></ILMergeUnionMerge>
<!-- The version of the target framework, default 40 (works for 45 too) -->
<ILTargetPlatform></ILTargetPlatform>
</PropertyGroup>
</Project>
+4
View File
@@ -0,0 +1,4 @@
# this file contains the partial list of the merged assemblies in the merge order
# you can fill it from the obj\CONFIG\PROJECT.ilmerge generated on every build
# and finetune merge order to your satisfaction
+590 -222
View File
File diff suppressed because it is too large Load Diff
+601 -140
View File
File diff suppressed because it is too large Load Diff
+333 -109
View File
@@ -1,37 +1,46 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Reflection;
using IniParser;
using IniParser.Model;
namespace MicronSync
{
/// <summary>
/// Settings to store.
/// </summary>
[Obfuscation(Exclude =true, ApplyToMembers = true)]
public class Values : INotifyPropertyChanged
[Obfuscation(Exclude = true, ApplyToMembers = true)]
internal class UserConfigValues : INotifyPropertyChanged
{
/// <summary>
/// Flags value to be included in configuration.
/// </summary>
internal class SaveToConfigAttribute : Attribute { }
internal class SaveToConfigAttribute : Attribute {}
CommonIO _CIO = new CommonIO();
public event PropertyChangedEventHandler PropertyChanged;
protected void OnPropertyChanged()
protected virtual void OnPropertyChanged() { UserModifiedConfig = true; }
public static readonly Dictionary<string, string> SysVars = new Dictionary<string, string>()
{
PropertyChangedEventHandler handler = PropertyChanged;
userModifiedConfig = true;
}
{"%appdata%\\", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\"},
{"%localappdata%\\", Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\"},
{"%userprofile%\\", Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "\\"},
};
[SaveToConfig]
public Version MSVersion
{
get
{
return Assembly.GetExecutingAssembly().GetName().Version;
}
get { return Assembly.GetExecutingAssembly().GetName().Version; }
}
[SaveToConfig]
public string MSIniType { get; set; } = "Config";
[SaveToConfig]
public string Description
{
@@ -42,55 +51,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 = string.Empty;
[SaveToConfig]
public bool EnablePurge
@@ -116,6 +77,18 @@ namespace MicronSync
}
private bool _EnableBackup;
[SaveToConfig]
public bool OverwriteBackup
{
get { return _OverwriteBackup; }
set
{
_OverwriteBackup = value;
OnPropertyChanged();
}
}
private bool _OverwriteBackup;
[SaveToConfig]
public int CompressionLevel
{
@@ -126,72 +99,323 @@ namespace MicronSync
OnPropertyChanged();
}
}
private int _CompressionLevel = 4;
private int _CompressionLevel = 4;
public string openFile { get; set; }
public bool userModifiedConfig { get; set; } = false;
}
public class MSConfig : Values
{
public int Save()
[SaveToConfig]
public string RootBackupSource
{
int errors = 0;
try
get { return _RootBackupSource; }
set
{
// Delete existing config file.
if (File.Exists(openFile))
File.Delete(openFile);
StreamWriter writer = new StreamWriter(openFile, true);
_RootBackupSource = value;
foreach (var item in GetType().GetProperties())
foreach (var attr in item.GetCustomAttributes(true))
if (item.GetValue(this) != null && item.CanRead)
writer.WriteLine($"{item.Name}={item.GetValue(this)}");
writer.Close();
BackupSource = _CIO.ConvertVariableToPath(_RootBackupSource) + _PathBackupSource;
OnPropertyChanged();
}
catch (Exception)
}
private string _RootBackupSource = string.Empty;
[SaveToConfig]
public string PathBackupSource
{
get { return _PathBackupSource; }
set
{
MessageHandler.errorMessage(MessageHandler.errCodes.Config_WriteError, null);
errors++;
_PathBackupSource = value;
BackupSource = _CIO.ConvertVariableToPath(_RootBackupSource) + value;
OnPropertyChanged();
}
}
private string _PathBackupSource = string.Empty;
userModifiedConfig = false;
return errors;
[SaveToConfig]
public string RootBackupDestination
{
get { return _RootBackupDestination; }
set
{
_RootBackupDestination = value;
BackupDestination = _CIO.ConvertVariableToPath(_RootBackupDestination) + _PathBackupDestination;
OnPropertyChanged();
}
}
private string _RootBackupDestination = string.Empty;
[SaveToConfig]
public string PathBackupDestination
{
get { return _PathBackupDestination; }
set
{
_PathBackupDestination = value;
BackupDestination = _CIO.ConvertVariableToPath(_RootBackupDestination) + value;
OnPropertyChanged();
}
}
private string _PathBackupDestination = string.Empty;
[SaveToConfig]
public string RootRestoreSource
{
get { return _RootRestoreSource; }
set
{
_RootRestoreSource = value;
RestoreSource = _CIO.ConvertVariableToPath(_RootRestoreSource) + _PathRestoreSource;
OnPropertyChanged();
}
}
private string _RootRestoreSource = string.Empty;
[SaveToConfig]
public string PathRestoreSource
{
get { return _PathRestoreSource; }
set
{
_PathRestoreSource = value;
RestoreSource = _CIO.ConvertVariableToPath(_RootRestoreSource) + value;
OnPropertyChanged();
}
}
private string _PathRestoreSource = string.Empty;
[SaveToConfig]
public string RootRestoreDestination
{
get { return _RootRestoreDestination; }
set
{
_RootRestoreDestination = value;
RestoreDestination = _CIO.ConvertVariableToPath(_RootRestoreDestination) + _PathRestoreDestination;
OnPropertyChanged();
}
}
private string _RootRestoreDestination = string.Empty;
[SaveToConfig]
public string PathRestoreDestination
{
get { return _PathRestoreDestination; }
set
{
_PathRestoreDestination = value;
RestoreDestination = _CIO.ConvertVariableToPath(_RootRestoreDestination) + value;
OnPropertyChanged();
}
}
private string _PathRestoreDestination = string.Empty;
[SaveToConfig]
public bool InBackupMode { get; set; } = true;
[SaveToConfig]
public int WindowWidth { get; set; }
#region Temporary UserConfigValues
public string BackupSource
{
get { return _BackupSource; }
set
{
_BackupSource = value;
OnPropertyChanged();
}
}
public int Load()
private string _BackupSource;
public string BackupDestination
{
int errors = 0;
try
get { return _BackupDestination; }
set
{
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)
{
string readValue = line.ToString().Replace(item.Name, "").TrimStart('=');
item.SetValue(this, Convert.ChangeType(readValue, item.PropertyType));
}
}
///
}
_BackupDestination = value;
OnPropertyChanged();
}
catch (Exception)
}
private string _BackupDestination;
public string RestoreSource
{
get { return _RestoreSource; }
set
{
MessageHandler.errorMessage(MessageHandler.errCodes.Config_ReadError, null);
errors++;
_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; }
public bool OnSaveIni { get; set; }
public Version LoadedVersion { get; set; }
#endregion
}
internal class UserConfig : UserConfigValues
{
public bool IsValidConfig { get; set; } = true;
public void Save()
{
var data = new IniData();
foreach (var item in GetType().GetProperties())
for (var i = 0; i < item.GetCustomAttributes(typeof(Attribute)).Count(); i++)
if (item.GetValue(this) != null && item.CanRead)
data.Global.AddKey(item.Name, Convert.ToString(item.GetValue(this)));
var parser = new FileIniDataParser();
parser.WriteFile(OpenFile, data);
UserModifiedConfig = false;
}
public bool Load()
{
var parser = new FileIniDataParser();
IniData data = parser.ReadFile(OpenFile);
foreach (var item in GetType().GetProperties())
for (var i = 0; i < item.GetCustomAttributes(typeof(Attribute)).Count(); i++)
foreach (var line in data.Global)
if (Convert.ToString(line.KeyName).StartsWith(item.Name) && item.CanWrite)
item.SetValue(this, Convert.ChangeType(line.Value, item.PropertyType));
// Rules
foreach (var line in data.Global)
{
if (IsValidConfig)
{
if (line.KeyName == "MSIniType" && line.Value != "Config")
{
IsValidConfig = false;
}
if (line.KeyName == "MSVersion")
{
Version v;
if (Version.TryParse(line.Value, out v))
IsValidConfig = IsMinimumConfigVersion(v);
}
}
else { break; }
}
return errors;
// Show errors
if (!IsValidConfig)
{ MessageHandler.errorMessage(MessageHandler.errCodes.Config_BadFile, OpenFile); }
return IsValidConfig;
}
private bool IsMinimumConfigVersion(Version readValue)
{
bool result = true;
Version minValue = new Version(1, 2, 0, 0);
if (readValue < minValue)
{
MessageHandler.stdMessage(MessageHandler.msgCodes.MainWindow_LoadIncompatible, readValue.ToString());
result = false;
}
return result;
}
}
[Obfuscation(Exclude = true, ApplyToMembers = true)]
internal class SettingsValues
{
public class SaveToSettingsAttribute : Attribute { }
[SaveToSettings]
public Version MSVersion
{
get { return Assembly.GetExecutingAssembly().GetName().Version; }
}
[SaveToSettings]
public string MSIniType { get; set; } = "Settings";
[SaveToSettings]
public bool UseDarkMode { get; set; }
[SaveToSettings]
public bool RememberWindowLoc { get; set; } = true;
[SaveToSettings]
public int WindowYPos { get; set; }
[SaveToSettings]
public int WindowXPos { get; set; }
public static readonly string ExeDirectoryLocation = Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
"MicronSync");
public static readonly string IniAbsoluteLocation = Path.Combine(
ExeDirectoryLocation,
"Settings.ini");
}
internal class Settings : SettingsValues
{
public void Save()
{
if (!Directory.Exists(ExeDirectoryLocation))
Directory.CreateDirectory(ExeDirectoryLocation);
var data = new IniData();
foreach (var item in GetType().GetProperties())
for (var i = 0; i < item.GetCustomAttributes(typeof(Attribute)).Count(); i++)
if (item.GetValue(this) != null && item.CanRead)
data.Global.AddKey(item.Name, Convert.ToString(item.GetValue(this)));
var parser = new FileIniDataParser();
parser.WriteFile(IniAbsoluteLocation, data);
}
public void Load()
{
if (!File.Exists(IniAbsoluteLocation))
Save();
var parser = new FileIniDataParser();
IniData data = parser.ReadFile(IniAbsoluteLocation);
foreach (var item in GetType().GetProperties())
for (var i = 0; i < item.GetCustomAttributes(typeof(Attribute)).Count(); i++)
foreach (var line in data.Global)
if (Convert.ToString(line.KeyName).StartsWith(item.Name) && item.CanWrite)
item.SetValue(this, Convert.ChangeType(line.Value, item.PropertyType));
}
}
}
+52 -27
View File
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="packages\MSBuild.ILMerge.Task.1.0.5\build\MSBuild.ILMerge.Task.props" Condition="Exists('packages\MSBuild.ILMerge.Task.1.0.5\build\MSBuild.ILMerge.Task.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -12,6 +13,9 @@
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<IsWebBootstrapper>false</IsWebBootstrapper>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
@@ -22,10 +26,15 @@
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>6</ApplicationRevision>
<ApplicationVersion>0.9.9.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<ErrorReportUrl>http://www.reboundsoftware.weebly.com/</ErrorReportUrl>
<TargetCulture>en</TargetCulture>
<ProductName>MicronSync</ProductName>
<PublisherName>Rebound Software</PublisherName>
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
<ApplicationRevision>2</ApplicationRevision>
<ApplicationVersion>1.3.0.2</ApplicationVersion>
<UseApplicationTrust>true</UseApplicationTrust>
<ExcludeDeploymentUrl>true</ExcludeDeploymentUrl>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
@@ -57,26 +66,34 @@
<ApplicationIcon>MicronSync.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>F6E1314BAFECF34F1321DE2C676D9C38A192420A</ManifestCertificateThumbprint>
<ManifestCertificateThumbprint>7975FC862A8D742C2100A88470C1F1350966E5E8</ManifestCertificateThumbprint>
</PropertyGroup>
<PropertyGroup>
<ManifestKeyFile>MicronSync_TemporaryKey.pfx</ManifestKeyFile>
<ManifestKeyFile>ReboundSoftware.pfx</ManifestKeyFile>
</PropertyGroup>
<PropertyGroup>
<GenerateManifests>false</GenerateManifests>
</PropertyGroup>
<PropertyGroup>
<SignManifests>false</SignManifests>
<SignManifests>true</SignManifests>
</PropertyGroup>
<PropertyGroup>
<TargetZone>LocalIntranet</TargetZone>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>
</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="INIFileParser, Version=2.3.0.0, Culture=neutral, PublicKeyToken=79af7b307b65cf3c, processorArchitecture=MSIL">
<HintPath>packages\ini-parser.2.3.0\lib\net20\INIFileParser.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="SKGL">
<HintPath>.\SKGL.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.configuration" />
<Reference Include="System.Core" />
@@ -105,11 +122,11 @@
<DependentUpon>ChangeLog.cs</DependentUpon>
</Compile>
<Compile Include="Components\CommonIO.cs" />
<Compile Include="Components\Forms\DonationUI.cs">
<Compile Include="Components\Forms\DirSizeCalculatorPrompt.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Components\Forms\DonationUI.Designer.cs">
<DependentUpon>DonationUI.cs</DependentUpon>
<Compile Include="Components\Forms\DirSizeCalculatorPrompt.Designer.cs">
<DependentUpon>DirSizeCalculatorPrompt.cs</DependentUpon>
</Compile>
<Compile Include="Components\Forms\DropUI.cs">
<SubType>Form</SubType>
@@ -117,15 +134,8 @@
<Compile Include="Components\Forms\DropUI.Designer.cs">
<DependentUpon>DropUI.cs</DependentUpon>
</Compile>
<Compile Include="Components\Licencer.cs" />
<Compile Include="Components\LMZAParser.cs" />
<Compile Include="Components\MessageHandler.cs" />
<Compile Include="Components\Forms\NewRegKeyUI.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Components\Forms\NewRegKeyUI.Designer.cs">
<DependentUpon>NewRegKeyUI.cs</DependentUpon>
</Compile>
<Compile Include="Components\Forms\WorkerUI.cs">
<SubType>Form</SubType>
</Compile>
@@ -147,15 +157,12 @@
<EmbeddedResource Include="Components\Forms\ChangeLog.resx">
<DependentUpon>ChangeLog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Components\Forms\DonationUI.resx">
<DependentUpon>DonationUI.cs</DependentUpon>
<EmbeddedResource Include="Components\Forms\DirSizeCalculatorPrompt.resx">
<DependentUpon>DirSizeCalculatorPrompt.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Components\Forms\DropUI.resx">
<DependentUpon>DropUI.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Components\Forms\NewRegKeyUI.resx">
<DependentUpon>NewRegKeyUI.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Components\Forms\WorkerUI.resx">
<DependentUpon>WorkerUI.cs</DependentUpon>
</EmbeddedResource>
@@ -175,7 +182,8 @@
<None Include="app.manifest">
<SubType>Designer</SubType>
</None>
<None Include="MicronSync_TemporaryKey.pfx" />
<None Include="ILMerge.props" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
@@ -185,11 +193,12 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<None Include="ReboundSoftware.pfx" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Components\Forms\ChangeLog.txt" />
<Content Include="ILMergeOrder.txt" />
<Content Include="MicronSync.ico" />
<None Include="SKGL.dll" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.5.2">
@@ -203,6 +212,14 @@
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<FileAssociation Include=".mini">
<Visible>False</Visible>
<Description>MicronSync configuration file</Description>
<Progid>MINI</Progid>
<DefaultIcon>MicronSync.ico</DefaultIcon>
</FileAssociation>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>
@@ -212,6 +229,14 @@
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('packages\MSBuild.ILMerge.Task.1.0.5\build\MSBuild.ILMerge.Task.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\MSBuild.ILMerge.Task.1.0.5\build\MSBuild.ILMerge.Task.props'))" />
<Error Condition="!Exists('packages\MSBuild.ILMerge.Task.1.0.5\build\MSBuild.ILMerge.Task.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\MSBuild.ILMerge.Task.1.0.5\build\MSBuild.ILMerge.Task.targets'))" />
</Target>
<Import Project="packages\MSBuild.ILMerge.Task.1.0.5\build\MSBuild.ILMerge.Task.targets" Condition="Exists('packages\MSBuild.ILMerge.Task.1.0.5\build\MSBuild.ILMerge.Task.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
+22
View File
@@ -0,0 +1,22 @@
<?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>
<StartWorkingDirectory>
</StartWorkingDirectory>
</PropertyGroup>
<PropertyGroup>
<PublishUrlHistory>publish\</PublishUrlHistory>
<InstallUrlHistory />
<SupportUrlHistory />
<UpdateUrlHistory />
<BootstrapperUrlHistory />
<ErrorReportUrlHistory>http://www.reboundsoftware.weebly.com/</ErrorReportUrlHistory>
<FallbackCulture>en-US</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
</PropertyGroup>
<PropertyGroup>
<EnableSecurityDebugging>false</EnableSecurityDebugging>
</PropertyGroup>
</Project>
+22
View File
@@ -0,0 +1,22 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MicronSync", "MicronSync.csproj", "{85713D72-FF1F-47BC-B034-FB20ADF4A84A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{85713D72-FF1F-47BC-B034-FB20ADF4A84A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{85713D72-FF1F-47BC-B034-FB20ADF4A84A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{85713D72-FF1F-47BC-B034-FB20ADF4A84A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{85713D72-FF1F-47BC-B034-FB20ADF4A84A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
+4 -4
View File
@@ -7,11 +7,11 @@ using System.Runtime.InteropServices;
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("MicronSync")]
[assembly: AssemblyDescription("MicronSync is free software and can be used both for personal and business use free of charge. Donations are entirely optional and do not extend or enhance MicronSync's functionality in any way.This software also uses 7-Zip as a backend, let the developers know how good their compression technology is!")]
[assembly: AssemblyDescription("MicronSync is free software and can be used both for personal and business use free of charge. MicronSync is no longer donation-ware, it's 100% freeware forever! This software is made possible by 7-Zip as uses its compression engine as a backend, thanks to the 7-Zip team for their amazing compression technology!")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Rebound Software")]
[assembly: AssemblyProduct("MicronSync")]
[assembly: AssemblyCopyright("Fil Sapia - Rebound Software (2016)")]
[assembly: AssemblyCopyright("Fil Sapia - Rebound Software (2017)")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -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.3.0.3")]
[assembly: AssemblyFileVersion("1.3.0.3")]
[assembly: NeutralResourcesLanguage("en-GB")]
Binary file not shown.
Binary file not shown.
+78
View File
@@ -0,0 +1,78 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace MicronSync {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
[global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool UseDarkTheme {
get {
return ((bool)(this["UseDarkTheme"]));
}
set {
this["UseDarkTheme"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
[global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public string UserLicenseKey {
get {
return ((string)(this["UserLicenseKey"]));
}
set {
this["UserLicenseKey"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
[global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public string UserMAC {
get {
return ((string)(this["UserMAC"]));
}
set {
this["UserMAC"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
[global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public string UserName {
get {
return ((string)(this["UserName"]));
}
set {
this["UserName"] = value;
}
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2">
<assemblyIdentity name="MicronSync.application" version="1.3.0.2" publicKeyToken="0000000000000000" language="en" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" />
<description asmv2:publisher="Rebound Software" asmv2:product="MicronSync" co.v1:errorReportUrl="http://www.reboundsoftware.weebly.com/" xmlns="urn:schemas-microsoft-com:asm.v1" />
<deployment install="true" mapFileExtensions="true" />
<compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
<framework targetVersion="4.5.2" profile="Full" supportedRuntime="4.0.30319" />
</compatibleFrameworks>
<dependency>
<dependentAssembly dependencyType="install" codebase="MicronSync.exe.manifest" size="5720">
<assemblyIdentity name="MicronSync.exe" version="1.3.0.2" publicKeyToken="0000000000000000" language="en" processorArchitecture="msil" type="win32" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>Q/Vdf6BlX1qLLXReerFdcqcz5KzBSWmfOhR3KtaPzZs=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
</asmv1:assembly>
Binary file not shown.
+15 -3
View File
@@ -1,6 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="MicronSync.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<userSettings>
<MicronSync.Settings>
<setting name="UseDarkTheme" serializeAs="String">
<value>False</value>
</setting>
<setting name="UserLicenseKey" serializeAs="String">
<value />
</setting>
</MicronSync.Settings>
</userSettings>
</configuration>
@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2">
<asmv1:assemblyIdentity name="MicronSync.exe" version="1.3.0.2" publicKeyToken="0000000000000000" language="en" processorArchitecture="msil" type="win32" />
<description asmv2:iconFile="MicronSync.ico" asmv2:publisher="Rebound Software" asmv2:product="MicronSync" co.v1:errorReportUrl="http://www.reboundsoftware.weebly.com/" xmlns="urn:schemas-microsoft-com:asm.v1" />
<application />
<entryPoint>
<assemblyIdentity name="MicronSync" version="1.3.0.2" language="neutral" processorArchitecture="msil" />
<commandLine file="MicronSync.exe" parameters="" />
</entryPoint>
<co.v1:useManifestForTrust xmlns="urn:schemas-microsoft-com:asm.v1" />
<trustInfo>
<security>
<applicationRequestMinimum>
<PermissionSet version="1" class="System.Security.NamedPermissionSet" Name="LocalIntranet" Description="Default rights given to applications on the local intranet" Unrestricted="true" ID="Custom" SameSite="site" />
<defaultAssemblyRequest permissionSetReference="Custom" />
</applicationRequestMinimum>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
Specifying requestedExecutionLevel element will disable file and registry virtualization.
Remove this element if your application requires this virtualization for backwards
compatibility.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentOS>
<osVersionInfo>
<os majorVersion="5" minorVersion="1" buildNumber="2600" servicePackMajor="0" />
</osVersionInfo>
</dependentOS>
</dependency>
<dependency>
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="Microsoft.Windows.CommonLanguageRuntime" version="4.0.30319.0" />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="INIFileParser.dll" size="29696">
<assemblyIdentity name="INIFileParser" version="2.3.0.0" publicKeyToken="79AF7B307B65CF3C" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>c5RGV5B9DNSW0e7e35uHbkb3KxB1AZxfnhn+P3fhDFo=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="MicronSync.exe" size="1205232">
<assemblyIdentity name="MicronSync" version="1.3.0.2" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>b1GyfaFEogEi833KfF4w8k9/EPp2UMb2OCw+Wx7ulHY=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
<file name="MicronSync.ico" size="370070">
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>qddQtUOBiHjs67DBK/A2MSUuzBSEjQoCz3w1rrrZJaw=</dsig:DigestValue>
</hash>
</file>
<fileAssociation extension=".mini" description="MicronSync configuration file" progid="MINI" defaultIcon="MicronSync.ico" xmlns="urn:schemas-microsoft-com:clickonce.v1" />
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of the Windows versions that this application has been tested on and is
is designed to work with. Uncomment the appropriate elements and Windows will
automatically selected the most compatible environment. -->
<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
<!-- Windows 7 -->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
<!-- Windows 8 -->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
<!-- Windows 8.1 -->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
<!-- Windows 10 -->
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
</application>
</compatibility>
</asmv1:assembly>
Binary file not shown.
@@ -1,6 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="MicronSync.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<userSettings>
<MicronSync.Settings>
<setting name="UseDarkTheme" serializeAs="String">
<value>False</value>
</setting>
<setting name="UserLicenseKey" serializeAs="String">
<value />
</setting>
</MicronSync.Settings>
</userSettings>
</configuration>
+5
View File
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ILMerge" version="2.14.1208" targetFramework="net452" />
<package id="MSBuild.ILMerge.Task" version="1.0.5" targetFramework="net452" />
</packages>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2013 Alexander Nosenko
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- try to import project-specific settings; also use fixed name that was injected into project by NuGet -->
<PropertyGroup>
<!-- at this point only MSBuild* property are available -->
<MSBuildIlMerge1>$(MSBuildProjectDirectory)\$(MSBuildProjectName).ILMerge.props</MSBuildIlMerge1>
<MSBuildIlMerge2>$(MSBuildProjectDirectory)\ILMerge.props</MSBuildIlMerge2>
</PropertyGroup>
<Import Project="$(MSBuildIlMerge1)" Condition="Exists($(MSBuildIlMerge1))"/>
<Import Project="$(MSBuildIlMerge2)" Condition="Exists($(MSBuildIlMerge2))"/>
</Project>
@@ -0,0 +1,115 @@
<?xml version="1.0" encoding="utf-8" ?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- give project-specific settings reasonable defaults -->
<ILMergePackagesPath Condition=" $(ILMergePackagePath) == '' ">$(SolutionDir)packages</ILMergePackagesPath>
<ILMergeOrderFile Condition=" $(ILMergeOrderFile) == '' ">$(MSBuildProjectDir)ILMergeOrder.txt</ILMergeOrderFile>
<ILMergeKeyFile Condition=" $(ILMergeKeyFile) == '' ">$(AssemblyOriginatorKeyFile)</ILMergeKeyFile>
<ILMergeAssemblyVersion Condition=" $(ILMergeAssemblyVersion) == '' "></ILMergeAssemblyVersion>
<ILMergeAllowDuplicateType Condition=" $(ILMergeAllowDuplicateType) == '' "></ILMergeAllowDuplicateType>
<ILMergeAllowMultipleAssemblyLevelAttributes Condition=" $(ILMergeAllowMultipleAssemblyLevelAttributes) == '' ">false</ILMergeAllowMultipleAssemblyLevelAttributes>
<ILMergeAllowZeroPeKind Condition=" $(ILMergeAllowZeroPeKind) == '' ">false</ILMergeAllowZeroPeKind>
<ILMergeCopyAttributes Condition=" $(ILMergeCopyAttributes) == '' ">false</ILMergeCopyAttributes>
<ILMergeDebugInfo Condition=" $(ILMergeDebugInfo) == '' ">true</ILMergeDebugInfo>
<ILMergeDelaySign Condition=" $(ILMergeDelaySign) == '' ">false</ILMergeDelaySign>
<ILMergeFileAlignment Condition=" $(ILMergeFileAlignment) == '' ">512</ILMergeFileAlignment>
<ILMergeInternalize Condition=" $(ILMergeInternalize) == '' ">false</ILMergeInternalize>
<ILMergeInternalizeExcludeFile Condition=" $(ILMergeInternalizeExcludeFile) == '' "></ILMergeInternalizeExcludeFile>
<ILMergeXmlDocumentation Condition=" $(ILMergeXmlDocumentation) == '' ">false</ILMergeXmlDocumentation>
<ILMergePublicKeyTokens Condition=" $(ILMergePublicKeyTokens) == '' ">true</ILMergePublicKeyTokens>
<ILMergeShouldLog Condition=" $(ILMergeShouldLog) == '' ">true</ILMergeShouldLog>
<!--<ILMergeTargetKind Condition=" $(ILMergeTargetKind) == '' "></ILMergeTargetKind>-->
<ILMergeUnionMerge Condition=" $(ILMergeUnionMerge) == '' ">false</ILMergeUnionMerge>
<ILTargetPlatform Condition=" $(ILTargetPlatform) == '' ">40</ILTargetPlatform>
<!--<ILMergeVersion Condition=" $(ILMergeVersion) == '' "></ILMergeVersion>-->
<ILMergeToolsPath>$(MSBuildThisFileDirectory)..\tools\</ILMergeToolsPath>
</PropertyGroup>
<!-- decide what goes into output after compile-->
<Target Name="SaveILMergeData" AfterTargets="CoreCompile">
<Message Text="Transitive merge" Importance="high" Condition="$(ILMergeTransitive) == 'true'" />
<!-- all copy local assemblies referenced from this project that go to the executable except the main one-->
<CreateItem Include="@(ReferencePath)" Condition=" '%(CopyLocal)' == 'true' ">
<Output TaskParameter="Include" ItemName="MergedAssemblies"/>
</CreateItem>
<!-- all copy local dependency assemblies-->
<CreateItem Include="@(ReferenceDependencyPaths)" Condition=" '%(CopyLocal)' == 'true' ">
<Output TaskParameter="Include" ItemName="MergedDependencies"/>
</CreateItem>
<!-- all assemblies that doesn't so we use their directories as library path -->
<CreateItem Include="@(ReferencePath)" Condition=" '%(CopyLocal)' == 'false' ">
<Output TaskParameter="Include" ItemName="UnmergedAssemblies"/>
</CreateItem>
<!-- all content items marked as copy always or newest -->
<CreateItem Include="@(Content)" Condition=" '%(Content.CopyToOutputDirectory)' == 'Always' OR '%(Content.CopyToOutputDirectory)' == 'PreserveNewest' ">
<Output TaskParameter="Include" ItemName="LocalContentFiles"/>
</CreateItem>
<!-- add the main assembly as the first one -->
<PropertyGroup Condition=" $(ILMergeTransitive) == 'true' ">
<MergedAssemblies>@(IntermediateAssembly->'%(FullPath)');@(MergedAssemblies->'%(FullPath)');@(MergedDependencies->'%(FullPath)')</MergedAssemblies>
</PropertyGroup>
<PropertyGroup Condition=" $(ILMergeTransitive) == 'false' OR $(ILMergeTransitive) == '' ">
<MergedAssemblies>@(IntermediateAssembly->'%(FullPath)');@(MergedAssemblies->'%(FullPath)')</MergedAssemblies>
</PropertyGroup>
<PropertyGroup>
<!-- Ideally we should copy all not-copy-local assemblies that are not in the ILMergeLibraryPath to -->
<!-- a temp directory and add it to the start search path, but we keep it simple here -->
<UnmergedAssemblies>@(UnmergedAssemblies->'%(FullPath)')</UnmergedAssemblies>
<MergeOutputFile>$(TargetPath)</MergeOutputFile>
</PropertyGroup>
</Target>
<!-- do not copy copy-local assemblies, they will be merged -->
<Target Name="_CopyFilesMarkedCopyLocal" />
<!-- override standard target our own merge-and-copy-content -->
<Target Name="CopyFilesToOutputDirectory">
<Message Text="Merged assemblies: $(MergedAssemblies)" Importance="high" />
<Message Text="Not merged assemblies: $(UnmergedAssemblies)" Importance="normal" />
<Message Text="Merged Output in: $(MergeOutputFile)" Importance="normal" />
<Message Text="Key file: $(ILMergeKeyFile)" Importance="normal" />
<Message Text="Libraries in: $(ILMergeLibraryPath)" Importance="normal" />
<Message Text="Packages in: $(ILMergePackagesPath)" Importance="normal" />
<Message Text="Merge order file: $(ILMergeOrderFile)" Importance="normal" />
<Message Text="Internalization enabled: $(ILMergeInternalize)" Importance="normal" />
<Message Text="Local content: @(LocalContentFiles)" Importance="low" />
<!-- run ILMerge -->
<!-- not supported: AllowWildCards, Closed (use $Transitive instead), TargetKind (default), -->
<MSBuild.ILMerge.Task
KeyFile="$(ILMergeKeyFile)"
OutputFile="$(MergeOutputFile)"
LibraryPath="$(ILMergeLibraryPath)"
InputAssemblies="$(MergedAssemblies)"
LibraryAssemblies="$(UnmergedAssemblies)"
PackagesDir="$(ILMergePackagesPath)"
MergeOrderFile="$(ILMergeOrderFile)"
AllowDuplicateType="$(ILMergeAllowDuplicateType)"
AllowMultipleAssemblyLevelAttributes="$(ILMergeAllowMultipleAssemblyLevelAttributes)"
AllowZeroPeKind="$(ILMergeAllowZeroPeKind)"
CopyAttributes="$(ILMergeCopyAttributes)"
DebugInfo="$(ILMergeDebugInfo)"
DelaySign="$(ILMergeDelaySign)"
FileAlignment="$(ILMergeFileAlignment)"
Internalize="$(ILMergeInternalize)"
InternalizeExcludeFile ="$(ILMergeInternalizeExcludeFile)"
XmlDocumentation="$(ILMergeXmlDocumentation)"
PublicKeyTokens="$(ILMergePublicKeyTokens)"
ShouldLog="$(ILMergeShouldLog)"
TargetPlatform="$(ILTargetPlatform)"
UnionMerge="$(ILUnionMerge)" />
<!-- copy content files marked as copy always or newest -->
<Copy SourceFiles="@(LocalContentFiles)" DestinationFolder="$(OutputPath)" />
<!-- copy config file (???) -->
<CallTarget Targets="_CopyAppConfigFile" Condition="'%(IntermediateAssembly.Extension)' == '.exe'"/>
</Target>
<UsingTask AssemblyFile="$(ILMergeToolsPath)MSBuild.ILMerge.Task.dll" TaskName="MSBuild.ILMerge.Task" />
</Project>
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8" ?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- -->
<!-- ILMerge project-specific settings. Almost never need to be set explicitly. -->
<!-- for details, see http://research.microsoft.com/en-us/people/mbarnett/ilmerge.aspx -->
<!-- -->
<!-- *** set this file to Type=None, CopyToOutput=Never *** -->
<!-- If True, all copy local dependencies will also be merged from referenced projects whether they are referenced in the current project explicitly or not -->
<ILMergeTransitive>true</ILMergeTransitive>
<!-- Extra ILMerge library paths (semicolon-separated). Dont put your package dependencies here, they will be added automagically -->
<ILMergeLibraryPath></ILMergeLibraryPath>
<!-- The solution NuGet package directory if not standard 'SOLUTION\packages' -->
<ILMergePackagesPath></ILMergePackagesPath>
<!-- The merge order file name if differs from standard 'ILMergeOrder.txt' -->
<ILMergeOrderFile></ILMergeOrderFile>
<!-- The strong key file name if not specified in the project -->
<ILMergeKeyFile></ILMergeKeyFile>
<!-- The assembly version if differs for the version of the main assembly -->
<ILMergeAssemblyVersion></ILMergeAssemblyVersion>
<!-- added in Version 1.0.4 -->
<ILMergeFileAlignment></ILMergeFileAlignment>
<!-- added in Version 1.0.4, default=none -->
<ILMergeAllowDuplicateType></ILMergeAllowDuplicateType>
<!-- If the <see cref="CopyAttributes"/> is also set, any assembly-level attributes names that have the same type are copied over into the target assembly -->
<ILMergeAllowMultipleAssemblyLevelAttributes></ILMergeAllowMultipleAssemblyLevelAttributes>
<!-- See ILMerge documentation -->
<ILMergeAllowZeroPeKind></ILMergeAllowZeroPeKind>
<!-- The assembly level attributes of each input assembly are copied over into the target assembly -->
<ILMergeCopyAttributes></ILMergeCopyAttributes>
<!-- Creates a .pdb file for the output assembly and merges into it any .pdb files found for input assemblies, default=true -->
<ILMergeDebugInfo></ILMergeDebugInfo>
<!-- Target assembly will be delay signed -->
<ILMergeDelaySign></ILMergeDelaySign>
<!-- Types in assemblies other than the primary assembly have their visibility modified -->
<ILMergeInternalize></ILMergeInternalize>
<!-- The path name of the file that will be used to identify types that are not to have their visibility modified -->
<ILMergeInternalizeExcludeFile></ILMergeInternalizeExcludeFile>
<!-- XML documentation files are merged to produce an XML documentation file for the target assembly -->
<ILMergeXmlDocumentation></ILMergeXmlDocumentation>
<!-- External assembly references in the manifest of the target assembly will use full public keys (false) or public key tokens (true, default value) -->
<ILMergePublicKeyTokens></ILMergePublicKeyTokens>
<!-- Types with the same name are all merged into a single type in the target assembly -->
<ILMergeUnionMerge></ILMergeUnionMerge>
<!-- The version of the target framework, default 40 (works for 45 too) -->
<ILTargetPlatform></ILTargetPlatform>
</PropertyGroup>
</Project>
@@ -0,0 +1,4 @@
# this file contains the partial list of the merged assemblies in the merge order
# you can fill it from the obj\CONFIG\PROJECT.ilmerge generated on every build
# and finetune merge order to your satisfaction
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff