4 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
7e7fe3881e Imported MicronSync v1.1.0.1 2019-03-05 21:28:44 +00:00
62 changed files with 5737 additions and 1619 deletions
+146 -55
View File
@@ -1,5 +1,6 @@
using System;
using System.IO;
using System.Text.RegularExpressions;
namespace MicronSync
{
@@ -8,28 +9,10 @@ namespace MicronSync
/// </summary>
public class CommonIO : IDisposable
{
/// <summary>
/// Browse to existing folder on the system.
/// </summary>
/// <param name="originalPath"></param>
/// <returns></returns>
public string BrowseFolder(string originalPath)
{
// The result of the Windows Forms dialog is passed as a
// string to the method caller.
var folder = new System.Windows.Forms.FolderBrowserDialog();
System.Windows.Forms.DialogResult result = folder.ShowDialog();
// Only change the value if a valid path is entered.
string newPath;
if (folder.SelectedPath != "") { newPath = folder.SelectedPath.ToString(); }
else { newPath = originalPath; }
return newPath;
}
public enum FileType { sz, ini }
#region Filesystem
public string SaveFile(string originalPath, FileType f)
{
var file = new System.Windows.Forms.SaveFileDialog();
@@ -41,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;
@@ -70,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;
@@ -88,22 +70,45 @@ namespace MicronSync
return newPath;
}
/// <summary>
/// Browse to existing folder on the system.
/// </summary>
/// <param name="originalPath"></param>
/// <returns></returns>
public string BrowseFolder(string originalPath)
{
// The result of the Windows Forms dialog is passed as a
// string to the method caller.
var folder = new System.Windows.Forms.FolderBrowserDialog();
System.Windows.Forms.DialogResult result = folder.ShowDialog();
// Only change the value if a valid path is entered.
string newPath;
if (folder.SelectedPath != "") { newPath = folder.SelectedPath.ToString(); }
else { newPath = originalPath; }
return newPath;
}
public double CalculateFileSizeMB (string file)
{
FileInfo fi = new FileInfo(file);
return ConvertBytesToMB(fi.Length);
}
#endregion
#region String manipulation
public string CalculateDirectoryModifyDate (string dir)
{
string result = null;
try
{
if (Directory.Exists(dir))
result = string.Format("{0} - {1}",
Directory.GetLastWriteTime(dir).ToShortDateString(),
Directory.GetLastWriteTime(dir).ToLongTimeString());
else
result = "N/A";
}
catch (System.Exception)
{
throw;
}
if (Directory.Exists(dir))
result = string.Format("{0} - {1}",
Directory.GetLastWriteTime(dir).ToShortDateString(),
Directory.GetLastWriteTime(dir).ToLongTimeString());
else
result = "N/A";
return result;
}
@@ -111,23 +116,68 @@ namespace MicronSync
public string CalculateFileModifyDate(string file)
{
string result = null;
try
if (File.Exists(file))
result = string.Format("{0} - {1}",
File.GetLastWriteTime(file).ToShortDateString(),
File.GetLastWriteTime(file).ToLongTimeString());
else
result = "N/A";
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 (File.Exists(file))
result = string.Format("{0} - {1}",
File.GetLastWriteTime(file).ToShortDateString(),
File.GetLastWriteTime(file).ToLongTimeString());
if (input.StartsWith(@"\\"))
result = unc.Value;
else
result = "N/A";
}
catch (System.Exception)
{
throw;
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
public enum endResult
@@ -135,7 +185,8 @@ namespace MicronSync
ClearEntireDirectory_Error,
CopyEntireDirectory_Error,
Default,
FileNotExist,
RenameEntireDirectory_Error,
WriteToDirectory_Error,
}
public endResult ClearEntireDirectory(string dir)
@@ -167,6 +218,23 @@ namespace MicronSync
return _endResult;
}
public endResult RenameEntireDirectory(string dir, string newName)
{
endResult _endResult = endResult.Default;
try
{
Directory.Move(dir, Path.Combine(
Path.GetDirectoryName(dir), newName));
}
catch (Exception)
{
_endResult = endResult.RenameEntireDirectory_Error;
}
return _endResult;
}
public endResult CopyEntireDirectory(string src, string dst)
{
endResult _endResult = endResult.Default;
@@ -187,32 +255,55 @@ namespace MicronSync
// Copy all files to destination.
FileInfo[] files = dir.GetFiles();
foreach (FileInfo file in files)
{
File.Copy(Path.Combine(src, file.Name),
Path.Combine(dst, file.Name));
}
// Repeat for subdirectories.
foreach (DirectoryInfo subDir in dirs)
{
CopyEntireDirectory(subDir.FullName,
Path.Combine(dst, subDir.Name));
}
}
catch (Exception)
{
_endResult = endResult.CopyEntireDirectory_Error;
}
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
public void Dispose()
#region Conversion
public double ConvertBytesToMB(double bytes)
{
GC.Collect();
return Math.Round(bytes / 1024f / 1024f, 2);
}
#endregion
public void Dispose() { GC.Collect(); }
}
}
-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
}
}
@@ -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;
}
}
@@ -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
}
}
@@ -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
+82
View File
@@ -0,0 +1,82 @@
namespace MicronSync.Components
{
partial class ChangeLog
{
/// <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(ChangeLog));
this.richTextBox = new System.Windows.Forms.RichTextBox();
this.labelVersionInfo = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// richTextBox
//
this.richTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.richTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.richTextBox.Location = new System.Drawing.Point(13, 38);
this.richTextBox.Name = "richTextBox";
this.richTextBox.ReadOnly = true;
this.richTextBox.Size = new System.Drawing.Size(679, 360);
this.richTextBox.TabIndex = 0;
this.richTextBox.Text = "";
//
// labelVersionInfo
//
this.labelVersionInfo.AutoSize = true;
this.labelVersionInfo.Location = new System.Drawing.Point(13, 13);
this.labelVersionInfo.Name = "labelVersionInfo";
this.labelVersionInfo.Size = new System.Drawing.Size(45, 13);
this.labelVersionInfo.TabIndex = 1;
this.labelVersionInfo.Text = "Version:";
//
// ChangeLog
//
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(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;
this.Text = "MicronSync - Change Log";
this.Load += new System.EventHandler(this.ChangeLog_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.RichTextBox richTextBox;
private System.Windows.Forms.Label labelVersionInfo;
}
}
+45
View File
@@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
namespace MicronSync.Components
{
public partial class ChangeLog : Form
{
public ChangeLog()
{
InitializeComponent();
}
private void ChangeLog_Load(object sender, System.EventArgs e)
{
var assembly = Assembly.GetExecutingAssembly();
labelVersionInfo.Text = $"MicronSync: {assembly.GetName().Version}";
using (Stream steam = assembly.GetManifestResourceStream("MicronSync.Components.Forms.ChangeLog.txt"))
using (StreamReader sr = new StreamReader(steam, true))
{
List<string> listChangelog = new List<string>();
string currentLine;
while (!string.IsNullOrEmpty(
currentLine = sr.ReadLine()))
{
if (currentLine.Contains(@"//"))
{
currentLine = currentLine.Remove(currentLine.IndexOf(@"//"));
if (!string.IsNullOrEmpty(currentLine))
listChangelog.Add(currentLine);
}
else
listChangelog.Add(currentLine);
}
richTextBox.Text = string.Join(Environment.NewLine, listChangelog);
}
}
}
}
@@ -117,98 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="textInfo.Text" xml:space="preserve">
<value>If you find this tool useful then please consider donating! This application was created during
my spare time, anything you could spare would be much appricated :-)
You can continue using the unregistered version with full functionality; however you will be
prompted every time you launch MicronSync. I will never intend to cripple any functionality
behind a paywall.</value>
</data>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
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
</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAYAEBAAAAAAIABoBAAAZgAAACAgAAAAACAAqBAAAM4EAAAwMAAAAAAgAKglAAB2FQAAQEAAAAAA
+87
View File
@@ -0,0 +1,87 @@
[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]-------------------------------------------------------------------------------
[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.
- Drag and drop interface for 7-Zip archives and directories for more rapid operation.
[Enhancements]
- Automatic save prompt only appears when a change has been made to the configuration since the last save.
- Paths are now validated ahead of attempting job operation.
- User interface adjustments.
- Shortcut keys for file menu!
- Source directory pre-backups are a lot faster due to much more efficient algorithm (depending on settings used).
[Bug Fixes]
- Directories could be confused as files when checking paths are not in one another.
@@ -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
}
}
+227
View File
@@ -0,0 +1,227 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace MicronSync.Components.Forms
{
partial class DropUI
{
/// <summary>
/// Required designer variable.
/// </summary>
private 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.tabControl = new System.Windows.Forms.TabControl();
this.tabProcess = new System.Windows.Forms.TabPage();
this.labelIdentify = new System.Windows.Forms.Label();
this.tabSz = new System.Windows.Forms.TabPage();
this.textReadSz = new System.Windows.Forms.TextBox();
this.btnSzUseBackup = new System.Windows.Forms.Button();
this.btnSzUseRestore = new System.Windows.Forms.Button();
this.labelSz = new System.Windows.Forms.Label();
this.tabDir = new System.Windows.Forms.TabPage();
this.textReadPath = new System.Windows.Forms.TextBox();
this.btnDirRestore = new System.Windows.Forms.Button();
this.btnDirBackup = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.tabControl.SuspendLayout();
this.tabProcess.SuspendLayout();
this.tabSz.SuspendLayout();
this.tabDir.SuspendLayout();
this.SuspendLayout();
//
// tabControl
//
this.tabControl.Controls.Add(this.tabProcess);
this.tabControl.Controls.Add(this.tabSz);
this.tabControl.Controls.Add(this.tabDir);
this.tabControl.Location = new System.Drawing.Point(13, 13);
this.tabControl.Name = "tabControl";
this.tabControl.SelectedIndex = 0;
this.tabControl.Size = new System.Drawing.Size(474, 166);
this.tabControl.TabIndex = 0;
//
// tabProcess
//
this.tabProcess.Controls.Add(this.labelIdentify);
this.tabProcess.Location = new System.Drawing.Point(4, 22);
this.tabProcess.Name = "tabProcess";
this.tabProcess.Padding = new System.Windows.Forms.Padding(3);
this.tabProcess.Size = new System.Drawing.Size(466, 140);
this.tabProcess.TabIndex = 0;
this.tabProcess.Text = "Identification";
this.tabProcess.UseVisualStyleBackColor = true;
//
// labelIdentify
//
this.labelIdentify.AutoSize = true;
this.labelIdentify.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelIdentify.Location = new System.Drawing.Point(50, 56);
this.labelIdentify.Name = "labelIdentify";
this.labelIdentify.Size = new System.Drawing.Size(354, 31);
this.labelIdentify.TabIndex = 0;
this.labelIdentify.Text = "Identifying dropped item...";
//
// tabSz
//
this.tabSz.Controls.Add(this.textReadSz);
this.tabSz.Controls.Add(this.btnSzUseBackup);
this.tabSz.Controls.Add(this.btnSzUseRestore);
this.tabSz.Controls.Add(this.labelSz);
this.tabSz.Location = new System.Drawing.Point(4, 22);
this.tabSz.Name = "tabSz";
this.tabSz.Padding = new System.Windows.Forms.Padding(3);
this.tabSz.Size = new System.Drawing.Size(466, 140);
this.tabSz.TabIndex = 1;
this.tabSz.Text = "7-Zip File";
this.tabSz.UseVisualStyleBackColor = true;
//
// textReadSz
//
this.textReadSz.Location = new System.Drawing.Point(80, 60);
this.textReadSz.Name = "textReadSz";
this.textReadSz.ReadOnly = true;
this.textReadSz.Size = new System.Drawing.Size(307, 20);
this.textReadSz.TabIndex = 3;
//
// btnSzUseBackup
//
this.btnSzUseBackup.Location = new System.Drawing.Point(225, 90);
this.btnSzUseBackup.Name = "btnSzUseBackup";
this.btnSzUseBackup.Size = new System.Drawing.Size(162, 23);
this.btnSzUseBackup.TabIndex = 2;
this.btnSzUseBackup.Text = "Replace file with backup";
this.btnSzUseBackup.UseVisualStyleBackColor = true;
this.btnSzUseBackup.Click += new System.EventHandler(this.btnSzUseBackup_Click);
//
// btnSzUseRestore
//
this.btnSzUseRestore.Location = new System.Drawing.Point(80, 90);
this.btnSzUseRestore.Name = "btnSzUseRestore";
this.btnSzUseRestore.Size = new System.Drawing.Size(139, 23);
this.btnSzUseRestore.TabIndex = 1;
this.btnSzUseRestore.Text = "Restore from backup file";
this.btnSzUseRestore.UseVisualStyleBackColor = true;
this.btnSzUseRestore.Click += new System.EventHandler(this.btnSzUseRestore_Click);
//
// labelSz
//
this.labelSz.AutoSize = true;
this.labelSz.Location = new System.Drawing.Point(115, 30);
this.labelSz.Name = "labelSz";
this.labelSz.Size = new System.Drawing.Size(233, 13);
this.labelSz.TabIndex = 0;
this.labelSz.Text = "Please choose what to do with the following file:";
//
// tabDir
//
this.tabDir.Controls.Add(this.textReadPath);
this.tabDir.Controls.Add(this.btnDirRestore);
this.tabDir.Controls.Add(this.btnDirBackup);
this.tabDir.Controls.Add(this.label1);
this.tabDir.Location = new System.Drawing.Point(4, 22);
this.tabDir.Name = "tabDir";
this.tabDir.Padding = new System.Windows.Forms.Padding(3);
this.tabDir.Size = new System.Drawing.Size(466, 140);
this.tabDir.TabIndex = 2;
this.tabDir.Text = "Directory";
this.tabDir.UseVisualStyleBackColor = true;
//
// textReadPath
//
this.textReadPath.Location = new System.Drawing.Point(80, 60);
this.textReadPath.Name = "textReadPath";
this.textReadPath.ReadOnly = true;
this.textReadPath.Size = new System.Drawing.Size(307, 20);
this.textReadPath.TabIndex = 6;
//
// btnDirRestore
//
this.btnDirRestore.Location = new System.Drawing.Point(225, 90);
this.btnDirRestore.Name = "btnDirRestore";
this.btnDirRestore.Size = new System.Drawing.Size(162, 23);
this.btnDirRestore.TabIndex = 5;
this.btnDirRestore.Text = "Restore to path";
this.btnDirRestore.UseVisualStyleBackColor = true;
this.btnDirRestore.Click += new System.EventHandler(this.btnDirRestore_Click);
//
// btnDirBackup
//
this.btnDirBackup.Location = new System.Drawing.Point(80, 90);
this.btnDirBackup.Name = "btnDirBackup";
this.btnDirBackup.Size = new System.Drawing.Size(139, 23);
this.btnDirBackup.TabIndex = 4;
this.btnDirBackup.Text = "Backup this path";
this.btnDirBackup.UseVisualStyleBackColor = true;
this.btnDirBackup.Click += new System.EventHandler(this.btnDirBackup_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(115, 30);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(241, 13);
this.label1.TabIndex = 3;
this.label1.Text = "Please choose what to do with the following path:";
//
// DropUI
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(499, 191);
this.Controls.Add(this.tabControl);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "DropUI";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "MicronSync - Dropped item";
this.Shown += new System.EventHandler(this.DropUI_Shown);
this.tabControl.ResumeLayout(false);
this.tabProcess.ResumeLayout(false);
this.tabProcess.PerformLayout();
this.tabSz.ResumeLayout(false);
this.tabSz.PerformLayout();
this.tabDir.ResumeLayout(false);
this.tabDir.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private TabControl tabControl;
private TabPage tabProcess;
private Label labelIdentify;
private TabPage tabSz;
private TabPage tabDir;
private Button btnSzUseBackup;
private Button btnSzUseRestore;
private Label labelSz;
private Button btnDirRestore;
private Button btnDirBackup;
private Label label1;
private TextBox textReadSz;
private TextBox textReadPath;
}
}
+91
View File
@@ -0,0 +1,91 @@
using System;
using System.Diagnostics;
using System.IO;
using System.Threading;
using System.Windows.Forms;
namespace MicronSync.Components.Forms
{
public partial class DropUI : Form
{
public static string dropData { get; set; }
public DropAction DropResult = DropAction.Cancelled; // Default behaviour
public enum DropAction
{
SzUseRestore,
SzUseBackup,
DirUseBackup,
DirUseRestore,
LoadConfig,
UnsupportedData,
Cancelled
}
public DropUI() { InitializeComponent(); }
private void DropUI_Shown(object sender, EventArgs e)
{
BringToFront();
// Idenfify dropped data
FileAttributes attr = File.GetAttributes(DropUI.dropData);
if (dropData.EndsWith(".ini") || dropData.EndsWith(".mini"))
{
DropResult = DropAction.LoadConfig;
Close();
}
else if (dropData.EndsWith(".7z"))
LoadSzHandler();
else if (attr == FileAttributes.Directory)
LoadDirHandler();
else
{
DropResult = DropAction.UnsupportedData;
MessageHandler.errorMessage(MessageHandler.errCodes.MainWindow_BadConfigFile, null);
Close();
}
}
private void LoadDirHandler()
{
textReadPath.Text = dropData;
tabControl.TabPages.Remove(tabProcess);
tabControl.TabPages.Remove(tabSz);
}
private void LoadSzHandler()
{
textReadSz.Text = dropData;
tabControl.TabPages.Remove(tabProcess);
tabControl.TabPages.Remove(tabDir);
}
#region Form UI
private void btnDirBackup_Click(object sender, EventArgs e)
{
DropResult = DropAction.DirUseBackup;
Close();
}
private void btnDirRestore_Click(object sender, EventArgs e)
{
DropResult = DropAction.DirUseRestore;
Close();
}
private void btnSzUseRestore_Click(object sender, EventArgs e)
{
DropResult = DropAction.SzUseRestore;
Close();
}
private void btnSzUseBackup_Click(object sender, EventArgs e)
{
DropResult = DropAction.SzUseBackup;
Close();
}
#endregion
}
}
@@ -61,6 +61,7 @@
this.Controls.Add(this.labelProcessing);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "WorkerUI";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "MicronSync";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.WorkerUI_FormClosing);
this.Load += new System.EventHandler(this.WorkerUI_Load);
@@ -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);
}
@@ -59,45 +57,56 @@ namespace MicronSync.Components
private void LmzaRestore_DoWork(object sender, DoWorkEventArgs e)
{
// Only continue if file exists!
bool fileExists = false;
if (File.Exists(_ManageConfig_RO.RestoreSource))
fileExists = true;
else
_endResultCIO = CommonIO.endResult.FileNotExist;
// Only continue if above is true.
if (fileExists)
// Process params.
using (CommonIO cio = new CommonIO())
{
// Process params.
using (CommonIO cio = new CommonIO())
var restoreBackupDir = _userConfig.RestoreDestination + ".Backup";
// Clear out old backup directory if it exists.
if (_userConfig.OverwriteBackup && Directory.Exists(restoreBackupDir))
{
if (_ManageConfig_RO.EnableBackup)
{
_endResultCIO = cio.CopyEntireDirectory(_ManageConfig_RO.RestoreDestination,
_ManageConfig_RO.RestoreDestination + ".Backup");
}
if (_ManageConfig_RO.EnablePurge)
_endResultCIO = cio.ClearEntireDirectory(_ManageConfig_RO.RestoreDestination);
Directory.Delete(restoreBackupDir, true);
Thread.Sleep(500); // Delay needed for reliability!
}
if (_endResultCIO == CommonIO.endResult.Default)
_endResultLMZA = lmzaParser.ExtractPackage(
Path.GetFileName(_ManageConfig_RO.RestoreSource),
Path.GetDirectoryName(_ManageConfig_RO.RestoreSource),
_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(_userConfig.RestoreSource),
Path.GetDirectoryName(_userConfig.RestoreSource),
_userConfig.RestoreDestination,
"");
}
#endregion
#region Form Functionality
private bool canClose = false;
private bool canClose;
private void WorkerUI_Load(object sender, EventArgs e)
{
// Start stopwatch.
stopWatch.Start();
switch (SetWorkerMode)
{
case WorkerMode.Backup:
@@ -120,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
+120
View File
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
-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);
}
}
}
+40 -15
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,12 +26,17 @@ namespace MicronSync
MainWindow_DstWithinSrc,
MainWindow_RestoreError,
MainWindow_BackupError,
Config_WriteError,
Config_ReadError,
MainWindow_ArchiveNotFound,
NewRegKeyUI_InvalidKey,
NewRegKeyUI_PirateKey,
MainWindow_BadConfigFile,
MainWindow_BadConfigFile_FromEXE,
MainWindow_DirectoryNotFound,
Config_BadFile,
MainWindow_BadExplorePath,
MainWindow_EmptyExplorePath,
MainWindow_SZNotInstalled,
}
/// <summary>
@@ -47,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);
@@ -68,7 +69,7 @@ namespace MicronSync
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
break;
case errCodes.MainWindow_DstWithinSrc:
MessageBox.Show($"Your destination and source paths cannot be within one-another. Please enter valid paths and try again.", "MicronSync",
MessageBox.Show($"You cannot create a backup inside of the folder you're tying to backup. Please enter a valid path and try again.", "MicronSync",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
break;
case errCodes.MainWindow_RestoreError:
@@ -79,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);
@@ -91,18 +88,42 @@ namespace MicronSync
MessageBox.Show($"The backup file specified does not exist.", "MicronSync",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
break;
case errCodes.MainWindow_DirectoryNotFound:
MessageBox.Show($"The backup directory specified does not exist.", "MicronSync",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
break;
case errCodes.NewRegKeyUI_InvalidKey:
MessageBox.Show($"The key you have entered is invalid. Please ensure you have typed it in the correct format.", "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:
MessageBox.Show($"Unable to load configuration, unsupported file.", "MicronSync",
MessageBox.Show($"Unsupported data.\nPlease only drop configs, directories or 7-Zip files!", "MicronSync",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
break;
case errCodes.MainWindow_BadConfigFile_FromEXE:
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;
}
}
@@ -136,8 +157,12 @@ namespace MicronSync
MessageBoxButtons.OK, MessageBoxIcon.Information);
break;
case msgCodes.MainWindow_SaveChanges:
_dialogResult = MessageBox.Show($"Save changes to file 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;
-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;
}
}
}
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
+645 -193
View File
File diff suppressed because it is too large Load Diff
+828 -246
View File
File diff suppressed because it is too large Load Diff
+392 -92
View File
@@ -1,121 +1,421 @@
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>
public class Values
[Obfuscation(Exclude = true, ApplyToMembers = true)]
internal class UserConfigValues : INotifyPropertyChanged
{
[SaveToConfig]
public Version MSVersion
{
get
{
return Assembly.GetExecutingAssembly().GetName().Version;
}
}
[SaveToConfig]
public string Description { get; set; }
[SaveToConfig]
public string BackupSource { get; set; }
[SaveToConfig]
public string BackupDestination { get; set; }
[SaveToConfig]
public string RestoreSource { get; set; }
[SaveToConfig]
public string RestoreDestination { get; set; }
[SaveToConfig]
public bool EnablePurge { get; set; }
[SaveToConfig]
public bool EnableBackup { get; set; }
[SaveToConfig]
public int CompressionLevel { get; set; } = 4;
public string openFile { get; set; }
/// <summary>
/// Flags value to be included in configuration.
/// </summary>
internal class SaveToConfigAttribute : Attribute{}
}
internal class SaveToConfigAttribute : Attribute {}
public class MSConfig : Values
{
public int Save()
CommonIO _CIO = new CommonIO();
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged() { UserModifiedConfig = true; }
public static readonly Dictionary<string, string> SysVars = new Dictionary<string, string>()
{
int errors = 0;
try
{
// Delete existing config file.
if (File.Exists(openFile))
File.Delete(openFile);
{"%appdata%\\", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\"},
{"%localappdata%\\", Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\"},
{"%userprofile%\\", Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "\\"},
};
StreamWriter writer = new StreamWriter(openFile, true);
foreach (var item in GetType().GetProperties())
{
foreach (var attr in item.GetCustomAttributes(true))
{
if (item.GetValue(this) != null && item.CanRead)
writer.WriteLine(String.Format("{0}={1}",item.Name,item.GetValue(this)));
}
}
writer.Close();
}
catch (Exception)
{
MessageHandler.errorMessage(MessageHandler.errCodes.Config_WriteError, null);
errors++;
}
return errors;
[SaveToConfig]
public Version MSVersion
{
get { return Assembly.GetExecutingAssembly().GetName().Version; }
}
public int Load()
[SaveToConfig]
public string MSIniType { get; set; } = "Config";
[SaveToConfig]
public string Description
{
int errors = 0;
try
get { return _Description; }
set
{
foreach (var item in GetType().GetProperties())
_Description = value;
OnPropertyChanged();
}
}
private string _Description = string.Empty;
[SaveToConfig]
public bool EnablePurge
{
get { return _EnablePurge; }
set
{
_EnablePurge = value;
OnPropertyChanged();
}
}
private bool _EnablePurge;
[SaveToConfig]
public bool EnableBackup
{
get { return _EnableBackup; }
set
{
_EnableBackup = value;
OnPropertyChanged();
}
}
private bool _EnableBackup;
[SaveToConfig]
public bool OverwriteBackup
{
get { return _OverwriteBackup; }
set
{
_OverwriteBackup = value;
OnPropertyChanged();
}
}
private bool _OverwriteBackup;
[SaveToConfig]
public int CompressionLevel
{
get { return _CompressionLevel; }
set
{
_CompressionLevel = value;
OnPropertyChanged();
}
}
private int _CompressionLevel = 4;
[SaveToConfig]
public string RootBackupSource
{
get { return _RootBackupSource; }
set
{
_RootBackupSource = value;
BackupSource = _CIO.ConvertVariableToPath(_RootBackupSource) + _PathBackupSource;
OnPropertyChanged();
}
}
private string _RootBackupSource = string.Empty;
[SaveToConfig]
public string PathBackupSource
{
get { return _PathBackupSource; }
set
{
_PathBackupSource = value;
BackupSource = _CIO.ConvertVariableToPath(_RootBackupSource) + value;
OnPropertyChanged();
}
}
private string _PathBackupSource = string.Empty;
[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();
}
}
private string _BackupSource;
public string BackupDestination
{
get { return _BackupDestination; }
set
{
_BackupDestination = value;
OnPropertyChanged();
}
}
private string _BackupDestination;
public string RestoreSource
{
get { return _RestoreSource; }
set
{
_RestoreSource = value;
OnPropertyChanged();
}
}
private string _RestoreSource;
public string RestoreDestination
{
get { return _RestoreDestintation; }
set
{
_RestoreDestintation = value;
OnPropertyChanged();
}
}
private string _RestoreDestintation;
public string OpenFile { get; set; }
public bool UserModifiedConfig { get; set; }
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)
{
foreach (var attr in item.GetCustomAttributes(true))
if (line.KeyName == "MSIniType" && line.Value != "Config")
{
///
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));
}
}
}
///
IsValidConfig = false;
}
if (line.KeyName == "MSVersion")
{
Version v;
if (Version.TryParse(line.Value, out v))
IsValidConfig = IsMinimumConfigVersion(v);
}
}
}
catch (Exception)
{
MessageHandler.errorMessage(MessageHandler.errCodes.Config_ReadError, null);
errors++;
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));
}
}
}
+77 -33
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" />
@@ -92,32 +109,37 @@
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="Components\AboutBox.cs">
<Compile Include="Components\Forms\AboutBox.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Components\AboutBox.Designer.cs">
<Compile Include="Components\Forms\AboutBox.Designer.cs">
<DependentUpon>AboutBox.cs</DependentUpon>
</Compile>
<Compile Include="Components\CommonIO.cs" />
<Compile Include="Components\DonationUI.cs">
<Compile Include="Components\Forms\ChangeLog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Components\DonationUI.Designer.cs">
<DependentUpon>DonationUI.cs</DependentUpon>
<Compile Include="Components\Forms\ChangeLog.Designer.cs">
<DependentUpon>ChangeLog.cs</DependentUpon>
</Compile>
<Compile Include="Components\CommonIO.cs" />
<Compile Include="Components\Forms\DirSizeCalculatorPrompt.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Components\Forms\DirSizeCalculatorPrompt.Designer.cs">
<DependentUpon>DirSizeCalculatorPrompt.cs</DependentUpon>
</Compile>
<Compile Include="Components\Forms\DropUI.cs">
<SubType>Form</SubType>
</Compile>
<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\NewRegKeyUI.cs">
<Compile Include="Components\Forms\WorkerUI.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Components\NewRegKeyUI.Designer.cs">
<DependentUpon>NewRegKeyUI.cs</DependentUpon>
</Compile>
<Compile Include="Components\WorkerUI.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Components\WorkerUI.Designer.cs">
<Compile Include="Components\Forms\WorkerUI.Designer.cs">
<DependentUpon>WorkerUI.cs</DependentUpon>
</Compile>
<Compile Include="MainWindow.cs">
@@ -129,16 +151,19 @@
<Compile Include="ManageCfg.cs" />
<Compile Include="Startup.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Components\AboutBox.resx">
<EmbeddedResource Include="Components\Forms\AboutBox.resx">
<DependentUpon>AboutBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Components\DonationUI.resx">
<DependentUpon>DonationUI.cs</DependentUpon>
<EmbeddedResource Include="Components\Forms\ChangeLog.resx">
<DependentUpon>ChangeLog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Components\NewRegKeyUI.resx">
<DependentUpon>NewRegKeyUI.cs</DependentUpon>
<EmbeddedResource Include="Components\Forms\DirSizeCalculatorPrompt.resx">
<DependentUpon>DirSizeCalculatorPrompt.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Components\WorkerUI.resx">
<EmbeddedResource Include="Components\Forms\DropUI.resx">
<DependentUpon>DropUI.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Components\Forms\WorkerUI.resx">
<DependentUpon>WorkerUI.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MainWindow.resx">
@@ -157,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>
@@ -167,10 +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">
@@ -184,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>
@@ -193,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.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[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