From 3d7726792e4550c545ba8989f9d5d3e2d5352686 Mon Sep 17 00:00:00 2001 From: Nain Date: Wed, 29 Mar 2023 20:53:46 -0300 Subject: [PATCH] v1.5.0 --- .gitignore | 1 + BackupHelper.sln | 10 +- BackupHelper/BackupHelper.csproj | 222 +----- BackupHelper/FileControlConsoleImpl.cs | 46 -- BackupHelper/FileControlImpl.cs | 45 -- BackupHelper/FormCancelExecution.Designer.cs | 77 -- BackupHelper/FormEditOptions.Designer.cs | 534 ------------- BackupHelper/FormEditProfile.Designer.cs | 92 --- BackupHelper/FormErrorDialog.Designer.cs | 113 --- BackupHelper/FormErrorDialog.cs | 48 -- BackupHelper/FormOptionsMenu.Designer.cs | 341 --------- BackupHelper/FormProfileMenu.Designer.cs | 212 ------ BackupHelper/FormReport.Designer.cs | 556 -------------- .../Forms/FormCancelExecution.Designer.cs | 77 ++ .../{ => Forms}/FormCancelExecution.cs | 0 BackupHelper/Forms/FormCancelExecution.resx | 63 ++ .../Forms/FormEditOptions.Designer.cs | 715 ++++++++++++++++++ BackupHelper/{ => Forms}/FormEditOptions.cs | 350 ++++++--- BackupHelper/{ => Forms}/FormEditOptions.resx | 62 +- .../Forms/FormEditProfile.Designer.cs | 90 +++ BackupHelper/{ => Forms}/FormEditProfile.cs | 3 - BackupHelper/Forms/FormEditProfile.resx | 60 ++ .../Forms/FormErrorDialog.Designer.cs | 113 +++ BackupHelper/Forms/FormErrorDialog.cs | 51 ++ BackupHelper/Forms/FormErrorDialog.resx | 60 ++ .../Forms/FormOptionsMenu.Designer.cs | 322 ++++++++ BackupHelper/{ => Forms}/FormOptionsMenu.cs | 160 ++-- BackupHelper/{ => Forms}/FormOptionsMenu.resx | 62 +- .../Forms/FormProfileMenu.Designer.cs | 200 +++++ BackupHelper/{ => Forms}/FormProfileMenu.cs | 48 +- BackupHelper/{ => Forms}/FormProfileMenu.resx | 62 +- BackupHelper/Forms/FormReport.Designer.cs | 526 +++++++++++++ BackupHelper/{ => Forms}/FormReport.cs | 3 +- BackupHelper/{ => Forms}/FormReport.resx | 62 +- BackupHelper/Forms/GroupForm.Designer.cs | 128 ++++ BackupHelper/{ => Forms}/GroupForm.cs | 4 - BackupHelper/Forms/GroupForm.resx | 60 ++ BackupHelper/GroupForm.Designer.cs | 128 ---- BackupHelper/GroupForm.resx | 120 --- BackupHelper/{ => Program}/LogManager.cs | 4 +- BackupHelper/{ => Program}/Program.cs | 67 +- BackupHelper/Program/SQLiteAccess.cs | 348 +++++++++ BackupHelper/Properties/AssemblyInfo.cs | 12 - BackupHelper/Properties/Resources.Designer.cs | 2 +- BackupHelper/Properties/Resources.resx | 2 +- BackupHelper/Properties/Settings.designer.cs | 0 BackupHelper/Properties/Settings.settings | 0 BackupHelper/SQLiteAccess.cs | 324 -------- BackupHelper/app.config | 3 - BackupHelper/database/backup_helper.db | Bin 20480 -> 24576 bytes BackupHelper/database/schema.sql | 17 +- BackupHelper/model/Options.cs | 10 +- BackupHelper/packages.config | 6 - CHANGELOG.md | 10 + 54 files changed, 3290 insertions(+), 3341 deletions(-) delete mode 100644 BackupHelper/FileControlConsoleImpl.cs delete mode 100644 BackupHelper/FileControlImpl.cs delete mode 100644 BackupHelper/FormCancelExecution.Designer.cs delete mode 100644 BackupHelper/FormEditOptions.Designer.cs delete mode 100644 BackupHelper/FormEditProfile.Designer.cs delete mode 100644 BackupHelper/FormErrorDialog.Designer.cs delete mode 100644 BackupHelper/FormErrorDialog.cs delete mode 100644 BackupHelper/FormOptionsMenu.Designer.cs delete mode 100644 BackupHelper/FormProfileMenu.Designer.cs delete mode 100644 BackupHelper/FormReport.Designer.cs create mode 100644 BackupHelper/Forms/FormCancelExecution.Designer.cs rename BackupHelper/{ => Forms}/FormCancelExecution.cs (100%) create mode 100644 BackupHelper/Forms/FormCancelExecution.resx create mode 100644 BackupHelper/Forms/FormEditOptions.Designer.cs rename BackupHelper/{ => Forms}/FormEditOptions.cs (54%) rename BackupHelper/{ => Forms}/FormEditOptions.resx (55%) create mode 100644 BackupHelper/Forms/FormEditProfile.Designer.cs rename BackupHelper/{ => Forms}/FormEditProfile.cs (98%) create mode 100644 BackupHelper/Forms/FormEditProfile.resx create mode 100644 BackupHelper/Forms/FormErrorDialog.Designer.cs create mode 100644 BackupHelper/Forms/FormErrorDialog.cs create mode 100644 BackupHelper/Forms/FormErrorDialog.resx create mode 100644 BackupHelper/Forms/FormOptionsMenu.Designer.cs rename BackupHelper/{ => Forms}/FormOptionsMenu.cs (86%) rename BackupHelper/{ => Forms}/FormOptionsMenu.resx (50%) create mode 100644 BackupHelper/Forms/FormProfileMenu.Designer.cs rename BackupHelper/{ => Forms}/FormProfileMenu.cs (93%) rename BackupHelper/{ => Forms}/FormProfileMenu.resx (51%) create mode 100644 BackupHelper/Forms/FormReport.Designer.cs rename BackupHelper/{ => Forms}/FormReport.cs (99%) rename BackupHelper/{ => Forms}/FormReport.resx (98%) create mode 100644 BackupHelper/Forms/GroupForm.Designer.cs rename BackupHelper/{ => Forms}/GroupForm.cs (97%) create mode 100644 BackupHelper/Forms/GroupForm.resx delete mode 100644 BackupHelper/GroupForm.Designer.cs delete mode 100644 BackupHelper/GroupForm.resx rename BackupHelper/{ => Program}/LogManager.cs (93%) rename BackupHelper/{ => Program}/Program.cs (76%) create mode 100644 BackupHelper/Program/SQLiteAccess.cs delete mode 100644 BackupHelper/Properties/AssemblyInfo.cs delete mode 100644 BackupHelper/Properties/Settings.designer.cs delete mode 100644 BackupHelper/Properties/Settings.settings delete mode 100644 BackupHelper/SQLiteAccess.cs delete mode 100644 BackupHelper/app.config delete mode 100644 BackupHelper/packages.config diff --git a/.gitignore b/.gitignore index 8fec41c..f183dea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /BackupHelper/test +/BackupHelper-old ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. diff --git a/BackupHelper.sln b/BackupHelper.sln index 2965b1d..17e5035 100644 --- a/BackupHelper.sln +++ b/BackupHelper.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.5.33414.496 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BackupHelper", "BackupHelper\BackupHelper.csproj", "{960576ED-78BD-460D-9C5E-3E422329FA1B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BackupHelper-old", "BackupHelper-old\BackupHelper-old.csproj", "{960576ED-78BD-460D-9C5E-3E422329FA1B}" ProjectSection(ProjectDependencies) = postProject {67E7840B-0306-44EA-BBD6-641E388C3C9D} = {67E7840B-0306-44EA-BBD6-641E388C3C9D} EndProjectSection @@ -12,6 +12,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FileControlUtility", "..\.. EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FormsUtility", "..\..\Library\FormsUtility\FormsUtility\FormsUtility.csproj", "{5645CE62-EFDE-429B-8492-9E4D55F343F9}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BackupHelper", "BackupHelper\BackupHelper.csproj", "{0BF5D9B5-07B9-4AE9-847D-2A2D6A9CABD3}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -19,15 +21,17 @@ Global EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {960576ED-78BD-460D-9C5E-3E422329FA1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {960576ED-78BD-460D-9C5E-3E422329FA1B}.Debug|Any CPU.Build.0 = Debug|Any CPU {960576ED-78BD-460D-9C5E-3E422329FA1B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {960576ED-78BD-460D-9C5E-3E422329FA1B}.Release|Any CPU.Build.0 = Release|Any CPU {67E7840B-0306-44EA-BBD6-641E388C3C9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67E7840B-0306-44EA-BBD6-641E388C3C9D}.Debug|Any CPU.Build.0 = Debug|Any CPU {67E7840B-0306-44EA-BBD6-641E388C3C9D}.Release|Any CPU.ActiveCfg = Release|Any CPU {5645CE62-EFDE-429B-8492-9E4D55F343F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5645CE62-EFDE-429B-8492-9E4D55F343F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5645CE62-EFDE-429B-8492-9E4D55F343F9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0BF5D9B5-07B9-4AE9-847D-2A2D6A9CABD3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0BF5D9B5-07B9-4AE9-847D-2A2D6A9CABD3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0BF5D9B5-07B9-4AE9-847D-2A2D6A9CABD3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0BF5D9B5-07B9-4AE9-847D-2A2D6A9CABD3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/BackupHelper/BackupHelper.csproj b/BackupHelper/BackupHelper.csproj index b9a332a..4f5d218 100644 --- a/BackupHelper/BackupHelper.csproj +++ b/BackupHelper/BackupHelper.csproj @@ -1,199 +1,57 @@ - - - + + - Debug - AnyCPU - {960576ED-78BD-460D-9C5E-3E422329FA1B} WinExe - BackupHelper - BackupHelper - v4.7.2 - 512 - true - true - false - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - true - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - none - true - bin\Release\ - TRACE - prompt - 4 - false - - + net7.0-windows10.0.22621.0 + disable + true + enable + Copyright © Nain 2023 + Resources\backup_helper_icon.ico + 1.5.0 + Nain + BackupHelper + Small .NET 7 app to facilitate backup of files and directories with advanced settings and binary comparison. These settings are saved into profiles. + README.md + https://github.com/user413/BackupHelper + 7.0 - - true + + + none + - - ..\packages\FileControlUtility.1.2.1\lib\netstandard2.0\FileControlUtility.dll - - - - - ..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.5\lib\net46\System.Data.SQLite.dll - - - - - - - - - - - + + - - - - Form - - - FormCancelExecution.cs - - - Form - - - FormEditOptions.cs - - - Form - - - FormEditProfile.cs - - - Form - - - FormErrorDialog.cs - - - Form - - - FormOptionsMenu.cs - - - Form - - - FormProfileMenu.cs - - - Form - - - FormReport.cs - - - Form - - - GroupForm.cs - - - - - - - - - FormEditOptions.cs - - - FormOptionsMenu.cs - - - FormProfileMenu.cs - - - FormReport.cs - - - GroupForm.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - True - - - - SettingsSingleFileGenerator - Settings.Designer.cs + + True + \ - - True - Settings.settings - True - + - + + + + - - + + True + True + Resources.resx + + - - False - Microsoft .NET Framework 4.7.2 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 - false - + + ResXFileCodeGenerator + Resources.Designer.cs + - - - - - 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}. - - - + \ No newline at end of file diff --git a/BackupHelper/FileControlConsoleImpl.cs b/BackupHelper/FileControlConsoleImpl.cs deleted file mode 100644 index 3fdd5b5..0000000 --- a/BackupHelper/FileControlConsoleImpl.cs +++ /dev/null @@ -1,46 +0,0 @@ -using FileControlUtility; -using System; -using System.IO; - -namespace BackupHelper -{ - public class FileControlConsoleImpl : FileControl - { - private readonly bool showDialogs; - - public FileControlConsoleImpl(bool showDialogs) - { - this.showDialogs = showDialogs; - } - - protected override void HandleCurrentFileExecution(string trimmedPathWithFileName, FileInfo originFile, string destinyDir, TransferSettings settings) - { - //Console.WriteLine($"Transfering: {trimmedPathWithFileName}"); - } - - protected override FileTransferErrorActionNonRepeatable HandleTransferErrorNonRepeatable(string errorMessage, Exception e, FileInfo originFile, - string destinyDir, TransferSettings settings) - { - if (!showDialogs) return FileTransferErrorActionNonRepeatable.SKIP; - - FormErrorDialog form = new FormErrorDialog(typeof(FileTransferErrorActionNonRepeatable), errorMessage); - form.ShowDialog(); - return (FileTransferErrorActionNonRepeatable)form.Result; - } - - protected override FileTransferErrorActionRepeatable HandleTransferErrorRepeatable(string errorMessage, Exception e, FileInfo originFile, - string destinyDir, TransferSettings settings) - { - if (!showDialogs) return FileTransferErrorActionRepeatable.SKIP; - - FormErrorDialog form = new FormErrorDialog(typeof(FileTransferErrorActionRepeatable), errorMessage); - form.ShowDialog(); - return (FileTransferErrorActionRepeatable)form.Result; - } - - protected override void HandleLogMessage(string logMessage) - { - LogManager.WriteLine(logMessage); - } - } -} diff --git a/BackupHelper/FileControlImpl.cs b/BackupHelper/FileControlImpl.cs deleted file mode 100644 index ff2e6b7..0000000 --- a/BackupHelper/FileControlImpl.cs +++ /dev/null @@ -1,45 +0,0 @@ -using FileControlUtility; -using System; -using System.IO; - -namespace BackupHelper -{ - public class FileControlImpl : FileControl - { - private readonly FormOptionsMenu Menu; - - public FileControlImpl(FormOptionsMenu menu) - { - Menu = menu; - } - - protected override void HandleCurrentFileExecution(string trimmedPathWithFileName, FileInfo originFile, string destinyDir, TransferSettings settings) - { - if (trimmedPathWithFileName.Length > 100) - trimmedPathWithFileName = $"...{trimmedPathWithFileName.Substring(trimmedPathWithFileName.Length - 100)}"; - - Menu.ShowCurrentFileExecution(trimmedPathWithFileName); - } - - protected override FileTransferErrorActionNonRepeatable HandleTransferErrorNonRepeatable(string errorMessage, Exception e, FileInfo originFile, - string destinyDir, TransferSettings settings) - { - FormErrorDialog form = new FormErrorDialog(typeof(FileTransferErrorActionNonRepeatable), errorMessage); - form.ShowDialog(); - return (FileTransferErrorActionNonRepeatable)form.Result; - } - - protected override FileTransferErrorActionRepeatable HandleTransferErrorRepeatable(string errorMessage, Exception e, FileInfo originFile, - string destinyDir, TransferSettings settings) - { - FormErrorDialog form = new FormErrorDialog(typeof(FileTransferErrorActionRepeatable), errorMessage); - form.ShowDialog(); - return (FileTransferErrorActionRepeatable)form.Result; - } - - protected override void HandleLogMessage(string logMessage) - { - LogManager.WriteLine(logMessage); - } - } -} diff --git a/BackupHelper/FormCancelExecution.Designer.cs b/BackupHelper/FormCancelExecution.Designer.cs deleted file mode 100644 index a08f566..0000000 --- a/BackupHelper/FormCancelExecution.Designer.cs +++ /dev/null @@ -1,77 +0,0 @@ -namespace BackupHelper -{ - partial class FormCancelExecution - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker(); - this.labelCancel = new System.Windows.Forms.Label(); - this.progressBarCanceling = new System.Windows.Forms.ProgressBar(); - this.SuspendLayout(); - // - // labelCancel - // - this.labelCancel.AutoSize = true; - this.labelCancel.Location = new System.Drawing.Point(79, 9); - this.labelCancel.Name = "labelCancel"; - this.labelCancel.Size = new System.Drawing.Size(63, 13); - this.labelCancel.TabIndex = 0; - this.labelCancel.Text = "Canceling..."; - // - // progressBarCanceling - // - this.progressBarCanceling.Location = new System.Drawing.Point(12, 41); - this.progressBarCanceling.Name = "progressBarCanceling"; - this.progressBarCanceling.Size = new System.Drawing.Size(210, 23); - this.progressBarCanceling.Step = 1; - this.progressBarCanceling.TabIndex = 1; - // - // FormCancelExecution - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.ClientSize = new System.Drawing.Size(234, 73); - this.ControlBox = false; - this.Controls.Add(this.progressBarCanceling); - this.Controls.Add(this.labelCancel); - this.Cursor = System.Windows.Forms.Cursors.WaitCursor; - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Name = "FormCancelExecution"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.ComponentModel.BackgroundWorker backgroundWorker1; - private System.Windows.Forms.Label labelCancel; - private System.Windows.Forms.ProgressBar progressBarCanceling; - } -} \ No newline at end of file diff --git a/BackupHelper/FormEditOptions.Designer.cs b/BackupHelper/FormEditOptions.Designer.cs deleted file mode 100644 index 17076cc..0000000 --- a/BackupHelper/FormEditOptions.Designer.cs +++ /dev/null @@ -1,534 +0,0 @@ -namespace BackupHelper -{ - partial class FormEditOptions - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormEditOptions)); - this.checkBoxKeepOriginFiles = new System.Windows.Forms.CheckBox(); - this.checkBoxMoveSubfolders = new System.Windows.Forms.CheckBox(); - this.comboBoxMethod = new System.Windows.Forms.ComboBox(); - this.textBoxDestinyPath = new System.Windows.Forms.TextBox(); - this.textBoxSourcePath = new System.Windows.Forms.TextBox(); - this.labelMethod = new System.Windows.Forms.Label(); - this.labelDestinyPath = new System.Windows.Forms.Label(); - this.labelSourcePath = new System.Windows.Forms.Label(); - this.buttonAddSource = new System.Windows.Forms.Button(); - this.buttonAddDestiny = new System.Windows.Forms.Button(); - this.buttonDoneEdit = new System.Windows.Forms.Button(); - this.folderBrowserDialogEditOption = new System.Windows.Forms.FolderBrowserDialog(); - this.checkBoxCleanDestinyDirectory = new System.Windows.Forms.CheckBox(); - this.buttonSwitchPaths = new System.Windows.Forms.Button(); - this.checkBoxManageFileNamesAndExtensions = new System.Windows.Forms.CheckBox(); - this.listViewFileNamesAndExtensions = new System.Windows.Forms.ListView(); - this.columnHeaderFileOrExtension = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.panelManageExtensions = new System.Windows.Forms.Panel(); - this.textBoxFileNameOrExtension = new System.Windows.Forms.TextBox(); - this.radioButtonIgnore = new System.Windows.Forms.RadioButton(); - this.radioButtonAllowOnly = new System.Windows.Forms.RadioButton(); - this.buttonRemoveFileOrExtension = new System.Windows.Forms.Button(); - this.buttonAddFileOrExtension = new System.Windows.Forms.Button(); - this.checkBoxDeleteUncommonFiles = new System.Windows.Forms.CheckBox(); - this.labelKeepOriginFilesHelp = new System.Windows.Forms.Label(); - this.labelCleanDestinyHelp = new System.Windows.Forms.Label(); - this.labelDeleteUncommonFilesHelp = new System.Windows.Forms.Label(); - this.toolTipHelp = new System.Windows.Forms.ToolTip(this.components); - this.labelReenumerateHelp = new System.Windows.Forms.Label(); - this.checkBoxReenumerate = new System.Windows.Forms.CheckBox(); - this.numericUpDownMaxKeptRenamedFileCount = new System.Windows.Forms.NumericUpDown(); - this.labelMaxKeptRenamedFileCount = new System.Windows.Forms.Label(); - this.panelManageExtensions.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMaxKeptRenamedFileCount)).BeginInit(); - this.SuspendLayout(); - // - // checkBoxKeepOriginFiles - // - this.checkBoxKeepOriginFiles.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.checkBoxKeepOriginFiles.AutoSize = true; - this.checkBoxKeepOriginFiles.Checked = true; - this.checkBoxKeepOriginFiles.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBoxKeepOriginFiles.Location = new System.Drawing.Point(260, 137); - this.checkBoxKeepOriginFiles.Name = "checkBoxKeepOriginFiles"; - this.checkBoxKeepOriginFiles.Size = new System.Drawing.Size(172, 17); - this.checkBoxKeepOriginFiles.TabIndex = 6; - this.checkBoxKeepOriginFiles.Text = "Keep origin files and directories"; - this.checkBoxKeepOriginFiles.UseVisualStyleBackColor = true; - // - // checkBoxMoveSubfolders - // - this.checkBoxMoveSubfolders.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.checkBoxMoveSubfolders.AutoSize = true; - this.checkBoxMoveSubfolders.Checked = true; - this.checkBoxMoveSubfolders.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBoxMoveSubfolders.Location = new System.Drawing.Point(260, 119); - this.checkBoxMoveSubfolders.Name = "checkBoxMoveSubfolders"; - this.checkBoxMoveSubfolders.Size = new System.Drawing.Size(112, 17); - this.checkBoxMoveSubfolders.TabIndex = 5; - this.checkBoxMoveSubfolders.Text = "Include subfolders"; - this.checkBoxMoveSubfolders.UseVisualStyleBackColor = true; - // - // comboBoxMethod - // - this.comboBoxMethod.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.comboBoxMethod.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.comboBoxMethod.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBoxMethod.FormattingEnabled = true; - this.comboBoxMethod.Location = new System.Drawing.Point(260, 222); - this.comboBoxMethod.Name = "comboBoxMethod"; - this.comboBoxMethod.Size = new System.Drawing.Size(369, 21); - this.comboBoxMethod.TabIndex = 9; - this.comboBoxMethod.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.ComboBoxMethod_DrawItem); - this.comboBoxMethod.SelectedIndexChanged += new System.EventHandler(this.ComboBoxMethod_SelectedIndexChanged); - // - // textBoxDestinyPath - // - this.textBoxDestinyPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.textBoxDestinyPath.Location = new System.Drawing.Point(15, 76); - this.textBoxDestinyPath.Name = "textBoxDestinyPath"; - this.textBoxDestinyPath.Size = new System.Drawing.Size(577, 20); - this.textBoxDestinyPath.TabIndex = 3; - // - // textBoxSourcePath - // - this.textBoxSourcePath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.textBoxSourcePath.Location = new System.Drawing.Point(15, 29); - this.textBoxSourcePath.Name = "textBoxSourcePath"; - this.textBoxSourcePath.Size = new System.Drawing.Size(577, 20); - this.textBoxSourcePath.TabIndex = 1; - // - // labelMethod - // - this.labelMethod.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.labelMethod.AutoSize = true; - this.labelMethod.Location = new System.Drawing.Point(257, 206); - this.labelMethod.Name = "labelMethod"; - this.labelMethod.Size = new System.Drawing.Size(225, 13); - this.labelMethod.TabIndex = 14; - this.labelMethod.Text = "For repeated filenames in the destiny directory:"; - // - // labelDestinyPath - // - this.labelDestinyPath.AutoSize = true; - this.labelDestinyPath.Location = new System.Drawing.Point(12, 60); - this.labelDestinyPath.Name = "labelDestinyPath"; - this.labelDestinyPath.Size = new System.Drawing.Size(90, 13); - this.labelDestinyPath.TabIndex = 13; - this.labelDestinyPath.Text = "Destiny Directory:"; - // - // labelSourcePath - // - this.labelSourcePath.AutoSize = true; - this.labelSourcePath.Location = new System.Drawing.Point(12, 13); - this.labelSourcePath.Name = "labelSourcePath"; - this.labelSourcePath.Size = new System.Drawing.Size(89, 13); - this.labelSourcePath.TabIndex = 12; - this.labelSourcePath.Text = "Source Directory:"; - // - // buttonAddSource - // - this.buttonAddSource.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonAddSource.BackColor = System.Drawing.SystemColors.ControlLight; - this.buttonAddSource.Cursor = System.Windows.Forms.Cursors.Cross; - this.buttonAddSource.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.buttonAddSource.Location = new System.Drawing.Point(591, 26); - this.buttonAddSource.Name = "buttonAddSource"; - this.buttonAddSource.Size = new System.Drawing.Size(42, 25); - this.buttonAddSource.TabIndex = 2; - this.buttonAddSource.Text = "Add"; - this.buttonAddSource.UseVisualStyleBackColor = false; - this.buttonAddSource.Click += new System.EventHandler(this.ButtonAddSource_Click); - // - // buttonAddDestiny - // - this.buttonAddDestiny.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonAddDestiny.BackColor = System.Drawing.SystemColors.ControlLight; - this.buttonAddDestiny.Cursor = System.Windows.Forms.Cursors.Cross; - this.buttonAddDestiny.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.buttonAddDestiny.Location = new System.Drawing.Point(591, 73); - this.buttonAddDestiny.Name = "buttonAddDestiny"; - this.buttonAddDestiny.Size = new System.Drawing.Size(42, 25); - this.buttonAddDestiny.TabIndex = 4; - this.buttonAddDestiny.Text = "Add"; - this.buttonAddDestiny.UseVisualStyleBackColor = false; - this.buttonAddDestiny.Click += new System.EventHandler(this.ButtonAddDestiny_Click); - // - // buttonDoneEdit - // - this.buttonDoneEdit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonDoneEdit.FlatAppearance.BorderColor = System.Drawing.Color.Black; - this.buttonDoneEdit.Location = new System.Drawing.Point(527, 269); - this.buttonDoneEdit.Name = "buttonDoneEdit"; - this.buttonDoneEdit.Size = new System.Drawing.Size(103, 36); - this.buttonDoneEdit.TabIndex = 10; - this.buttonDoneEdit.Text = "Done"; - this.buttonDoneEdit.UseVisualStyleBackColor = true; - this.buttonDoneEdit.Click += new System.EventHandler(this.ButtonDoneEdit_Click); - // - // checkBoxCleanDestinyDirectory - // - this.checkBoxCleanDestinyDirectory.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.checkBoxCleanDestinyDirectory.AutoSize = true; - this.checkBoxCleanDestinyDirectory.Location = new System.Drawing.Point(260, 155); - this.checkBoxCleanDestinyDirectory.Name = "checkBoxCleanDestinyDirectory"; - this.checkBoxCleanDestinyDirectory.Size = new System.Drawing.Size(151, 17); - this.checkBoxCleanDestinyDirectory.TabIndex = 7; - this.checkBoxCleanDestinyDirectory.Text = "Clean destiny directory first"; - this.checkBoxCleanDestinyDirectory.UseVisualStyleBackColor = true; - this.checkBoxCleanDestinyDirectory.CheckedChanged += new System.EventHandler(this.CheckBoxCleanDestinyDirectory_CheckedChanged); - // - // buttonSwitchPaths - // - this.buttonSwitchPaths.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonSwitchPaths.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.buttonSwitchPaths.Location = new System.Drawing.Point(458, 52); - this.buttonSwitchPaths.Name = "buttonSwitchPaths"; - this.buttonSwitchPaths.Size = new System.Drawing.Size(101, 21); - this.buttonSwitchPaths.TabIndex = 3; - this.buttonSwitchPaths.Text = "Switch Paths"; - this.buttonSwitchPaths.UseVisualStyleBackColor = true; - this.buttonSwitchPaths.Click += new System.EventHandler(this.ButtonSwitchPaths_Click); - // - // checkBoxManageFileNamesAndExtensions - // - this.checkBoxManageFileNamesAndExtensions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.checkBoxManageFileNamesAndExtensions.AutoSize = true; - this.checkBoxManageFileNamesAndExtensions.Location = new System.Drawing.Point(13, 8); - this.checkBoxManageFileNamesAndExtensions.Name = "checkBoxManageFileNamesAndExtensions"; - this.checkBoxManageFileNamesAndExtensions.Size = new System.Drawing.Size(167, 17); - this.checkBoxManageFileNamesAndExtensions.TabIndex = 11; - this.checkBoxManageFileNamesAndExtensions.Text = "Manage filenames/extensions"; - this.checkBoxManageFileNamesAndExtensions.UseVisualStyleBackColor = true; - this.checkBoxManageFileNamesAndExtensions.CheckedChanged += new System.EventHandler(this.CheckBoxManageFileExtensions_CheckedChanged); - // - // listViewFileNamesAndExtensions - // - this.listViewFileNamesAndExtensions.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.listViewFileNamesAndExtensions.BackColor = System.Drawing.SystemColors.Window; - this.listViewFileNamesAndExtensions.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeaderFileOrExtension}); - this.listViewFileNamesAndExtensions.Enabled = false; - this.listViewFileNamesAndExtensions.ForeColor = System.Drawing.SystemColors.InactiveCaption; - this.listViewFileNamesAndExtensions.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; - this.listViewFileNamesAndExtensions.HideSelection = false; - this.listViewFileNamesAndExtensions.Location = new System.Drawing.Point(12, 53); - this.listViewFileNamesAndExtensions.MultiSelect = false; - this.listViewFileNamesAndExtensions.Name = "listViewFileNamesAndExtensions"; - this.listViewFileNamesAndExtensions.ShowItemToolTips = true; - this.listViewFileNamesAndExtensions.Size = new System.Drawing.Size(223, 120); - this.listViewFileNamesAndExtensions.TabIndex = 9; - this.listViewFileNamesAndExtensions.UseCompatibleStateImageBehavior = false; - this.listViewFileNamesAndExtensions.View = System.Windows.Forms.View.Details; - this.listViewFileNamesAndExtensions.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ListViewExtensions_KeyDown); - // - // columnHeaderFileOrExtension - // - this.columnHeaderFileOrExtension.Text = "File or extension"; - this.columnHeaderFileOrExtension.Width = 205; - // - // panelManageExtensions - // - this.panelManageExtensions.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.panelManageExtensions.Controls.Add(this.textBoxFileNameOrExtension); - this.panelManageExtensions.Controls.Add(this.radioButtonIgnore); - this.panelManageExtensions.Controls.Add(this.checkBoxManageFileNamesAndExtensions); - this.panelManageExtensions.Controls.Add(this.radioButtonAllowOnly); - this.panelManageExtensions.Controls.Add(this.buttonRemoveFileOrExtension); - this.panelManageExtensions.Controls.Add(this.buttonAddFileOrExtension); - this.panelManageExtensions.Controls.Add(this.listViewFileNamesAndExtensions); - this.panelManageExtensions.Location = new System.Drawing.Point(6, 104); - this.panelManageExtensions.Name = "panelManageExtensions"; - this.panelManageExtensions.Size = new System.Drawing.Size(248, 207); - this.panelManageExtensions.TabIndex = 28; - // - // textBoxFileNameOrExtension - // - this.textBoxFileNameOrExtension.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.textBoxFileNameOrExtension.Enabled = false; - this.textBoxFileNameOrExtension.Location = new System.Drawing.Point(12, 179); - this.textBoxFileNameOrExtension.Name = "textBoxFileNameOrExtension"; - this.textBoxFileNameOrExtension.Size = new System.Drawing.Size(144, 20); - this.textBoxFileNameOrExtension.TabIndex = 14; - this.textBoxFileNameOrExtension.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.TextBoxExtension_KeyPress); - // - // radioButtonIgnore - // - this.radioButtonIgnore.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.radioButtonIgnore.AutoSize = true; - this.radioButtonIgnore.Enabled = false; - this.radioButtonIgnore.Location = new System.Drawing.Point(105, 30); - this.radioButtonIgnore.Name = "radioButtonIgnore"; - this.radioButtonIgnore.Size = new System.Drawing.Size(55, 17); - this.radioButtonIgnore.TabIndex = 13; - this.radioButtonIgnore.Text = "Ignore"; - this.radioButtonIgnore.UseVisualStyleBackColor = true; - // - // radioButtonAllowOnly - // - this.radioButtonAllowOnly.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.radioButtonAllowOnly.AutoSize = true; - this.radioButtonAllowOnly.Checked = true; - this.radioButtonAllowOnly.Enabled = false; - this.radioButtonAllowOnly.Location = new System.Drawing.Point(27, 30); - this.radioButtonAllowOnly.Name = "radioButtonAllowOnly"; - this.radioButtonAllowOnly.Size = new System.Drawing.Size(74, 17); - this.radioButtonAllowOnly.TabIndex = 12; - this.radioButtonAllowOnly.TabStop = true; - this.radioButtonAllowOnly.Text = "Allow Only"; - this.radioButtonAllowOnly.UseVisualStyleBackColor = true; - // - // buttonRemoveFileOrExtension - // - this.buttonRemoveFileOrExtension.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.buttonRemoveFileOrExtension.Enabled = false; - this.buttonRemoveFileOrExtension.Location = new System.Drawing.Point(197, 178); - this.buttonRemoveFileOrExtension.Name = "buttonRemoveFileOrExtension"; - this.buttonRemoveFileOrExtension.Size = new System.Drawing.Size(38, 22); - this.buttonRemoveFileOrExtension.TabIndex = 16; - this.buttonRemoveFileOrExtension.Text = "Remove"; - this.buttonRemoveFileOrExtension.UseVisualStyleBackColor = true; - this.buttonRemoveFileOrExtension.Click += new System.EventHandler(this.ButtonRemoveExtension_Click); - // - // buttonAddFileOrExtension - // - this.buttonAddFileOrExtension.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.buttonAddFileOrExtension.Enabled = false; - this.buttonAddFileOrExtension.Location = new System.Drawing.Point(158, 178); - this.buttonAddFileOrExtension.Name = "buttonAddFileOrExtension"; - this.buttonAddFileOrExtension.Size = new System.Drawing.Size(38, 22); - this.buttonAddFileOrExtension.TabIndex = 15; - this.buttonAddFileOrExtension.Text = "Add"; - this.buttonAddFileOrExtension.UseVisualStyleBackColor = true; - this.buttonAddFileOrExtension.Click += new System.EventHandler(this.ButtonAddExtension_Click); - // - // checkBoxDeleteUncommonFiles - // - this.checkBoxDeleteUncommonFiles.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.checkBoxDeleteUncommonFiles.AutoSize = true; - this.checkBoxDeleteUncommonFiles.ForeColor = System.Drawing.SystemColors.ControlText; - this.checkBoxDeleteUncommonFiles.Location = new System.Drawing.Point(260, 173); - this.checkBoxDeleteUncommonFiles.Name = "checkBoxDeleteUncommonFiles"; - this.checkBoxDeleteUncommonFiles.Size = new System.Drawing.Size(205, 17); - this.checkBoxDeleteUncommonFiles.TabIndex = 8; - this.checkBoxDeleteUncommonFiles.Text = "Delete uncommon files and directories"; - this.checkBoxDeleteUncommonFiles.UseVisualStyleBackColor = true; - this.checkBoxDeleteUncommonFiles.CheckedChanged += new System.EventHandler(this.CheckBoxDeleteUncommonFiles_CheckedChanged); - // - // labelKeepOriginFilesHelp - // - this.labelKeepOriginFilesHelp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.labelKeepOriginFilesHelp.AutoSize = true; - this.labelKeepOriginFilesHelp.BackColor = System.Drawing.Color.Green; - this.labelKeepOriginFilesHelp.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelKeepOriginFilesHelp.ForeColor = System.Drawing.Color.White; - this.labelKeepOriginFilesHelp.Location = new System.Drawing.Point(429, 139); - this.labelKeepOriginFilesHelp.Name = "labelKeepOriginFilesHelp"; - this.labelKeepOriginFilesHelp.Size = new System.Drawing.Size(11, 12); - this.labelKeepOriginFilesHelp.TabIndex = 31; - this.labelKeepOriginFilesHelp.Text = "?"; - this.toolTipHelp.SetToolTip(this.labelKeepOriginFilesHelp, "Origin files and directories will be copied instead of moved."); - // - // labelCleanDestinyHelp - // - this.labelCleanDestinyHelp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.labelCleanDestinyHelp.AutoSize = true; - this.labelCleanDestinyHelp.BackColor = System.Drawing.Color.Green; - this.labelCleanDestinyHelp.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelCleanDestinyHelp.ForeColor = System.Drawing.Color.White; - this.labelCleanDestinyHelp.Location = new System.Drawing.Point(408, 157); - this.labelCleanDestinyHelp.Name = "labelCleanDestinyHelp"; - this.labelCleanDestinyHelp.Size = new System.Drawing.Size(11, 12); - this.labelCleanDestinyHelp.TabIndex = 32; - this.labelCleanDestinyHelp.Text = "?"; - this.toolTipHelp.SetToolTip(this.labelCleanDestinyHelp, "All destiny files and directories will be deleted before transfering."); - // - // labelDeleteUncommonFilesHelp - // - this.labelDeleteUncommonFilesHelp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.labelDeleteUncommonFilesHelp.AutoSize = true; - this.labelDeleteUncommonFilesHelp.BackColor = System.Drawing.Color.Green; - this.labelDeleteUncommonFilesHelp.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelDeleteUncommonFilesHelp.ForeColor = System.Drawing.Color.White; - this.labelDeleteUncommonFilesHelp.Location = new System.Drawing.Point(462, 175); - this.labelDeleteUncommonFilesHelp.Name = "labelDeleteUncommonFilesHelp"; - this.labelDeleteUncommonFilesHelp.Size = new System.Drawing.Size(11, 12); - this.labelDeleteUncommonFilesHelp.TabIndex = 33; - this.labelDeleteUncommonFilesHelp.Text = "?"; - this.toolTipHelp.SetToolTip(this.labelDeleteUncommonFilesHelp, "Delete files and directories present in the destiny directory that aren\'t present" + - " in the origin directory."); - // - // toolTipHelp - // - this.toolTipHelp.AutomaticDelay = 40000; - this.toolTipHelp.AutoPopDelay = 30000; - this.toolTipHelp.InitialDelay = 500; - this.toolTipHelp.ReshowDelay = 100; - // - // labelReenumerateHelp - // - this.labelReenumerateHelp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.labelReenumerateHelp.AutoSize = true; - this.labelReenumerateHelp.BackColor = System.Drawing.Color.Green; - this.labelReenumerateHelp.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelReenumerateHelp.ForeColor = System.Drawing.Color.White; - this.labelReenumerateHelp.Location = new System.Drawing.Point(427, 264); - this.labelReenumerateHelp.Name = "labelReenumerateHelp"; - this.labelReenumerateHelp.Size = new System.Drawing.Size(11, 12); - this.labelReenumerateHelp.TabIndex = 37; - this.labelReenumerateHelp.Text = "?"; - this.toolTipHelp.SetToolTip(this.labelReenumerateHelp, resources.GetString("labelReenumerateHelp.ToolTip")); - // - // checkBoxReenumerate - // - this.checkBoxReenumerate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.checkBoxReenumerate.AutoSize = true; - this.checkBoxReenumerate.Enabled = false; - this.checkBoxReenumerate.ForeColor = System.Drawing.SystemColors.ControlText; - this.checkBoxReenumerate.Location = new System.Drawing.Point(272, 262); - this.checkBoxReenumerate.Name = "checkBoxReenumerate"; - this.checkBoxReenumerate.Size = new System.Drawing.Size(158, 17); - this.checkBoxReenumerate.TabIndex = 34; - this.checkBoxReenumerate.Text = "Re-enumerate renamed files"; - this.checkBoxReenumerate.UseVisualStyleBackColor = true; - this.checkBoxReenumerate.CheckedChanged += new System.EventHandler(this.CheckBoxReenumerate_CheckedChanged); - // - // numericUpDownMaxKeptRenamedFileCount - // - this.numericUpDownMaxKeptRenamedFileCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.numericUpDownMaxKeptRenamedFileCount.Enabled = false; - this.numericUpDownMaxKeptRenamedFileCount.Location = new System.Drawing.Point(407, 283); - this.numericUpDownMaxKeptRenamedFileCount.Maximum = new decimal(new int[] { - 1000000, - 0, - 0, - 0}); - this.numericUpDownMaxKeptRenamedFileCount.Name = "numericUpDownMaxKeptRenamedFileCount"; - this.numericUpDownMaxKeptRenamedFileCount.Size = new System.Drawing.Size(75, 20); - this.numericUpDownMaxKeptRenamedFileCount.TabIndex = 35; - // - // labelMaxKeptRenamedFileCount - // - this.labelMaxKeptRenamedFileCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.labelMaxKeptRenamedFileCount.AutoSize = true; - this.labelMaxKeptRenamedFileCount.Enabled = false; - this.labelMaxKeptRenamedFileCount.Location = new System.Drawing.Point(269, 285); - this.labelMaxKeptRenamedFileCount.Name = "labelMaxKeptRenamedFileCount"; - this.labelMaxKeptRenamedFileCount.Size = new System.Drawing.Size(137, 13); - this.labelMaxKeptRenamedFileCount.TabIndex = 36; - this.labelMaxKeptRenamedFileCount.Text = "Max. enumerated files kept:"; - // - // FormEditOptions - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(650, 320); - this.Controls.Add(this.labelReenumerateHelp); - this.Controls.Add(this.labelMaxKeptRenamedFileCount); - this.Controls.Add(this.numericUpDownMaxKeptRenamedFileCount); - this.Controls.Add(this.checkBoxReenumerate); - this.Controls.Add(this.labelDeleteUncommonFilesHelp); - this.Controls.Add(this.labelCleanDestinyHelp); - this.Controls.Add(this.labelKeepOriginFilesHelp); - this.Controls.Add(this.checkBoxDeleteUncommonFiles); - this.Controls.Add(this.panelManageExtensions); - this.Controls.Add(this.buttonSwitchPaths); - this.Controls.Add(this.checkBoxCleanDestinyDirectory); - this.Controls.Add(this.buttonDoneEdit); - this.Controls.Add(this.buttonAddDestiny); - this.Controls.Add(this.buttonAddSource); - this.Controls.Add(this.checkBoxKeepOriginFiles); - this.Controls.Add(this.checkBoxMoveSubfolders); - this.Controls.Add(this.comboBoxMethod); - this.Controls.Add(this.textBoxDestinyPath); - this.Controls.Add(this.textBoxSourcePath); - this.Controls.Add(this.labelMethod); - this.Controls.Add(this.labelDestinyPath); - this.Controls.Add(this.labelSourcePath); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.Name = "FormEditOptions"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Edit Options"; - this.panelManageExtensions.ResumeLayout(false); - this.panelManageExtensions.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMaxKeptRenamedFileCount)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.CheckBox checkBoxKeepOriginFiles; - private System.Windows.Forms.CheckBox checkBoxMoveSubfolders; - private System.Windows.Forms.ComboBox comboBoxMethod; - private System.Windows.Forms.TextBox textBoxDestinyPath; - private System.Windows.Forms.TextBox textBoxSourcePath; - private System.Windows.Forms.Label labelMethod; - private System.Windows.Forms.Label labelDestinyPath; - private System.Windows.Forms.Label labelSourcePath; - private System.Windows.Forms.Button buttonAddSource; - private System.Windows.Forms.Button buttonAddDestiny; - private System.Windows.Forms.Button buttonDoneEdit; - private System.Windows.Forms.FolderBrowserDialog folderBrowserDialogEditOption; - private System.Windows.Forms.CheckBox checkBoxCleanDestinyDirectory; - private System.Windows.Forms.Button buttonSwitchPaths; - private System.Windows.Forms.CheckBox checkBoxManageFileNamesAndExtensions; - private System.Windows.Forms.ListView listViewFileNamesAndExtensions; - private System.Windows.Forms.Panel panelManageExtensions; - private System.Windows.Forms.RadioButton radioButtonIgnore; - private System.Windows.Forms.RadioButton radioButtonAllowOnly; - private System.Windows.Forms.Button buttonRemoveFileOrExtension; - private System.Windows.Forms.Button buttonAddFileOrExtension; - private System.Windows.Forms.TextBox textBoxFileNameOrExtension; - private System.Windows.Forms.ColumnHeader columnHeaderFileOrExtension; - private System.Windows.Forms.CheckBox checkBoxDeleteUncommonFiles; - private System.Windows.Forms.Label labelKeepOriginFilesHelp; - private System.Windows.Forms.Label labelCleanDestinyHelp; - private System.Windows.Forms.Label labelDeleteUncommonFilesHelp; - private System.Windows.Forms.ToolTip toolTipHelp; - private System.Windows.Forms.CheckBox checkBoxReenumerate; - private System.Windows.Forms.NumericUpDown numericUpDownMaxKeptRenamedFileCount; - private System.Windows.Forms.Label labelMaxKeptRenamedFileCount; - private System.Windows.Forms.Label labelReenumerateHelp; - } -} \ No newline at end of file diff --git a/BackupHelper/FormEditProfile.Designer.cs b/BackupHelper/FormEditProfile.Designer.cs deleted file mode 100644 index 82c5d56..0000000 --- a/BackupHelper/FormEditProfile.Designer.cs +++ /dev/null @@ -1,92 +0,0 @@ -namespace BackupHelper -{ - partial class FormEditProfile - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.buttonSaveProfile = new System.Windows.Forms.Button(); - this.textBoxProfileName = new System.Windows.Forms.TextBox(); - this.label1 = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // buttonSaveProfile - // - this.buttonSaveProfile.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.buttonSaveProfile.Location = new System.Drawing.Point(103, 67); - this.buttonSaveProfile.Name = "buttonSaveProfile"; - this.buttonSaveProfile.Size = new System.Drawing.Size(71, 29); - this.buttonSaveProfile.TabIndex = 1; - this.buttonSaveProfile.Text = "Save"; - this.buttonSaveProfile.UseVisualStyleBackColor = true; - this.buttonSaveProfile.Click += new System.EventHandler(this.ButtonSaveProfile_Click); - // - // textBoxProfileName - // - this.textBoxProfileName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.textBoxProfileName.Location = new System.Drawing.Point(12, 39); - this.textBoxProfileName.Name = "textBoxProfileName"; - this.textBoxProfileName.Size = new System.Drawing.Size(253, 20); - this.textBoxProfileName.TabIndex = 0; - this.textBoxProfileName.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxProfileName_KeyDown); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(15, 16); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(95, 13); - this.label1.TabIndex = 2; - this.label1.Text = "Enter profile name:"; - // - // FormEditProfile - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(277, 107); - this.Controls.Add(this.label1); - this.Controls.Add(this.textBoxProfileName); - this.Controls.Add(this.buttonSaveProfile); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "FormEditProfile"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Edit Profile"; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Button buttonSaveProfile; - private System.Windows.Forms.TextBox textBoxProfileName; - private System.Windows.Forms.Label label1; - } -} \ No newline at end of file diff --git a/BackupHelper/FormErrorDialog.Designer.cs b/BackupHelper/FormErrorDialog.Designer.cs deleted file mode 100644 index 1e9baf8..0000000 --- a/BackupHelper/FormErrorDialog.Designer.cs +++ /dev/null @@ -1,113 +0,0 @@ -namespace BackupHelper -{ - partial class FormErrorDialog - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.buttonErrorDialogIgnore = new System.Windows.Forms.Button(); - this.buttonErrorDialogCancel = new System.Windows.Forms.Button(); - this.textBoxErrorDialog = new System.Windows.Forms.TextBox(); - this.buttonTryAgain = new System.Windows.Forms.Button(); - this.SuspendLayout(); - // - // buttonErrorDialogIgnore - // - this.buttonErrorDialogIgnore.Location = new System.Drawing.Point(104, 96); - this.buttonErrorDialogIgnore.Margin = new System.Windows.Forms.Padding(3, 3, 3, 5); - this.buttonErrorDialogIgnore.Name = "buttonErrorDialogIgnore"; - this.buttonErrorDialogIgnore.Size = new System.Drawing.Size(111, 32); - this.buttonErrorDialogIgnore.TabIndex = 2; - this.buttonErrorDialogIgnore.Text = "Ignore and Continue"; - this.buttonErrorDialogIgnore.UseVisualStyleBackColor = true; - this.buttonErrorDialogIgnore.Click += new System.EventHandler(this.ButtonErrorDialogIgnore_Click); - // - // buttonErrorDialogCancel - // - this.buttonErrorDialogCancel.Location = new System.Drawing.Point(230, 96); - this.buttonErrorDialogCancel.Margin = new System.Windows.Forms.Padding(3, 3, 3, 5); - this.buttonErrorDialogCancel.Name = "buttonErrorDialogCancel"; - this.buttonErrorDialogCancel.Size = new System.Drawing.Size(98, 32); - this.buttonErrorDialogCancel.TabIndex = 3; - this.buttonErrorDialogCancel.Text = "Cancel Execution"; - this.buttonErrorDialogCancel.UseVisualStyleBackColor = true; - this.buttonErrorDialogCancel.Click += new System.EventHandler(this.ButtonErrorDialogCancel_Click); - // - // textBoxErrorDialog - // - this.textBoxErrorDialog.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.textBoxErrorDialog.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.textBoxErrorDialog.Location = new System.Drawing.Point(11, 5); - this.textBoxErrorDialog.Margin = new System.Windows.Forms.Padding(13, 13, 5, 13); - this.textBoxErrorDialog.Multiline = true; - this.textBoxErrorDialog.Name = "textBoxErrorDialog"; - this.textBoxErrorDialog.ReadOnly = true; - this.textBoxErrorDialog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.textBoxErrorDialog.Size = new System.Drawing.Size(334, 78); - this.textBoxErrorDialog.TabIndex = 0; - // - // buttonTryAgain - // - this.buttonTryAgain.Location = new System.Drawing.Point(22, 96); - this.buttonTryAgain.Margin = new System.Windows.Forms.Padding(3, 3, 3, 5); - this.buttonTryAgain.Name = "buttonTryAgain"; - this.buttonTryAgain.Size = new System.Drawing.Size(67, 32); - this.buttonTryAgain.TabIndex = 1; - this.buttonTryAgain.Text = "Try Again"; - this.buttonTryAgain.UseVisualStyleBackColor = true; - this.buttonTryAgain.Click += new System.EventHandler(this.ButtonTryAgain_Click); - // - // FormErrorDialog - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.AutoSize = true; - this.ClientSize = new System.Drawing.Size(344, 143); - this.ControlBox = false; - this.Controls.Add(this.buttonTryAgain); - this.Controls.Add(this.textBoxErrorDialog); - this.Controls.Add(this.buttonErrorDialogCancel); - this.Controls.Add(this.buttonErrorDialogIgnore); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "FormErrorDialog"; - this.ShowIcon = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Error"; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Button buttonErrorDialogIgnore; - private System.Windows.Forms.Button buttonErrorDialogCancel; - private System.Windows.Forms.TextBox textBoxErrorDialog; - private System.Windows.Forms.Button buttonTryAgain; - } -} \ No newline at end of file diff --git a/BackupHelper/FormErrorDialog.cs b/BackupHelper/FormErrorDialog.cs deleted file mode 100644 index 3ffd392..0000000 --- a/BackupHelper/FormErrorDialog.cs +++ /dev/null @@ -1,48 +0,0 @@ -using FileControlUtility; -using System; -using System.Windows.Forms; - -namespace BackupHelper -{ - public partial class FormErrorDialog : Form - { - private readonly Type ActionType; - public object Result; - - public FormErrorDialog(Type actionType, string message) - { - InitializeComponent(); - textBoxErrorDialog.Text = message; - textBoxErrorDialog.TabStop = false; - ActionType = actionType; - if (actionType == typeof(FileTransferErrorActionNonRepeatable)) - buttonTryAgain.Enabled = false; - } - - private void ButtonErrorDialogIgnore_Click(object sender, EventArgs e) - { - if (ActionType == typeof(FileTransferErrorActionRepeatable)) - Result = FileTransferErrorActionRepeatable.SKIP; - if (ActionType == typeof(FileTransferErrorActionNonRepeatable)) - Result = FileTransferErrorActionNonRepeatable.SKIP; - - Close(); - } - - private void ButtonErrorDialogCancel_Click(object sender, EventArgs e) - { - if (ActionType == typeof(FileTransferErrorActionRepeatable)) - Result = FileTransferErrorActionRepeatable.CANCEL; - if (ActionType == typeof(FileTransferErrorActionNonRepeatable)) - Result = FileTransferErrorActionNonRepeatable.CANCEL; - - Close(); - } - - private void ButtonTryAgain_Click(object sender, EventArgs e) - { - Result = FileTransferErrorActionRepeatable.REPEAT; - Close(); - } - } -} diff --git a/BackupHelper/FormOptionsMenu.Designer.cs b/BackupHelper/FormOptionsMenu.Designer.cs deleted file mode 100644 index 963e028..0000000 --- a/BackupHelper/FormOptionsMenu.Designer.cs +++ /dev/null @@ -1,341 +0,0 @@ -using System.Windows.Forms; - -namespace BackupHelper -{ - partial class FormOptionsMenu - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.buttonAddOption = new System.Windows.Forms.Button(); - this.listViewOptions = new System.Windows.Forms.ListView(); - this.columnHeaderSourcePath = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeaderDestinyPath = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeaderMethod = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeaderMoveSubfolders = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeaderKeepOrigin = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeaderCleanDestinyDir = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeaderDeleteUncommonFiles = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeaderReorganizeFiles = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.contextMenuStripOptionsList = new System.Windows.Forms.ContextMenuStrip(this.components); - this.cloneOptionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolStripMenuItemRemove = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripMenuItemCopySourcePath = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripMenuItemCopyDestinyPath = new System.Windows.Forms.ToolStripMenuItem(); - this.openSourceFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.openDestinyFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.buttonExecute = new System.Windows.Forms.Button(); - this.progressBarOptions = new System.Windows.Forms.ProgressBar(); - this.buttonCancel = new System.Windows.Forms.Button(); - this.labelTransfering = new System.Windows.Forms.Label(); - this.textBoxTransfering = new System.Windows.Forms.TextBox(); - this.buttonShowResult = new System.Windows.Forms.Button(); - this.checkBoxShowResult = new System.Windows.Forms.CheckBox(); - this.contextMenuStripOptionsList.SuspendLayout(); - this.SuspendLayout(); - // - // buttonAddOption - // - this.buttonAddOption.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.buttonAddOption.Location = new System.Drawing.Point(1, 224); - this.buttonAddOption.Name = "buttonAddOption"; - this.buttonAddOption.Size = new System.Drawing.Size(95, 30); - this.buttonAddOption.TabIndex = 1; - this.buttonAddOption.Text = "Add Option"; - this.buttonAddOption.UseVisualStyleBackColor = true; - this.buttonAddOption.Click += new System.EventHandler(this.ButtonAddOption_Click); - // - // listViewOptions - // - this.listViewOptions.AllowDrop = true; - this.listViewOptions.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.listViewOptions.BackColor = System.Drawing.SystemColors.Window; - this.listViewOptions.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeaderSourcePath, - this.columnHeaderDestinyPath, - this.columnHeaderMethod, - this.columnHeaderMoveSubfolders, - this.columnHeaderKeepOrigin, - this.columnHeaderCleanDestinyDir, - this.columnHeaderDeleteUncommonFiles, - this.columnHeaderReorganizeFiles}); - this.listViewOptions.ContextMenuStrip = this.contextMenuStripOptionsList; - this.listViewOptions.FullRowSelect = true; - this.listViewOptions.GridLines = true; - this.listViewOptions.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; - this.listViewOptions.HideSelection = false; - this.listViewOptions.Location = new System.Drawing.Point(0, 0); - this.listViewOptions.Name = "listViewOptions"; - this.listViewOptions.ShowItemToolTips = true; - this.listViewOptions.Size = new System.Drawing.Size(1163, 224); - this.listViewOptions.TabIndex = 0; - this.listViewOptions.UseCompatibleStateImageBehavior = false; - this.listViewOptions.View = System.Windows.Forms.View.Details; - this.listViewOptions.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ListViewOptions_KeyPress); - // - // columnHeaderSourcePath - // - this.columnHeaderSourcePath.Text = "Source Path"; - this.columnHeaderSourcePath.Width = 290; - // - // columnHeaderDestinyPath - // - this.columnHeaderDestinyPath.Text = "Destiny Path"; - this.columnHeaderDestinyPath.Width = 290; - // - // columnHeaderMethod - // - this.columnHeaderMethod.Text = "Filename Conflict Opt."; - this.columnHeaderMethod.Width = 175; - // - // columnHeaderMoveSubfolders - // - this.columnHeaderMoveSubfolders.Text = "Move Subfolders"; - this.columnHeaderMoveSubfolders.Width = 80; - // - // columnHeaderKeepOrigin - // - this.columnHeaderKeepOrigin.Text = "Keep Origin Files"; - this.columnHeaderKeepOrigin.Width = 80; - // - // columnHeaderCleanDestinyDir - // - this.columnHeaderCleanDestinyDir.Text = "Clean Dest. Dir."; - this.columnHeaderCleanDestinyDir.Width = 80; - // - // columnHeaderDeleteUncommonFiles - // - this.columnHeaderDeleteUncommonFiles.Text = "Del. Uncommon Files"; - this.columnHeaderDeleteUncommonFiles.Width = 80; - // - // columnHeaderReorganizeFiles - // - this.columnHeaderReorganizeFiles.Text = "Reorg. renamed files"; - this.columnHeaderReorganizeFiles.Width = 80; - // - // contextMenuStripOptionsList - // - this.contextMenuStripOptionsList.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.cloneOptionToolStripMenuItem, - this.ToolStripMenuItemRemove, - this.toolStripMenuItemCopySourcePath, - this.toolStripMenuItemCopyDestinyPath, - this.openSourceFolderToolStripMenuItem, - this.openDestinyFolderToolStripMenuItem}); - this.contextMenuStripOptionsList.Name = "contextMenuStrip1"; - this.contextMenuStripOptionsList.Size = new System.Drawing.Size(179, 136); - this.contextMenuStripOptionsList.Opening += new System.ComponentModel.CancelEventHandler(this.ContextMenuStripOptionsList_Opening); - // - // cloneOptionToolStripMenuItem - // - this.cloneOptionToolStripMenuItem.Name = "cloneOptionToolStripMenuItem"; - this.cloneOptionToolStripMenuItem.Size = new System.Drawing.Size(178, 22); - this.cloneOptionToolStripMenuItem.Text = "Clone"; - this.cloneOptionToolStripMenuItem.Click += new System.EventHandler(this.CloneOptionToolStripMenuItem_Click); - // - // ToolStripMenuItemRemove - // - this.ToolStripMenuItemRemove.Name = "ToolStripMenuItemRemove"; - this.ToolStripMenuItemRemove.Size = new System.Drawing.Size(178, 22); - this.ToolStripMenuItemRemove.Text = "Remove"; - this.ToolStripMenuItemRemove.Click += new System.EventHandler(this.ToolStripMenuItemRemove_Click); - // - // toolStripMenuItemCopySourcePath - // - this.toolStripMenuItemCopySourcePath.Name = "toolStripMenuItemCopySourcePath"; - this.toolStripMenuItemCopySourcePath.Size = new System.Drawing.Size(178, 22); - this.toolStripMenuItemCopySourcePath.Text = "Copy source path"; - this.toolStripMenuItemCopySourcePath.Click += new System.EventHandler(this.ToolStripMenuItemCopySourcePath_Click); - // - // toolStripMenuItemCopyDestinyPath - // - this.toolStripMenuItemCopyDestinyPath.Name = "toolStripMenuItemCopyDestinyPath"; - this.toolStripMenuItemCopyDestinyPath.Size = new System.Drawing.Size(178, 22); - this.toolStripMenuItemCopyDestinyPath.Text = "Copy destiny path"; - this.toolStripMenuItemCopyDestinyPath.Click += new System.EventHandler(this.ToolStripMenuItemCopyDestinyPath_Click); - // - // openSourceFolderToolStripMenuItem - // - this.openSourceFolderToolStripMenuItem.Name = "openSourceFolderToolStripMenuItem"; - this.openSourceFolderToolStripMenuItem.Size = new System.Drawing.Size(178, 22); - this.openSourceFolderToolStripMenuItem.Text = "Open source folder"; - this.openSourceFolderToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItemOpenSourceFolder_Click); - // - // openDestinyFolderToolStripMenuItem - // - this.openDestinyFolderToolStripMenuItem.Name = "openDestinyFolderToolStripMenuItem"; - this.openDestinyFolderToolStripMenuItem.Size = new System.Drawing.Size(178, 22); - this.openDestinyFolderToolStripMenuItem.Text = "Open destiny folder"; - this.openDestinyFolderToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItemOpenDestinyFolder_Click); - // - // buttonExecute - // - this.buttonExecute.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.buttonExecute.BackColor = System.Drawing.Color.White; - this.buttonExecute.FlatAppearance.BorderColor = System.Drawing.Color.Red; - this.buttonExecute.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); - this.buttonExecute.Location = new System.Drawing.Point(95, 224); - this.buttonExecute.Name = "buttonExecute"; - this.buttonExecute.Size = new System.Drawing.Size(95, 30); - this.buttonExecute.TabIndex = 4; - this.buttonExecute.Text = "Execute"; - this.buttonExecute.UseVisualStyleBackColor = false; - this.buttonExecute.Click += new System.EventHandler(this.ButtonExecute_Click); - // - // progressBarOptions - // - this.progressBarOptions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.progressBarOptions.Enabled = false; - this.progressBarOptions.Location = new System.Drawing.Point(0, 254); - this.progressBarOptions.Maximum = 10000; - this.progressBarOptions.Name = "progressBarOptions"; - this.progressBarOptions.Size = new System.Drawing.Size(1163, 12); - this.progressBarOptions.TabIndex = 4; - // - // buttonCancel - // - this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonCancel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192))))); - this.buttonCancel.FlatAppearance.BorderColor = System.Drawing.Color.Red; - this.buttonCancel.FlatAppearance.BorderSize = 2; - this.buttonCancel.ForeColor = System.Drawing.Color.White; - this.buttonCancel.Location = new System.Drawing.Point(1068, 224); - this.buttonCancel.Name = "buttonCancel"; - this.buttonCancel.Size = new System.Drawing.Size(95, 30); - this.buttonCancel.TabIndex = 8; - this.buttonCancel.Text = "CANCEL"; - this.buttonCancel.UseVisualStyleBackColor = false; - this.buttonCancel.Visible = false; - this.buttonCancel.Click += new System.EventHandler(this.ButtonCancel_Click); - // - // labelTransfering - // - this.labelTransfering.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.labelTransfering.AutoSize = true; - this.labelTransfering.Location = new System.Drawing.Point(12, 233); - this.labelTransfering.Name = "labelTransfering"; - this.labelTransfering.Size = new System.Drawing.Size(63, 13); - this.labelTransfering.TabIndex = 6; - this.labelTransfering.Text = "Transfering:"; - this.labelTransfering.Visible = false; - // - // textBoxTransfering - // - this.textBoxTransfering.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.textBoxTransfering.BackColor = System.Drawing.SystemColors.Control; - this.textBoxTransfering.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.textBoxTransfering.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.textBoxTransfering.Location = new System.Drawing.Point(85, 233); - this.textBoxTransfering.Name = "textBoxTransfering"; - this.textBoxTransfering.ReadOnly = true; - this.textBoxTransfering.Size = new System.Drawing.Size(964, 13); - this.textBoxTransfering.TabIndex = 7; - this.textBoxTransfering.Visible = false; - // - // buttonShowResult - // - this.buttonShowResult.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonShowResult.Enabled = false; - this.buttonShowResult.Location = new System.Drawing.Point(1054, 224); - this.buttonShowResult.Name = "buttonShowResult"; - this.buttonShowResult.Size = new System.Drawing.Size(108, 30); - this.buttonShowResult.TabIndex = 8; - this.buttonShowResult.Text = "Show Last Result"; - this.buttonShowResult.UseVisualStyleBackColor = true; - this.buttonShowResult.Click += new System.EventHandler(this.ButtonShowResult_Click); - // - // checkBoxShowResult - // - this.checkBoxShowResult.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.checkBoxShowResult.AutoSize = true; - this.checkBoxShowResult.Checked = true; - this.checkBoxShowResult.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBoxShowResult.Location = new System.Drawing.Point(912, 232); - this.checkBoxShowResult.Name = "checkBoxShowResult"; - this.checkBoxShowResult.Size = new System.Drawing.Size(137, 17); - this.checkBoxShowResult.TabIndex = 7; - this.checkBoxShowResult.Text = "Show result when done"; - this.checkBoxShowResult.UseVisualStyleBackColor = true; - // - // FormOptionsMenu - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.SystemColors.Control; - this.ClientSize = new System.Drawing.Size(1163, 261); - this.Controls.Add(this.checkBoxShowResult); - this.Controls.Add(this.textBoxTransfering); - this.Controls.Add(this.labelTransfering); - this.Controls.Add(this.progressBarOptions); - this.Controls.Add(this.buttonExecute); - this.Controls.Add(this.listViewOptions); - this.Controls.Add(this.buttonAddOption); - this.Controls.Add(this.buttonShowResult); - this.Controls.Add(this.buttonCancel); - this.Name = "FormOptionsMenu"; - this.ShowIcon = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Options - Backup Helper"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormOptionsMenu_FormClosing); - this.contextMenuStripOptionsList.ResumeLayout(false); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Button buttonAddOption; - private System.Windows.Forms.ColumnHeader columnHeaderSourcePath; - private System.Windows.Forms.ColumnHeader columnHeaderDestinyPath; - private System.Windows.Forms.ColumnHeader columnHeaderMethod; - private System.Windows.Forms.ColumnHeader columnHeaderMoveSubfolders; - private System.Windows.Forms.ColumnHeader columnHeaderKeepOrigin; - private System.Windows.Forms.Button buttonExecute; - private System.Windows.Forms.ProgressBar progressBarOptions; - private System.Windows.Forms.Button buttonCancel; - private System.Windows.Forms.Label labelTransfering; - private System.Windows.Forms.TextBox textBoxTransfering; - private System.Windows.Forms.ColumnHeader columnHeaderCleanDestinyDir; - private System.Windows.Forms.ContextMenuStrip contextMenuStripOptionsList; - private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemCopySourcePath; - private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemCopyDestinyPath; - private System.Windows.Forms.Button buttonShowResult; - private System.Windows.Forms.CheckBox checkBoxShowResult; - private System.Windows.Forms.ToolStripMenuItem openSourceFolderToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem openDestinyFolderToolStripMenuItem; - private System.Windows.Forms.ColumnHeader columnHeaderDeleteUncommonFiles; - private System.Windows.Forms.ToolStripMenuItem cloneOptionToolStripMenuItem; - public ListView listViewOptions; - private ToolStripMenuItem ToolStripMenuItemRemove; - private ColumnHeader columnHeaderReorganizeFiles; - } -} \ No newline at end of file diff --git a/BackupHelper/FormProfileMenu.Designer.cs b/BackupHelper/FormProfileMenu.Designer.cs deleted file mode 100644 index a5aa310..0000000 --- a/BackupHelper/FormProfileMenu.Designer.cs +++ /dev/null @@ -1,212 +0,0 @@ -namespace BackupHelper -{ - partial class FormProfileMenu - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.listViewProfile = new System.Windows.Forms.ListView(); - this.columnHeaderProfileName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeaderLastTimeExecuted = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeaderProfileLastTimeModified = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeaderProfileTimeCreated = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.contextMenuStripProfile = new System.Windows.Forms.ContextMenuStrip(this.components); - this.toolStripMenuItemChangeName = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripMenuItemClone = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripMenuItemGroup = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripMenuItemGenerateShortcut = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripMenuItemDeleteProfile = new System.Windows.Forms.ToolStripMenuItem(); - this.buttonAddProfile = new System.Windows.Forms.Button(); - this.buttonOpenLogFile = new System.Windows.Forms.Button(); - this.labelVersion = new System.Windows.Forms.Label(); - this.saveFileDialogShortcut = new System.Windows.Forms.SaveFileDialog(); - this.contextMenuStripProfile.SuspendLayout(); - this.SuspendLayout(); - // - // listViewProfile - // - this.listViewProfile.AllowDrop = true; - this.listViewProfile.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.listViewProfile.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeaderProfileName, - this.columnHeaderLastTimeExecuted, - this.columnHeaderProfileLastTimeModified, - this.columnHeaderProfileTimeCreated}); - this.listViewProfile.ContextMenuStrip = this.contextMenuStripProfile; - this.listViewProfile.FullRowSelect = true; - this.listViewProfile.GridLines = true; - this.listViewProfile.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; - this.listViewProfile.HideSelection = false; - this.listViewProfile.Location = new System.Drawing.Point(0, 0); - this.listViewProfile.Name = "listViewProfile"; - this.listViewProfile.ShowItemToolTips = true; - this.listViewProfile.Size = new System.Drawing.Size(698, 324); - this.listViewProfile.TabIndex = 0; - this.listViewProfile.UseCompatibleStateImageBehavior = false; - this.listViewProfile.View = System.Windows.Forms.View.Details; - this.listViewProfile.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ListViewProfile_KeyDown); - // - // columnHeaderProfileName - // - this.columnHeaderProfileName.Text = "Profile Name"; - this.columnHeaderProfileName.Width = 363; - // - // columnHeaderLastTimeExecuted - // - this.columnHeaderLastTimeExecuted.Text = "Time Executed"; - this.columnHeaderLastTimeExecuted.Width = 110; - // - // columnHeaderProfileLastTimeModified - // - this.columnHeaderProfileLastTimeModified.Text = "Time Modified"; - this.columnHeaderProfileLastTimeModified.Width = 110; - // - // columnHeaderProfileTimeCreated - // - this.columnHeaderProfileTimeCreated.Text = "Created At"; - this.columnHeaderProfileTimeCreated.Width = 110; - // - // contextMenuStripProfile - // - this.contextMenuStripProfile.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.toolStripMenuItemChangeName, - this.toolStripMenuItemClone, - this.toolStripMenuItemGroup, - this.toolStripMenuItemGenerateShortcut, - this.toolStripMenuItemDeleteProfile}); - this.contextMenuStripProfile.Name = "contextMenuStripProfile"; - this.contextMenuStripProfile.Size = new System.Drawing.Size(181, 136); - // - // toolStripMenuItemChangeName - // - this.toolStripMenuItemChangeName.Name = "toolStripMenuItemChangeName"; - this.toolStripMenuItemChangeName.Size = new System.Drawing.Size(168, 22); - this.toolStripMenuItemChangeName.Text = "Change name"; - this.toolStripMenuItemChangeName.Click += new System.EventHandler(this.ToolStripMenuItemChangeName_Click); - // - // toolStripMenuItemClone - // - this.toolStripMenuItemClone.Name = "toolStripMenuItemClone"; - this.toolStripMenuItemClone.Size = new System.Drawing.Size(168, 22); - this.toolStripMenuItemClone.Text = "Clone"; - this.toolStripMenuItemClone.Click += new System.EventHandler(this.ToolStripMenuItemClone_Click); - // - // toolStripMenuItemGroup - // - this.toolStripMenuItemGroup.Name = "toolStripMenuItemGroup"; - this.toolStripMenuItemGroup.Size = new System.Drawing.Size(168, 22); - this.toolStripMenuItemGroup.Text = "Group"; - this.toolStripMenuItemGroup.Click += new System.EventHandler(this.ToolStripMenuItemGroup_Click); - // - // toolStripMenuItemGenerateShortcut - // - this.toolStripMenuItemGenerateShortcut.Name = "toolStripMenuItemGenerateShortcut"; - this.toolStripMenuItemGenerateShortcut.Size = new System.Drawing.Size(168, 22); - this.toolStripMenuItemGenerateShortcut.Text = "Generate shortcut"; - this.toolStripMenuItemGenerateShortcut.Click += new System.EventHandler(this.ToolStripMenuItemGenerateShortcut_Click); - // - // toolStripMenuItemDeleteProfile - // - this.toolStripMenuItemDeleteProfile.Name = "toolStripMenuItemDeleteProfile"; - this.toolStripMenuItemDeleteProfile.Size = new System.Drawing.Size(168, 22); - this.toolStripMenuItemDeleteProfile.Text = "Delete"; - this.toolStripMenuItemDeleteProfile.Click += new System.EventHandler(this.ToolStripMenuItemDeleteProfile_Click); - // - // buttonAddProfile - // - this.buttonAddProfile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.buttonAddProfile.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.buttonAddProfile.FlatAppearance.BorderSize = 0; - this.buttonAddProfile.Location = new System.Drawing.Point(0, 324); - this.buttonAddProfile.Name = "buttonAddProfile"; - this.buttonAddProfile.Size = new System.Drawing.Size(100, 30); - this.buttonAddProfile.TabIndex = 2; - this.buttonAddProfile.Text = "Add Profile"; - this.buttonAddProfile.UseVisualStyleBackColor = false; - this.buttonAddProfile.Click += new System.EventHandler(this.ButtonAddProfile_Click); - // - // buttonOpenLogFile - // - this.buttonOpenLogFile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonOpenLogFile.Location = new System.Drawing.Point(598, 324); - this.buttonOpenLogFile.Name = "buttonOpenLogFile"; - this.buttonOpenLogFile.Size = new System.Drawing.Size(100, 30); - this.buttonOpenLogFile.TabIndex = 5; - this.buttonOpenLogFile.Text = "Open Log File"; - this.buttonOpenLogFile.UseVisualStyleBackColor = true; - this.buttonOpenLogFile.Click += new System.EventHandler(this.ButtonOpenLogFile_Click); - // - // labelVersion - // - this.labelVersion.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.labelVersion.AutoSize = true; - this.labelVersion.Font = new System.Drawing.Font("Microsoft Sans Serif", 7F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelVersion.Location = new System.Drawing.Point(116, 332); - this.labelVersion.Name = "labelVersion"; - this.labelVersion.Size = new System.Drawing.Size(0, 13); - this.labelVersion.TabIndex = 10; - // - // FormProfileMenu - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(698, 354); - this.Controls.Add(this.labelVersion); - this.Controls.Add(this.buttonOpenLogFile); - this.Controls.Add(this.buttonAddProfile); - this.Controls.Add(this.listViewProfile); - this.Name = "FormProfileMenu"; - this.ShowIcon = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Profile List - Backup Helper"; - this.contextMenuStripProfile.ResumeLayout(false); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - private System.Windows.Forms.ColumnHeader columnHeaderProfileName; - private System.Windows.Forms.ColumnHeader columnHeaderProfileTimeCreated; - private System.Windows.Forms.Button buttonAddProfile; - private System.Windows.Forms.Button buttonOpenLogFile; - private System.Windows.Forms.ColumnHeader columnHeaderProfileLastTimeModified; - private System.Windows.Forms.ColumnHeader columnHeaderLastTimeExecuted; - private System.Windows.Forms.Label labelVersion; - public System.Windows.Forms.ListView listViewProfile; - private System.Windows.Forms.ContextMenuStrip contextMenuStripProfile; - private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemChangeName; - private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemDeleteProfile; - private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemClone; - private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemGroup; - private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemGenerateShortcut; - private System.Windows.Forms.SaveFileDialog saveFileDialogShortcut; - } -} - diff --git a/BackupHelper/FormReport.Designer.cs b/BackupHelper/FormReport.Designer.cs deleted file mode 100644 index 4656793..0000000 --- a/BackupHelper/FormReport.Designer.cs +++ /dev/null @@ -1,556 +0,0 @@ -using System; -using System.ComponentModel; - -namespace BackupHelper -{ - partial class FormReport - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormReport)); - this.tabPageCreatedDirectories = new System.Windows.Forms.TabPage(); - this.listViewCreatedDirectories = new System.Windows.Forms.ListView(); - this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.contextMenuStripCreatedDirectories = new System.Windows.Forms.ContextMenuStrip(this.components); - this.ToolStripMenuItemCopyDirectoryPath = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolStripMenuItemCopyOriginPath = new System.Windows.Forms.ToolStripMenuItem(); - this.tabPageRenamedFiles = new System.Windows.Forms.TabPage(); - this.listViewRenamedFiles = new System.Windows.Forms.ListView(); - this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.contextMenuStripRenamedFiles = new System.Windows.Forms.ContextMenuStrip(this.components); - this.ToolStripMenuItemCopySourceFilePath4 = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolStripMenuItemCopyDestinyPath4 = new System.Windows.Forms.ToolStripMenuItem(); - this.tabPageReplacedFiles = new System.Windows.Forms.TabPage(); - this.listViewReplacedFiles = new System.Windows.Forms.ListView(); - this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.contextMenuStripReplacedFiles = new System.Windows.Forms.ContextMenuStrip(this.components); - this.ToolStripMenuItemCopySourceFilePath3 = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolStripMenuItemCopyDestinyPath3 = new System.Windows.Forms.ToolStripMenuItem(); - this.tabPageNotTransfered = new System.Windows.Forms.TabPage(); - this.listViewNotTransferedFiles = new System.Windows.Forms.ListView(); - this.columnHeaderNotTransFile = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeaderNotTransDestiny = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeaderNotTransReason = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.contextMenuStripNotTransferedFiles = new System.Windows.Forms.ContextMenuStrip(this.components); - this.ToolStripMenuItemCopySourceFilePath2 = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolStripMenuItemCopyDestinyPath2 = new System.Windows.Forms.ToolStripMenuItem(); - this.tabPageTransfered = new System.Windows.Forms.TabPage(); - this.listViewTransferedFiles = new System.Windows.Forms.ListView(); - this.columnHeaderTransFile = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeaderTransDestiny = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.contextMenuStripTransferedFiles = new System.Windows.Forms.ContextMenuStrip(this.components); - this.ToolStripMenuItemCopySourceFilePath1 = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolStripMenuItemCopyDestinyPath1 = new System.Windows.Forms.ToolStripMenuItem(); - this.tabControlReport = new System.Windows.Forms.TabControl(); - this.tabPageRemovedFilesAndDirectories = new System.Windows.Forms.TabPage(); - this.listViewRemovedFilesAndDirectories = new System.Windows.Forms.ListView(); - this.columnHeaderEntry = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeaderDescription = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.contextMenuStripRemovedFilesAndDirectories = new System.Windows.Forms.ContextMenuStrip(this.components); - this.toolStripMenuItemCopyEntry = new System.Windows.Forms.ToolStripMenuItem(); - this.tabPageCreatedDirectories.SuspendLayout(); - this.contextMenuStripCreatedDirectories.SuspendLayout(); - this.tabPageRenamedFiles.SuspendLayout(); - this.contextMenuStripRenamedFiles.SuspendLayout(); - this.tabPageReplacedFiles.SuspendLayout(); - this.contextMenuStripReplacedFiles.SuspendLayout(); - this.tabPageNotTransfered.SuspendLayout(); - this.contextMenuStripNotTransferedFiles.SuspendLayout(); - this.tabPageTransfered.SuspendLayout(); - this.contextMenuStripTransferedFiles.SuspendLayout(); - this.tabControlReport.SuspendLayout(); - this.tabPageRemovedFilesAndDirectories.SuspendLayout(); - this.contextMenuStripRemovedFilesAndDirectories.SuspendLayout(); - this.SuspendLayout(); - // - // tabPageCreatedDirectories - // - this.tabPageCreatedDirectories.Controls.Add(this.listViewCreatedDirectories); - this.tabPageCreatedDirectories.Location = new System.Drawing.Point(4, 22); - this.tabPageCreatedDirectories.Name = "tabPageCreatedDirectories"; - this.tabPageCreatedDirectories.Padding = new System.Windows.Forms.Padding(3); - this.tabPageCreatedDirectories.Size = new System.Drawing.Size(1102, 317); - this.tabPageCreatedDirectories.TabIndex = 5; - this.tabPageCreatedDirectories.Text = "Created Directories"; - this.tabPageCreatedDirectories.UseVisualStyleBackColor = true; - // - // listViewCreatedDirectories - // - this.listViewCreatedDirectories.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader1, - this.columnHeader2}); - this.listViewCreatedDirectories.ContextMenuStrip = this.contextMenuStripCreatedDirectories; - this.listViewCreatedDirectories.Dock = System.Windows.Forms.DockStyle.Fill; - this.listViewCreatedDirectories.FullRowSelect = true; - this.listViewCreatedDirectories.GridLines = true; - this.listViewCreatedDirectories.HideSelection = false; - this.listViewCreatedDirectories.Location = new System.Drawing.Point(3, 3); - this.listViewCreatedDirectories.Name = "listViewCreatedDirectories"; - this.listViewCreatedDirectories.ShowItemToolTips = true; - this.listViewCreatedDirectories.Size = new System.Drawing.Size(1096, 311); - this.listViewCreatedDirectories.TabIndex = 2; - this.listViewCreatedDirectories.UseCompatibleStateImageBehavior = false; - this.listViewCreatedDirectories.View = System.Windows.Forms.View.Details; - // - // columnHeader1 - // - this.columnHeader1.Text = "Directory"; - this.columnHeader1.Width = 555; - // - // columnHeader2 - // - this.columnHeader2.Text = "Origin"; - this.columnHeader2.Width = 535; - // - // contextMenuStripCreatedDirectories - // - this.contextMenuStripCreatedDirectories.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.ToolStripMenuItemCopyDirectoryPath, - this.ToolStripMenuItemCopyOriginPath}); - this.contextMenuStripCreatedDirectories.Name = "contextMenuStripCreatedDirectories"; - this.contextMenuStripCreatedDirectories.Size = new System.Drawing.Size(214, 48); - this.contextMenuStripCreatedDirectories.Opening += new System.ComponentModel.CancelEventHandler(this.ContextMenuStripCreatedDirectories_Opening); - // - // ToolStripMenuItemCopyDirectoryPath - // - this.ToolStripMenuItemCopyDirectoryPath.Name = "ToolStripMenuItemCopyDirectoryPath"; - this.ToolStripMenuItemCopyDirectoryPath.Size = new System.Drawing.Size(213, 22); - this.ToolStripMenuItemCopyDirectoryPath.Text = "Copy directory path"; - this.ToolStripMenuItemCopyDirectoryPath.Click += new System.EventHandler(this.ToolStripMenuItemCopyDirectoryPath_Click); - // - // ToolStripMenuItemCopyOriginPath - // - this.ToolStripMenuItemCopyOriginPath.Name = "ToolStripMenuItemCopyOriginPath"; - this.ToolStripMenuItemCopyOriginPath.Size = new System.Drawing.Size(213, 22); - this.ToolStripMenuItemCopyOriginPath.Text = "Copy directory origin path"; - this.ToolStripMenuItemCopyOriginPath.Click += new System.EventHandler(this.ToolStripMenuItemCopyOriginPath_Click); - // - // tabPageRenamedFiles - // - this.tabPageRenamedFiles.Controls.Add(this.listViewRenamedFiles); - this.tabPageRenamedFiles.Location = new System.Drawing.Point(4, 22); - this.tabPageRenamedFiles.Name = "tabPageRenamedFiles"; - this.tabPageRenamedFiles.Padding = new System.Windows.Forms.Padding(3); - this.tabPageRenamedFiles.Size = new System.Drawing.Size(1102, 317); - this.tabPageRenamedFiles.TabIndex = 3; - this.tabPageRenamedFiles.Text = "Renamed Files"; - this.tabPageRenamedFiles.UseVisualStyleBackColor = true; - // - // listViewRenamedFiles - // - this.listViewRenamedFiles.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader3, - this.columnHeader4}); - this.listViewRenamedFiles.ContextMenuStrip = this.contextMenuStripRenamedFiles; - this.listViewRenamedFiles.Dock = System.Windows.Forms.DockStyle.Fill; - this.listViewRenamedFiles.FullRowSelect = true; - this.listViewRenamedFiles.GridLines = true; - this.listViewRenamedFiles.HideSelection = false; - this.listViewRenamedFiles.Location = new System.Drawing.Point(3, 3); - this.listViewRenamedFiles.Name = "listViewRenamedFiles"; - this.listViewRenamedFiles.ShowItemToolTips = true; - this.listViewRenamedFiles.Size = new System.Drawing.Size(1096, 311); - this.listViewRenamedFiles.TabIndex = 2; - this.listViewRenamedFiles.UseCompatibleStateImageBehavior = false; - this.listViewRenamedFiles.View = System.Windows.Forms.View.Details; - // - // columnHeader3 - // - this.columnHeader3.Text = "Source File"; - this.columnHeader3.Width = 579; - // - // columnHeader4 - // - this.columnHeader4.Text = "Destiny File"; - this.columnHeader4.Width = 512; - // - // contextMenuStripRenamedFiles - // - this.contextMenuStripRenamedFiles.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.ToolStripMenuItemCopySourceFilePath4, - this.ToolStripMenuItemCopyDestinyPath4}); - this.contextMenuStripRenamedFiles.Name = "contextMenuStripRenamedFiles"; - this.contextMenuStripRenamedFiles.Size = new System.Drawing.Size(187, 48); - this.contextMenuStripRenamedFiles.Opening += new System.ComponentModel.CancelEventHandler(this.ContextMenuStripRenamedFiles_Opening); - // - // ToolStripMenuItemCopySourceFilePath4 - // - this.ToolStripMenuItemCopySourceFilePath4.Name = "ToolStripMenuItemCopySourceFilePath4"; - this.ToolStripMenuItemCopySourceFilePath4.Size = new System.Drawing.Size(186, 22); - this.ToolStripMenuItemCopySourceFilePath4.Text = "Copy source file path"; - this.ToolStripMenuItemCopySourceFilePath4.Click += new System.EventHandler(this.ToolStripMenuItemCopySourceFilePath4_Click); - // - // ToolStripMenuItemCopyDestinyPath4 - // - this.ToolStripMenuItemCopyDestinyPath4.Name = "ToolStripMenuItemCopyDestinyPath4"; - this.ToolStripMenuItemCopyDestinyPath4.Size = new System.Drawing.Size(186, 22); - this.ToolStripMenuItemCopyDestinyPath4.Text = "Copy destiny path"; - this.ToolStripMenuItemCopyDestinyPath4.Click += new System.EventHandler(this.ToolStripMenuItemCopyDestinyPath4_Click); - // - // tabPageReplacedFiles - // - this.tabPageReplacedFiles.Controls.Add(this.listViewReplacedFiles); - this.tabPageReplacedFiles.Location = new System.Drawing.Point(4, 22); - this.tabPageReplacedFiles.Name = "tabPageReplacedFiles"; - this.tabPageReplacedFiles.Padding = new System.Windows.Forms.Padding(3); - this.tabPageReplacedFiles.Size = new System.Drawing.Size(1102, 317); - this.tabPageReplacedFiles.TabIndex = 2; - this.tabPageReplacedFiles.Text = "Replaced Files"; - this.tabPageReplacedFiles.UseVisualStyleBackColor = true; - // - // listViewReplacedFiles - // - this.listViewReplacedFiles.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader5, - this.columnHeader6}); - this.listViewReplacedFiles.ContextMenuStrip = this.contextMenuStripReplacedFiles; - this.listViewReplacedFiles.Dock = System.Windows.Forms.DockStyle.Fill; - this.listViewReplacedFiles.FullRowSelect = true; - this.listViewReplacedFiles.GridLines = true; - this.listViewReplacedFiles.HideSelection = false; - this.listViewReplacedFiles.Location = new System.Drawing.Point(3, 3); - this.listViewReplacedFiles.Name = "listViewReplacedFiles"; - this.listViewReplacedFiles.ShowItemToolTips = true; - this.listViewReplacedFiles.Size = new System.Drawing.Size(1096, 311); - this.listViewReplacedFiles.TabIndex = 3; - this.listViewReplacedFiles.UseCompatibleStateImageBehavior = false; - this.listViewReplacedFiles.View = System.Windows.Forms.View.Details; - // - // columnHeader5 - // - this.columnHeader5.Text = "Source File"; - this.columnHeader5.Width = 550; - // - // columnHeader6 - // - this.columnHeader6.Text = "Destiny"; - this.columnHeader6.Width = 538; - // - // contextMenuStripReplacedFiles - // - this.contextMenuStripReplacedFiles.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.ToolStripMenuItemCopySourceFilePath3, - this.ToolStripMenuItemCopyDestinyPath3}); - this.contextMenuStripReplacedFiles.Name = "contextMenuStripReplacedFiles"; - this.contextMenuStripReplacedFiles.Size = new System.Drawing.Size(187, 48); - this.contextMenuStripReplacedFiles.Opening += new System.ComponentModel.CancelEventHandler(this.ContextMenuStripReplacedFiles_Opening); - // - // ToolStripMenuItemCopySourceFilePath3 - // - this.ToolStripMenuItemCopySourceFilePath3.Name = "ToolStripMenuItemCopySourceFilePath3"; - this.ToolStripMenuItemCopySourceFilePath3.Size = new System.Drawing.Size(186, 22); - this.ToolStripMenuItemCopySourceFilePath3.Text = "Copy source file path"; - this.ToolStripMenuItemCopySourceFilePath3.Click += new System.EventHandler(this.ToolStripMenuItemCopySourceFilePath3_Click); - // - // ToolStripMenuItemCopyDestinyPath3 - // - this.ToolStripMenuItemCopyDestinyPath3.Name = "ToolStripMenuItemCopyDestinyPath3"; - this.ToolStripMenuItemCopyDestinyPath3.Size = new System.Drawing.Size(186, 22); - this.ToolStripMenuItemCopyDestinyPath3.Text = "Copy destiny path"; - this.ToolStripMenuItemCopyDestinyPath3.Click += new System.EventHandler(this.ToolStripMenuItemCopyDestinyPath3_Click); - // - // tabPageNotTransfered - // - this.tabPageNotTransfered.Controls.Add(this.listViewNotTransferedFiles); - this.tabPageNotTransfered.Location = new System.Drawing.Point(4, 22); - this.tabPageNotTransfered.Name = "tabPageNotTransfered"; - this.tabPageNotTransfered.Padding = new System.Windows.Forms.Padding(3); - this.tabPageNotTransfered.Size = new System.Drawing.Size(1102, 317); - this.tabPageNotTransfered.TabIndex = 1; - this.tabPageNotTransfered.Text = "Not Transfered"; - this.tabPageNotTransfered.UseVisualStyleBackColor = true; - // - // listViewNotTransferedFiles - // - this.listViewNotTransferedFiles.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeaderNotTransFile, - this.columnHeaderNotTransDestiny, - this.columnHeaderNotTransReason}); - this.listViewNotTransferedFiles.ContextMenuStrip = this.contextMenuStripNotTransferedFiles; - this.listViewNotTransferedFiles.Dock = System.Windows.Forms.DockStyle.Fill; - this.listViewNotTransferedFiles.FullRowSelect = true; - this.listViewNotTransferedFiles.GridLines = true; - this.listViewNotTransferedFiles.HideSelection = false; - this.listViewNotTransferedFiles.Location = new System.Drawing.Point(3, 3); - this.listViewNotTransferedFiles.Name = "listViewNotTransferedFiles"; - this.listViewNotTransferedFiles.ShowItemToolTips = true; - this.listViewNotTransferedFiles.Size = new System.Drawing.Size(1096, 311); - this.listViewNotTransferedFiles.TabIndex = 1; - this.listViewNotTransferedFiles.UseCompatibleStateImageBehavior = false; - this.listViewNotTransferedFiles.View = System.Windows.Forms.View.Details; - // - // columnHeaderNotTransFile - // - this.columnHeaderNotTransFile.Text = "Source File"; - this.columnHeaderNotTransFile.Width = 537; - // - // columnHeaderNotTransDestiny - // - this.columnHeaderNotTransDestiny.Text = "Destiny Folder"; - this.columnHeaderNotTransDestiny.Width = 390; - // - // columnHeaderNotTransReason - // - this.columnHeaderNotTransReason.Text = "Reason"; - this.columnHeaderNotTransReason.Width = 269; - // - // contextMenuStripNotTransferedFiles - // - this.contextMenuStripNotTransferedFiles.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.ToolStripMenuItemCopySourceFilePath2, - this.ToolStripMenuItemCopyDestinyPath2}); - this.contextMenuStripNotTransferedFiles.Name = "contextMenuStripNotTransferedFiles"; - this.contextMenuStripNotTransferedFiles.Size = new System.Drawing.Size(187, 48); - this.contextMenuStripNotTransferedFiles.Opening += new System.ComponentModel.CancelEventHandler(this.ContextMenuStripNotTransferedFiles_Opening); - // - // ToolStripMenuItemCopySourceFilePath2 - // - this.ToolStripMenuItemCopySourceFilePath2.Name = "ToolStripMenuItemCopySourceFilePath2"; - this.ToolStripMenuItemCopySourceFilePath2.Size = new System.Drawing.Size(186, 22); - this.ToolStripMenuItemCopySourceFilePath2.Text = "Copy source file path"; - this.ToolStripMenuItemCopySourceFilePath2.Click += new System.EventHandler(this.ToolStripMenuItemCopySourceFilePath2_Click); - // - // ToolStripMenuItemCopyDestinyPath2 - // - this.ToolStripMenuItemCopyDestinyPath2.Name = "ToolStripMenuItemCopyDestinyPath2"; - this.ToolStripMenuItemCopyDestinyPath2.Size = new System.Drawing.Size(186, 22); - this.ToolStripMenuItemCopyDestinyPath2.Text = "Copy destiny path"; - this.ToolStripMenuItemCopyDestinyPath2.Click += new System.EventHandler(this.ToolStripMenuItemCopyDestinyPath2_Click); - // - // tabPageTransfered - // - this.tabPageTransfered.Controls.Add(this.listViewTransferedFiles); - this.tabPageTransfered.Location = new System.Drawing.Point(4, 22); - this.tabPageTransfered.Name = "tabPageTransfered"; - this.tabPageTransfered.Padding = new System.Windows.Forms.Padding(3); - this.tabPageTransfered.Size = new System.Drawing.Size(1102, 317); - this.tabPageTransfered.TabIndex = 0; - this.tabPageTransfered.Text = "Transfered Files"; - this.tabPageTransfered.UseVisualStyleBackColor = true; - // - // listViewTransferedFiles - // - this.listViewTransferedFiles.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeaderTransFile, - this.columnHeaderTransDestiny}); - this.listViewTransferedFiles.ContextMenuStrip = this.contextMenuStripTransferedFiles; - this.listViewTransferedFiles.Dock = System.Windows.Forms.DockStyle.Fill; - this.listViewTransferedFiles.FullRowSelect = true; - this.listViewTransferedFiles.GridLines = true; - this.listViewTransferedFiles.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; - this.listViewTransferedFiles.HideSelection = false; - this.listViewTransferedFiles.Location = new System.Drawing.Point(3, 3); - this.listViewTransferedFiles.Name = "listViewTransferedFiles"; - this.listViewTransferedFiles.ShowItemToolTips = true; - this.listViewTransferedFiles.Size = new System.Drawing.Size(1096, 311); - this.listViewTransferedFiles.TabIndex = 0; - this.listViewTransferedFiles.UseCompatibleStateImageBehavior = false; - this.listViewTransferedFiles.View = System.Windows.Forms.View.Details; - // - // columnHeaderTransFile - // - this.columnHeaderTransFile.Text = "Source File"; - this.columnHeaderTransFile.Width = 538; - // - // columnHeaderTransDestiny - // - this.columnHeaderTransDestiny.Text = "Destiny Folder"; - this.columnHeaderTransDestiny.Width = 550; - // - // contextMenuStripTransferedFiles - // - this.contextMenuStripTransferedFiles.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.ToolStripMenuItemCopySourceFilePath1, - this.ToolStripMenuItemCopyDestinyPath1}); - this.contextMenuStripTransferedFiles.Name = "contextMenuStrip1"; - this.contextMenuStripTransferedFiles.Size = new System.Drawing.Size(187, 48); - this.contextMenuStripTransferedFiles.Opening += new System.ComponentModel.CancelEventHandler(this.ContextMenuStripTransferedFiles_Opening); - // - // ToolStripMenuItemCopySourceFilePath1 - // - this.ToolStripMenuItemCopySourceFilePath1.Name = "ToolStripMenuItemCopySourceFilePath1"; - this.ToolStripMenuItemCopySourceFilePath1.Size = new System.Drawing.Size(186, 22); - this.ToolStripMenuItemCopySourceFilePath1.Text = "Copy source file path"; - this.ToolStripMenuItemCopySourceFilePath1.Click += new System.EventHandler(this.ToolStripMenuItemCopySourceFilePath1_Click); - // - // ToolStripMenuItemCopyDestinyPath1 - // - this.ToolStripMenuItemCopyDestinyPath1.Name = "ToolStripMenuItemCopyDestinyPath1"; - this.ToolStripMenuItemCopyDestinyPath1.Size = new System.Drawing.Size(186, 22); - this.ToolStripMenuItemCopyDestinyPath1.Text = "Copy destiny path"; - this.ToolStripMenuItemCopyDestinyPath1.Click += new System.EventHandler(this.ToolStripMenuItemCopyDestinyPath1_Click); - // - // tabControlReport - // - this.tabControlReport.Controls.Add(this.tabPageTransfered); - this.tabControlReport.Controls.Add(this.tabPageNotTransfered); - this.tabControlReport.Controls.Add(this.tabPageReplacedFiles); - this.tabControlReport.Controls.Add(this.tabPageRenamedFiles); - this.tabControlReport.Controls.Add(this.tabPageCreatedDirectories); - this.tabControlReport.Controls.Add(this.tabPageRemovedFilesAndDirectories); - this.tabControlReport.Dock = System.Windows.Forms.DockStyle.Fill; - this.tabControlReport.Location = new System.Drawing.Point(0, 0); - this.tabControlReport.Name = "tabControlReport"; - this.tabControlReport.SelectedIndex = 0; - this.tabControlReport.ShowToolTips = true; - this.tabControlReport.Size = new System.Drawing.Size(1110, 343); - this.tabControlReport.TabIndex = 1; - // - // tabPageRemovedFilesAndDirectories - // - this.tabPageRemovedFilesAndDirectories.Controls.Add(this.listViewRemovedFilesAndDirectories); - this.tabPageRemovedFilesAndDirectories.Location = new System.Drawing.Point(4, 22); - this.tabPageRemovedFilesAndDirectories.Name = "tabPageRemovedFilesAndDirectories"; - this.tabPageRemovedFilesAndDirectories.Padding = new System.Windows.Forms.Padding(3); - this.tabPageRemovedFilesAndDirectories.Size = new System.Drawing.Size(1102, 317); - this.tabPageRemovedFilesAndDirectories.TabIndex = 6; - this.tabPageRemovedFilesAndDirectories.Text = "Removed Files/Directories"; - this.tabPageRemovedFilesAndDirectories.UseVisualStyleBackColor = true; - // - // listViewRemovedFilesAndDirectories - // - this.listViewRemovedFilesAndDirectories.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeaderEntry, - this.columnHeaderDescription}); - this.listViewRemovedFilesAndDirectories.ContextMenuStrip = this.contextMenuStripRemovedFilesAndDirectories; - this.listViewRemovedFilesAndDirectories.Dock = System.Windows.Forms.DockStyle.Fill; - this.listViewRemovedFilesAndDirectories.FullRowSelect = true; - this.listViewRemovedFilesAndDirectories.GridLines = true; - this.listViewRemovedFilesAndDirectories.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; - this.listViewRemovedFilesAndDirectories.HideSelection = false; - this.listViewRemovedFilesAndDirectories.Location = new System.Drawing.Point(3, 3); - this.listViewRemovedFilesAndDirectories.Name = "listViewRemovedFilesAndDirectories"; - this.listViewRemovedFilesAndDirectories.ShowItemToolTips = true; - this.listViewRemovedFilesAndDirectories.Size = new System.Drawing.Size(1096, 311); - this.listViewRemovedFilesAndDirectories.TabIndex = 0; - this.listViewRemovedFilesAndDirectories.UseCompatibleStateImageBehavior = false; - this.listViewRemovedFilesAndDirectories.View = System.Windows.Forms.View.Details; - // - // columnHeaderEntry - // - this.columnHeaderEntry.Text = "Entry"; - this.columnHeaderEntry.Width = 555; - // - // columnHeaderDescription - // - this.columnHeaderDescription.Text = "Description"; - this.columnHeaderDescription.Width = 535; - // - // contextMenuStripRemovedFilesAndDirectories - // - this.contextMenuStripRemovedFilesAndDirectories.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.toolStripMenuItemCopyEntry}); - this.contextMenuStripRemovedFilesAndDirectories.Name = "contextMenuStripCreatedDirectories"; - this.contextMenuStripRemovedFilesAndDirectories.Size = new System.Drawing.Size(133, 26); - this.contextMenuStripRemovedFilesAndDirectories.Opening += new System.ComponentModel.CancelEventHandler(this.ContextMenuStripRemovedFilesAndDirectories_Opening); - // - // toolStripMenuItemCopyEntry - // - this.toolStripMenuItemCopyEntry.Name = "toolStripMenuItemCopyEntry"; - this.toolStripMenuItemCopyEntry.Size = new System.Drawing.Size(132, 22); - this.toolStripMenuItemCopyEntry.Text = "Copy entry"; - this.toolStripMenuItemCopyEntry.Click += new System.EventHandler(this.ToolStripMenuItemCopyEntry_Click); - // - // FormReport - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1110, 343); - this.Controls.Add(this.tabControlReport); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Name = "FormReport"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Report - Backup Helper"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormReport_FormClosing); - this.tabPageCreatedDirectories.ResumeLayout(false); - this.contextMenuStripCreatedDirectories.ResumeLayout(false); - this.tabPageRenamedFiles.ResumeLayout(false); - this.contextMenuStripRenamedFiles.ResumeLayout(false); - this.tabPageReplacedFiles.ResumeLayout(false); - this.contextMenuStripReplacedFiles.ResumeLayout(false); - this.tabPageNotTransfered.ResumeLayout(false); - this.contextMenuStripNotTransferedFiles.ResumeLayout(false); - this.tabPageTransfered.ResumeLayout(false); - this.contextMenuStripTransferedFiles.ResumeLayout(false); - this.tabControlReport.ResumeLayout(false); - this.tabPageRemovedFilesAndDirectories.ResumeLayout(false); - this.contextMenuStripRemovedFilesAndDirectories.ResumeLayout(false); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.TabPage tabPageCreatedDirectories; - private System.Windows.Forms.ListView listViewCreatedDirectories; - private System.Windows.Forms.ColumnHeader columnHeader1; - private System.Windows.Forms.ColumnHeader columnHeader2; - private System.Windows.Forms.TabPage tabPageRenamedFiles; - private System.Windows.Forms.ListView listViewRenamedFiles; - private System.Windows.Forms.ColumnHeader columnHeader3; - private System.Windows.Forms.ColumnHeader columnHeader4; - private System.Windows.Forms.TabPage tabPageReplacedFiles; - private System.Windows.Forms.ListView listViewReplacedFiles; - private System.Windows.Forms.ColumnHeader columnHeader5; - private System.Windows.Forms.ColumnHeader columnHeader6; - private System.Windows.Forms.TabPage tabPageNotTransfered; - private System.Windows.Forms.ListView listViewNotTransferedFiles; - private System.Windows.Forms.ColumnHeader columnHeaderNotTransFile; - private System.Windows.Forms.ColumnHeader columnHeaderNotTransDestiny; - private System.Windows.Forms.ColumnHeader columnHeaderNotTransReason; - private System.Windows.Forms.TabPage tabPageTransfered; - private System.Windows.Forms.ListView listViewTransferedFiles; - private System.Windows.Forms.ColumnHeader columnHeaderTransFile; - private System.Windows.Forms.ColumnHeader columnHeaderTransDestiny; - private System.Windows.Forms.TabControl tabControlReport; - private System.Windows.Forms.ContextMenuStrip contextMenuStripTransferedFiles; - private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItemCopySourceFilePath1; - private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItemCopyDestinyPath1; - private System.Windows.Forms.ContextMenuStrip contextMenuStripNotTransferedFiles; - private System.Windows.Forms.ContextMenuStrip contextMenuStripReplacedFiles; - private System.Windows.Forms.ContextMenuStrip contextMenuStripRenamedFiles; - private System.Windows.Forms.ContextMenuStrip contextMenuStripCreatedDirectories; - private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItemCopySourceFilePath2; - private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItemCopyDestinyPath2; - private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItemCopySourceFilePath3; - private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItemCopyDestinyPath3; - private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItemCopySourceFilePath4; - private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItemCopyDestinyPath4; - private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItemCopyDirectoryPath; - private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItemCopyOriginPath; - private System.Windows.Forms.TabPage tabPageRemovedFilesAndDirectories; - private System.Windows.Forms.ListView listViewRemovedFilesAndDirectories; - private System.Windows.Forms.ColumnHeader columnHeaderEntry; - private System.Windows.Forms.ColumnHeader columnHeaderDescription; - private System.Windows.Forms.ContextMenuStrip contextMenuStripRemovedFilesAndDirectories; - private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemCopyEntry; - } -} \ No newline at end of file diff --git a/BackupHelper/Forms/FormCancelExecution.Designer.cs b/BackupHelper/Forms/FormCancelExecution.Designer.cs new file mode 100644 index 0000000..72f7774 --- /dev/null +++ b/BackupHelper/Forms/FormCancelExecution.Designer.cs @@ -0,0 +1,77 @@ +namespace BackupHelper +{ + partial class FormCancelExecution + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + backgroundWorker1 = new System.ComponentModel.BackgroundWorker(); + labelCancel = new Label(); + progressBarCanceling = new ProgressBar(); + SuspendLayout(); + // + // labelCancel + // + labelCancel.AutoSize = true; + labelCancel.Location = new Point(79, 9); + labelCancel.Name = "labelCancel"; + labelCancel.Size = new Size(63, 13); + labelCancel.TabIndex = 0; + labelCancel.Text = "Canceling..."; + // + // progressBarCanceling + // + progressBarCanceling.Location = new Point(12, 41); + progressBarCanceling.Name = "progressBarCanceling"; + progressBarCanceling.Size = new Size(210, 23); + progressBarCanceling.Step = 1; + progressBarCanceling.TabIndex = 1; + // + // FormCancelExecution + // + AutoScaleDimensions = new SizeF(6F, 13F); + AutoScaleMode = AutoScaleMode.Font; + BackgroundImageLayout = ImageLayout.None; + ClientSize = new Size(234, 73); + ControlBox = false; + Controls.Add(progressBarCanceling); + Controls.Add(labelCancel); + Cursor = Cursors.WaitCursor; + Font = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Regular, GraphicsUnit.Point); + FormBorderStyle = FormBorderStyle.FixedDialog; + Name = "FormCancelExecution"; + StartPosition = FormStartPosition.CenterScreen; + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private System.ComponentModel.BackgroundWorker backgroundWorker1; + private System.Windows.Forms.Label labelCancel; + private System.Windows.Forms.ProgressBar progressBarCanceling; + } +} \ No newline at end of file diff --git a/BackupHelper/FormCancelExecution.cs b/BackupHelper/Forms/FormCancelExecution.cs similarity index 100% rename from BackupHelper/FormCancelExecution.cs rename to BackupHelper/Forms/FormCancelExecution.cs diff --git a/BackupHelper/Forms/FormCancelExecution.resx b/BackupHelper/Forms/FormCancelExecution.resx new file mode 100644 index 0000000..8453790 --- /dev/null +++ b/BackupHelper/Forms/FormCancelExecution.resx @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/BackupHelper/Forms/FormEditOptions.Designer.cs b/BackupHelper/Forms/FormEditOptions.Designer.cs new file mode 100644 index 0000000..5bec36b --- /dev/null +++ b/BackupHelper/Forms/FormEditOptions.Designer.cs @@ -0,0 +1,715 @@ +namespace BackupHelper +{ + partial class FormEditOptions + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormEditOptions)); + checkBoxKeepOriginFiles = new CheckBox(); + checkBoxMoveSubfolders = new CheckBox(); + comboBoxMethod = new ComboBox(); + textBoxDestinyPath = new TextBox(); + textBoxSourcePath = new TextBox(); + labelMethod = new Label(); + labelDestinyPath = new Label(); + labelSourcePath = new Label(); + buttonAddSource = new Button(); + buttonAddDestiny = new Button(); + buttonDoneEdit = new Button(); + folderBrowserDialogEditOption = new FolderBrowserDialog(); + checkBoxCleanDestinyDirectory = new CheckBox(); + buttonSwitchPaths = new Button(); + listViewFilesAndExts = new ListView(); + columnHeaderFileOrExt = new ColumnHeader(); + textBoxFilesAndExts = new TextBox(); + radioButtonIgnore1 = new RadioButton(); + radioButtonTransferOnly1 = new RadioButton(); + buttonRemFileOrExt = new Button(); + buttonAddFileOrExt = new Button(); + checkBoxDeleteUncommonFiles = new CheckBox(); + labelKeepOriginFilesHelp = new Label(); + labelCleanDestinyHelp = new Label(); + labelDeleteUncommonFilesHelp = new Label(); + toolTipHelp = new ToolTip(components); + labelReenumerateHelp = new Label(); + labelFilterDirsHelp = new Label(); + labelFilterFilesHelp = new Label(); + checkBoxReenumerate = new CheckBox(); + numericUpDownMaxKeptRenamedFileCount = new NumericUpDown(); + labelMaxKeptRenamedFileCount = new Label(); + tabControlFilter = new TabControl(); + tabPageFilterFilesAndExts = new TabPage(); + panel2 = new Panel(); + checkBoxActive1 = new CheckBox(); + tabPageFilterDirs = new TabPage(); + panel1 = new Panel(); + listViewDirs = new ListView(); + columnHeaderDir = new ColumnHeader(); + checkBoxActive2 = new CheckBox(); + buttonRemDir = new Button(); + textBoxDirs = new TextBox(); + radioButtonTransferOnly2 = new RadioButton(); + radioButtonIgnore2 = new RadioButton(); + buttonAddDir = new Button(); + ((System.ComponentModel.ISupportInitialize)numericUpDownMaxKeptRenamedFileCount).BeginInit(); + tabControlFilter.SuspendLayout(); + tabPageFilterFilesAndExts.SuspendLayout(); + panel2.SuspendLayout(); + tabPageFilterDirs.SuspendLayout(); + panel1.SuspendLayout(); + SuspendLayout(); + // + // checkBoxKeepOriginFiles + // + checkBoxKeepOriginFiles.Anchor = AnchorStyles.Right; + checkBoxKeepOriginFiles.AutoSize = true; + checkBoxKeepOriginFiles.Checked = true; + checkBoxKeepOriginFiles.CheckState = CheckState.Checked; + checkBoxKeepOriginFiles.Location = new Point(260, 137); + checkBoxKeepOriginFiles.Name = "checkBoxKeepOriginFiles"; + checkBoxKeepOriginFiles.Size = new Size(172, 17); + checkBoxKeepOriginFiles.TabIndex = 6; + checkBoxKeepOriginFiles.Text = "Keep origin files and directories"; + checkBoxKeepOriginFiles.UseVisualStyleBackColor = true; + // + // checkBoxMoveSubfolders + // + checkBoxMoveSubfolders.Anchor = AnchorStyles.Right; + checkBoxMoveSubfolders.AutoSize = true; + checkBoxMoveSubfolders.Checked = true; + checkBoxMoveSubfolders.CheckState = CheckState.Checked; + checkBoxMoveSubfolders.Location = new Point(260, 119); + checkBoxMoveSubfolders.Name = "checkBoxMoveSubfolders"; + checkBoxMoveSubfolders.Size = new Size(112, 17); + checkBoxMoveSubfolders.TabIndex = 5; + checkBoxMoveSubfolders.Text = "Include subfolders"; + checkBoxMoveSubfolders.UseVisualStyleBackColor = true; + // + // comboBoxMethod + // + comboBoxMethod.Anchor = AnchorStyles.Right; + comboBoxMethod.DrawMode = DrawMode.OwnerDrawFixed; + comboBoxMethod.DropDownStyle = ComboBoxStyle.DropDownList; + comboBoxMethod.FormattingEnabled = true; + comboBoxMethod.Location = new Point(260, 222); + comboBoxMethod.Name = "comboBoxMethod"; + comboBoxMethod.Size = new Size(369, 21); + comboBoxMethod.TabIndex = 9; + comboBoxMethod.DrawItem += ComboBoxMethod_DrawItem; + comboBoxMethod.SelectedIndexChanged += ComboBoxMethod_SelectedIndexChanged; + // + // textBoxDestinyPath + // + textBoxDestinyPath.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; + textBoxDestinyPath.Location = new Point(15, 76); + textBoxDestinyPath.Name = "textBoxDestinyPath"; + textBoxDestinyPath.Size = new Size(577, 20); + textBoxDestinyPath.TabIndex = 3; + // + // textBoxSourcePath + // + textBoxSourcePath.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; + textBoxSourcePath.Location = new Point(15, 29); + textBoxSourcePath.Name = "textBoxSourcePath"; + textBoxSourcePath.Size = new Size(577, 20); + textBoxSourcePath.TabIndex = 1; + // + // labelMethod + // + labelMethod.Anchor = AnchorStyles.Right; + labelMethod.AutoSize = true; + labelMethod.Location = new Point(257, 206); + labelMethod.Name = "labelMethod"; + labelMethod.Size = new Size(225, 13); + labelMethod.TabIndex = 14; + labelMethod.Text = "For repeated filenames in the destiny directory:"; + // + // labelDestinyPath + // + labelDestinyPath.AutoSize = true; + labelDestinyPath.Location = new Point(12, 60); + labelDestinyPath.Name = "labelDestinyPath"; + labelDestinyPath.Size = new Size(90, 13); + labelDestinyPath.TabIndex = 13; + labelDestinyPath.Text = "Destiny Directory:"; + // + // labelSourcePath + // + labelSourcePath.AutoSize = true; + labelSourcePath.Location = new Point(12, 13); + labelSourcePath.Name = "labelSourcePath"; + labelSourcePath.Size = new Size(89, 13); + labelSourcePath.TabIndex = 12; + labelSourcePath.Text = "Source Directory:"; + // + // buttonAddSource + // + buttonAddSource.Anchor = AnchorStyles.Top | AnchorStyles.Right; + buttonAddSource.BackColor = SystemColors.ControlLight; + buttonAddSource.Cursor = Cursors.Cross; + buttonAddSource.Font = new Font("Microsoft Sans Serif", 8F, FontStyle.Regular, GraphicsUnit.Point); + buttonAddSource.Location = new Point(591, 26); + buttonAddSource.Name = "buttonAddSource"; + buttonAddSource.Size = new Size(42, 25); + buttonAddSource.TabIndex = 2; + buttonAddSource.Text = "Add"; + buttonAddSource.UseVisualStyleBackColor = false; + buttonAddSource.Click += ButtonAddSource_Click; + // + // buttonAddDestiny + // + buttonAddDestiny.Anchor = AnchorStyles.Top | AnchorStyles.Right; + buttonAddDestiny.BackColor = SystemColors.ControlLight; + buttonAddDestiny.Cursor = Cursors.Cross; + buttonAddDestiny.Font = new Font("Microsoft Sans Serif", 8F, FontStyle.Regular, GraphicsUnit.Point); + buttonAddDestiny.Location = new Point(591, 73); + buttonAddDestiny.Name = "buttonAddDestiny"; + buttonAddDestiny.Size = new Size(42, 25); + buttonAddDestiny.TabIndex = 4; + buttonAddDestiny.Text = "Add"; + buttonAddDestiny.UseVisualStyleBackColor = false; + buttonAddDestiny.Click += ButtonAddDestiny_Click; + // + // buttonDoneEdit + // + buttonDoneEdit.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonDoneEdit.FlatAppearance.BorderColor = Color.Black; + buttonDoneEdit.Location = new Point(527, 269); + buttonDoneEdit.Name = "buttonDoneEdit"; + buttonDoneEdit.Size = new Size(103, 36); + buttonDoneEdit.TabIndex = 10; + buttonDoneEdit.Text = "Done"; + buttonDoneEdit.UseVisualStyleBackColor = true; + buttonDoneEdit.Click += ButtonDoneEdit_Click; + // + // checkBoxCleanDestinyDirectory + // + checkBoxCleanDestinyDirectory.Anchor = AnchorStyles.Right; + checkBoxCleanDestinyDirectory.AutoSize = true; + checkBoxCleanDestinyDirectory.Location = new Point(260, 155); + checkBoxCleanDestinyDirectory.Name = "checkBoxCleanDestinyDirectory"; + checkBoxCleanDestinyDirectory.Size = new Size(151, 17); + checkBoxCleanDestinyDirectory.TabIndex = 7; + checkBoxCleanDestinyDirectory.Text = "Clean destiny directory first"; + checkBoxCleanDestinyDirectory.UseVisualStyleBackColor = true; + checkBoxCleanDestinyDirectory.CheckedChanged += CheckBoxCleanDestinyDirectory_CheckedChanged; + // + // buttonSwitchPaths + // + buttonSwitchPaths.Anchor = AnchorStyles.Top | AnchorStyles.Right; + buttonSwitchPaths.ForeColor = SystemColors.ControlDarkDark; + buttonSwitchPaths.Location = new Point(458, 52); + buttonSwitchPaths.Name = "buttonSwitchPaths"; + buttonSwitchPaths.Size = new Size(101, 21); + buttonSwitchPaths.TabIndex = 3; + buttonSwitchPaths.Text = "Switch Paths"; + buttonSwitchPaths.UseVisualStyleBackColor = true; + buttonSwitchPaths.Click += ButtonSwitchPaths_Click; + // + // listViewFilesAndExts + // + listViewFilesAndExts.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; + listViewFilesAndExts.BackColor = SystemColors.Window; + listViewFilesAndExts.Columns.AddRange(new ColumnHeader[] { columnHeaderFileOrExt }); + listViewFilesAndExts.Enabled = false; + listViewFilesAndExts.ForeColor = SystemColors.InactiveCaption; + listViewFilesAndExts.HeaderStyle = ColumnHeaderStyle.Nonclickable; + listViewFilesAndExts.Location = new Point(4, 26); + listViewFilesAndExts.MultiSelect = false; + listViewFilesAndExts.Name = "listViewFilesAndExts"; + listViewFilesAndExts.ShowItemToolTips = true; + listViewFilesAndExts.Size = new Size(223, 131); + listViewFilesAndExts.TabIndex = 9; + listViewFilesAndExts.UseCompatibleStateImageBehavior = false; + listViewFilesAndExts.View = View.Details; + listViewFilesAndExts.KeyDown += ListViewFilesAndExts_KeyDown; + // + // columnHeaderFileOrExt + // + columnHeaderFileOrExt.Text = "File or extension"; + columnHeaderFileOrExt.Width = 205; + // + // textBoxFilesAndExts + // + textBoxFilesAndExts.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; + textBoxFilesAndExts.Enabled = false; + textBoxFilesAndExts.Location = new Point(4, 160); + textBoxFilesAndExts.Name = "textBoxFilesAndExts"; + textBoxFilesAndExts.Size = new Size(144, 20); + textBoxFilesAndExts.TabIndex = 14; + textBoxFilesAndExts.KeyPress += TextBoxFilesAndExts_KeyPress; + // + // radioButtonIgnore1 + // + radioButtonIgnore1.AutoSize = true; + radioButtonIgnore1.Enabled = false; + radioButtonIgnore1.Location = new Point(152, 3); + radioButtonIgnore1.Name = "radioButtonIgnore1"; + radioButtonIgnore1.Size = new Size(55, 17); + radioButtonIgnore1.TabIndex = 13; + radioButtonIgnore1.Text = "Ignore"; + radioButtonIgnore1.UseVisualStyleBackColor = true; + // + // radioButtonTransferOnly1 + // + radioButtonTransferOnly1.AutoSize = true; + radioButtonTransferOnly1.Checked = true; + radioButtonTransferOnly1.Enabled = false; + radioButtonTransferOnly1.Location = new Point(65, 3); + radioButtonTransferOnly1.Name = "radioButtonTransferOnly1"; + radioButtonTransferOnly1.Size = new Size(86, 17); + radioButtonTransferOnly1.TabIndex = 12; + radioButtonTransferOnly1.TabStop = true; + radioButtonTransferOnly1.Text = "Transfer only"; + radioButtonTransferOnly1.UseVisualStyleBackColor = true; + // + // buttonRemFileOrExt + // + buttonRemFileOrExt.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonRemFileOrExt.Enabled = false; + buttonRemFileOrExt.Location = new Point(190, 159); + buttonRemFileOrExt.Name = "buttonRemFileOrExt"; + buttonRemFileOrExt.Size = new Size(38, 22); + buttonRemFileOrExt.TabIndex = 16; + buttonRemFileOrExt.Text = "Remove"; + buttonRemFileOrExt.UseVisualStyleBackColor = true; + buttonRemFileOrExt.Click += ButtonRemoveFileOrExt_Click; + // + // buttonAddFileOrExt + // + buttonAddFileOrExt.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonAddFileOrExt.Enabled = false; + buttonAddFileOrExt.Location = new Point(151, 159); + buttonAddFileOrExt.Name = "buttonAddFileOrExt"; + buttonAddFileOrExt.Size = new Size(38, 22); + buttonAddFileOrExt.TabIndex = 15; + buttonAddFileOrExt.Text = "Add"; + buttonAddFileOrExt.UseVisualStyleBackColor = true; + buttonAddFileOrExt.Click += ButtonAddFileOrExt_Click; + // + // checkBoxDeleteUncommonFiles + // + checkBoxDeleteUncommonFiles.Anchor = AnchorStyles.Right; + checkBoxDeleteUncommonFiles.AutoSize = true; + checkBoxDeleteUncommonFiles.ForeColor = SystemColors.ControlText; + checkBoxDeleteUncommonFiles.Location = new Point(260, 173); + checkBoxDeleteUncommonFiles.Name = "checkBoxDeleteUncommonFiles"; + checkBoxDeleteUncommonFiles.Size = new Size(205, 17); + checkBoxDeleteUncommonFiles.TabIndex = 8; + checkBoxDeleteUncommonFiles.Text = "Delete uncommon files and directories"; + checkBoxDeleteUncommonFiles.UseVisualStyleBackColor = true; + checkBoxDeleteUncommonFiles.CheckedChanged += CheckBoxDeleteUncommonFiles_CheckedChanged; + // + // labelKeepOriginFilesHelp + // + labelKeepOriginFilesHelp.Anchor = AnchorStyles.Right; + labelKeepOriginFilesHelp.AutoSize = true; + labelKeepOriginFilesHelp.BackColor = Color.Green; + labelKeepOriginFilesHelp.Font = new Font("Microsoft Sans Serif", 6.5F, FontStyle.Bold, GraphicsUnit.Point); + labelKeepOriginFilesHelp.ForeColor = Color.White; + labelKeepOriginFilesHelp.Location = new Point(429, 139); + labelKeepOriginFilesHelp.Name = "labelKeepOriginFilesHelp"; + labelKeepOriginFilesHelp.Size = new Size(11, 12); + labelKeepOriginFilesHelp.TabIndex = 31; + labelKeepOriginFilesHelp.Text = "?"; + toolTipHelp.SetToolTip(labelKeepOriginFilesHelp, "Origin files and directories will be copied instead of moved."); + // + // labelCleanDestinyHelp + // + labelCleanDestinyHelp.Anchor = AnchorStyles.Right; + labelCleanDestinyHelp.AutoSize = true; + labelCleanDestinyHelp.BackColor = Color.Green; + labelCleanDestinyHelp.Font = new Font("Microsoft Sans Serif", 6.5F, FontStyle.Bold, GraphicsUnit.Point); + labelCleanDestinyHelp.ForeColor = Color.White; + labelCleanDestinyHelp.Location = new Point(408, 157); + labelCleanDestinyHelp.Name = "labelCleanDestinyHelp"; + labelCleanDestinyHelp.Size = new Size(11, 12); + labelCleanDestinyHelp.TabIndex = 32; + labelCleanDestinyHelp.Text = "?"; + toolTipHelp.SetToolTip(labelCleanDestinyHelp, "All destiny files and directories will be deleted before transfering."); + // + // labelDeleteUncommonFilesHelp + // + labelDeleteUncommonFilesHelp.Anchor = AnchorStyles.Right; + labelDeleteUncommonFilesHelp.AutoSize = true; + labelDeleteUncommonFilesHelp.BackColor = Color.Green; + labelDeleteUncommonFilesHelp.Font = new Font("Microsoft Sans Serif", 6.5F, FontStyle.Bold, GraphicsUnit.Point); + labelDeleteUncommonFilesHelp.ForeColor = Color.White; + labelDeleteUncommonFilesHelp.Location = new Point(462, 175); + labelDeleteUncommonFilesHelp.Name = "labelDeleteUncommonFilesHelp"; + labelDeleteUncommonFilesHelp.Size = new Size(11, 12); + labelDeleteUncommonFilesHelp.TabIndex = 33; + labelDeleteUncommonFilesHelp.Text = "?"; + toolTipHelp.SetToolTip(labelDeleteUncommonFilesHelp, "Delete files and directories present in the destiny directory that aren't present in the origin directory."); + // + // toolTipHelp + // + toolTipHelp.AutomaticDelay = 40000; + toolTipHelp.AutoPopDelay = 30000; + toolTipHelp.InitialDelay = 500; + toolTipHelp.ReshowDelay = 100; + // + // labelReenumerateHelp + // + labelReenumerateHelp.Anchor = AnchorStyles.Right; + labelReenumerateHelp.AutoSize = true; + labelReenumerateHelp.BackColor = Color.Green; + labelReenumerateHelp.Font = new Font("Microsoft Sans Serif", 6.5F, FontStyle.Bold, GraphicsUnit.Point); + labelReenumerateHelp.ForeColor = Color.White; + labelReenumerateHelp.Location = new Point(427, 264); + labelReenumerateHelp.Name = "labelReenumerateHelp"; + labelReenumerateHelp.Size = new Size(11, 12); + labelReenumerateHelp.TabIndex = 37; + labelReenumerateHelp.Text = "?"; + toolTipHelp.SetToolTip(labelReenumerateHelp, resources.GetString("labelReenumerateHelp.ToolTip")); + // + // labelFilterDirsHelp + // + labelFilterDirsHelp.Anchor = AnchorStyles.Top | AnchorStyles.Right; + labelFilterDirsHelp.AutoSize = true; + labelFilterDirsHelp.BackColor = Color.Green; + labelFilterDirsHelp.Font = new Font("Microsoft Sans Serif", 6.5F, FontStyle.Bold, GraphicsUnit.Point); + labelFilterDirsHelp.ForeColor = Color.White; + labelFilterDirsHelp.Location = new Point(216, 7); + labelFilterDirsHelp.Name = "labelFilterDirsHelp"; + labelFilterDirsHelp.Size = new Size(11, 12); + labelFilterDirsHelp.TabIndex = 38; + labelFilterDirsHelp.Text = "?"; + toolTipHelp.SetToolTip(labelFilterDirsHelp, "Full and relative paths can be used. Relative paths strings are required to start with a directory separator."); + // + // labelFilterFilesHelp + // + labelFilterFilesHelp.Anchor = AnchorStyles.Top | AnchorStyles.Right; + labelFilterFilesHelp.AutoSize = true; + labelFilterFilesHelp.BackColor = Color.Green; + labelFilterFilesHelp.Font = new Font("Microsoft Sans Serif", 6.5F, FontStyle.Bold, GraphicsUnit.Point); + labelFilterFilesHelp.ForeColor = Color.White; + labelFilterFilesHelp.Location = new Point(216, 7); + labelFilterFilesHelp.Name = "labelFilterFilesHelp"; + labelFilterFilesHelp.Size = new Size(11, 12); + labelFilterFilesHelp.TabIndex = 39; + labelFilterFilesHelp.Text = "?"; + toolTipHelp.SetToolTip(labelFilterFilesHelp, "Filnames can be used normally or with full path. Extensions are required to start with \".\"."); + // + // checkBoxReenumerate + // + checkBoxReenumerate.Anchor = AnchorStyles.Right; + checkBoxReenumerate.AutoSize = true; + checkBoxReenumerate.Enabled = false; + checkBoxReenumerate.ForeColor = SystemColors.ControlText; + checkBoxReenumerate.Location = new Point(271, 262); + checkBoxReenumerate.Name = "checkBoxReenumerate"; + checkBoxReenumerate.Size = new Size(158, 17); + checkBoxReenumerate.TabIndex = 34; + checkBoxReenumerate.Text = "Re-enumerate renamed files"; + checkBoxReenumerate.UseVisualStyleBackColor = true; + checkBoxReenumerate.CheckedChanged += CheckBoxReenumerate_CheckedChanged; + // + // numericUpDownMaxKeptRenamedFileCount + // + numericUpDownMaxKeptRenamedFileCount.Anchor = AnchorStyles.Right; + numericUpDownMaxKeptRenamedFileCount.Enabled = false; + numericUpDownMaxKeptRenamedFileCount.Location = new Point(407, 283); + numericUpDownMaxKeptRenamedFileCount.Maximum = new decimal(new int[] { 1000000, 0, 0, 0 }); + numericUpDownMaxKeptRenamedFileCount.Name = "numericUpDownMaxKeptRenamedFileCount"; + numericUpDownMaxKeptRenamedFileCount.Size = new Size(75, 20); + numericUpDownMaxKeptRenamedFileCount.TabIndex = 35; + // + // labelMaxKeptRenamedFileCount + // + labelMaxKeptRenamedFileCount.Anchor = AnchorStyles.Right; + labelMaxKeptRenamedFileCount.AutoSize = true; + labelMaxKeptRenamedFileCount.Enabled = false; + labelMaxKeptRenamedFileCount.Location = new Point(269, 285); + labelMaxKeptRenamedFileCount.Name = "labelMaxKeptRenamedFileCount"; + labelMaxKeptRenamedFileCount.Size = new Size(137, 13); + labelMaxKeptRenamedFileCount.TabIndex = 36; + labelMaxKeptRenamedFileCount.Text = "Max. enumerated files kept:"; + // + // tabControlFilter + // + tabControlFilter.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; + tabControlFilter.Controls.Add(tabPageFilterFilesAndExts); + tabControlFilter.Controls.Add(tabPageFilterDirs); + tabControlFilter.Location = new Point(5, 105); + tabControlFilter.Name = "tabControlFilter"; + tabControlFilter.SelectedIndex = 0; + tabControlFilter.Size = new Size(248, 212); + tabControlFilter.TabIndex = 38; + // + // tabPageFilterFilesAndExts + // + tabPageFilterFilesAndExts.Controls.Add(panel2); + tabPageFilterFilesAndExts.Location = new Point(4, 22); + tabPageFilterFilesAndExts.Name = "tabPageFilterFilesAndExts"; + tabPageFilterFilesAndExts.Padding = new Padding(3); + tabPageFilterFilesAndExts.Size = new Size(240, 186); + tabPageFilterFilesAndExts.TabIndex = 0; + tabPageFilterFilesAndExts.Text = "Filter filenames/extensions"; + tabPageFilterFilesAndExts.UseVisualStyleBackColor = true; + // + // panel2 + // + panel2.Controls.Add(labelFilterFilesHelp); + panel2.Controls.Add(listViewFilesAndExts); + panel2.Controls.Add(checkBoxActive1); + panel2.Controls.Add(buttonRemFileOrExt); + panel2.Controls.Add(textBoxFilesAndExts); + panel2.Controls.Add(radioButtonTransferOnly1); + panel2.Controls.Add(radioButtonIgnore1); + panel2.Controls.Add(buttonAddFileOrExt); + panel2.Dock = DockStyle.Fill; + panel2.Location = new Point(3, 3); + panel2.Name = "panel2"; + panel2.Size = new Size(234, 180); + panel2.TabIndex = 39; + // + // checkBoxActive1 + // + checkBoxActive1.AutoSize = true; + checkBoxActive1.Location = new Point(7, 3); + checkBoxActive1.Name = "checkBoxActive1"; + checkBoxActive1.Size = new Size(56, 17); + checkBoxActive1.TabIndex = 17; + checkBoxActive1.Text = "Active"; + checkBoxActive1.UseVisualStyleBackColor = true; + checkBoxActive1.CheckedChanged += CheckBoxActive1_CheckedChanged; + // + // tabPageFilterDirs + // + tabPageFilterDirs.Controls.Add(panel1); + tabPageFilterDirs.Location = new Point(4, 22); + tabPageFilterDirs.Name = "tabPageFilterDirs"; + tabPageFilterDirs.Padding = new Padding(3); + tabPageFilterDirs.Size = new Size(240, 186); + tabPageFilterDirs.TabIndex = 1; + tabPageFilterDirs.Text = "Filter directories"; + tabPageFilterDirs.UseVisualStyleBackColor = true; + // + // panel1 + // + panel1.Controls.Add(labelFilterDirsHelp); + panel1.Controls.Add(listViewDirs); + panel1.Controls.Add(checkBoxActive2); + panel1.Controls.Add(buttonRemDir); + panel1.Controls.Add(textBoxDirs); + panel1.Controls.Add(radioButtonTransferOnly2); + panel1.Controls.Add(radioButtonIgnore2); + panel1.Controls.Add(buttonAddDir); + panel1.Dock = DockStyle.Fill; + panel1.Location = new Point(3, 3); + panel1.Name = "panel1"; + panel1.Size = new Size(234, 180); + panel1.TabIndex = 39; + // + // listViewDirs + // + listViewDirs.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; + listViewDirs.BackColor = SystemColors.Window; + listViewDirs.Columns.AddRange(new ColumnHeader[] { columnHeaderDir }); + listViewDirs.Enabled = false; + listViewDirs.ForeColor = SystemColors.InactiveCaption; + listViewDirs.HeaderStyle = ColumnHeaderStyle.Nonclickable; + listViewDirs.Location = new Point(4, 26); + listViewDirs.MultiSelect = false; + listViewDirs.Name = "listViewDirs"; + listViewDirs.ShowItemToolTips = true; + listViewDirs.Size = new Size(223, 131); + listViewDirs.TabIndex = 18; + listViewDirs.UseCompatibleStateImageBehavior = false; + listViewDirs.View = View.Details; + listViewDirs.KeyDown += ListViewDirs_KeyDown; + // + // columnHeaderDir + // + columnHeaderDir.Text = "Directory"; + columnHeaderDir.Width = 205; + // + // checkBoxActive2 + // + checkBoxActive2.AutoSize = true; + checkBoxActive2.Location = new Point(7, 3); + checkBoxActive2.Name = "checkBoxActive2"; + checkBoxActive2.Size = new Size(56, 17); + checkBoxActive2.TabIndex = 24; + checkBoxActive2.Text = "Active"; + checkBoxActive2.UseVisualStyleBackColor = true; + checkBoxActive2.CheckedChanged += CheckBoxActive2_CheckedChanged; + // + // buttonRemDir + // + buttonRemDir.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonRemDir.Enabled = false; + buttonRemDir.Location = new Point(190, 159); + buttonRemDir.Name = "buttonRemDir"; + buttonRemDir.Size = new Size(38, 22); + buttonRemDir.TabIndex = 23; + buttonRemDir.Text = "Remove"; + buttonRemDir.UseVisualStyleBackColor = true; + buttonRemDir.Click += ButtonRemDir_Click; + // + // textBoxDirs + // + textBoxDirs.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; + textBoxDirs.Enabled = false; + textBoxDirs.Location = new Point(4, 160); + textBoxDirs.Name = "textBoxDirs"; + textBoxDirs.Size = new Size(144, 20); + textBoxDirs.TabIndex = 21; + textBoxDirs.KeyPress += TextBoxDirs_KeyPress; + // + // radioButtonTransferOnly2 + // + radioButtonTransferOnly2.AutoSize = true; + radioButtonTransferOnly2.Checked = true; + radioButtonTransferOnly2.Enabled = false; + radioButtonTransferOnly2.Location = new Point(65, 3); + radioButtonTransferOnly2.Name = "radioButtonTransferOnly2"; + radioButtonTransferOnly2.Size = new Size(86, 17); + radioButtonTransferOnly2.TabIndex = 19; + radioButtonTransferOnly2.TabStop = true; + radioButtonTransferOnly2.Text = "Transfer only"; + radioButtonTransferOnly2.UseVisualStyleBackColor = true; + // + // radioButtonIgnore2 + // + radioButtonIgnore2.AutoSize = true; + radioButtonIgnore2.Enabled = false; + radioButtonIgnore2.Location = new Point(152, 3); + radioButtonIgnore2.Name = "radioButtonIgnore2"; + radioButtonIgnore2.Size = new Size(55, 17); + radioButtonIgnore2.TabIndex = 20; + radioButtonIgnore2.Text = "Ignore"; + radioButtonIgnore2.UseVisualStyleBackColor = true; + // + // buttonAddDir + // + buttonAddDir.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonAddDir.Enabled = false; + buttonAddDir.Location = new Point(151, 159); + buttonAddDir.Name = "buttonAddDir"; + buttonAddDir.Size = new Size(38, 22); + buttonAddDir.TabIndex = 22; + buttonAddDir.Text = "Add"; + buttonAddDir.UseVisualStyleBackColor = true; + buttonAddDir.Click += ButtonAddDir_Click; + // + // FormEditOptions + // + AutoScaleMode = AutoScaleMode.None; + ClientSize = new Size(650, 320); + Controls.Add(tabControlFilter); + Controls.Add(labelReenumerateHelp); + Controls.Add(labelMaxKeptRenamedFileCount); + Controls.Add(numericUpDownMaxKeptRenamedFileCount); + Controls.Add(checkBoxReenumerate); + Controls.Add(labelDeleteUncommonFilesHelp); + Controls.Add(labelCleanDestinyHelp); + Controls.Add(labelKeepOriginFilesHelp); + Controls.Add(checkBoxDeleteUncommonFiles); + Controls.Add(buttonSwitchPaths); + Controls.Add(checkBoxCleanDestinyDirectory); + Controls.Add(buttonDoneEdit); + Controls.Add(buttonAddDestiny); + Controls.Add(buttonAddSource); + Controls.Add(checkBoxKeepOriginFiles); + Controls.Add(checkBoxMoveSubfolders); + Controls.Add(comboBoxMethod); + Controls.Add(textBoxDestinyPath); + Controls.Add(textBoxSourcePath); + Controls.Add(labelMethod); + Controls.Add(labelDestinyPath); + Controls.Add(labelSourcePath); + Font = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Regular, GraphicsUnit.Point); + MinimumSize = new Size(666, 359); + Name = "FormEditOptions"; + ShowIcon = false; + StartPosition = FormStartPosition.CenterScreen; + Text = "Edit Options"; + ((System.ComponentModel.ISupportInitialize)numericUpDownMaxKeptRenamedFileCount).EndInit(); + tabControlFilter.ResumeLayout(false); + tabPageFilterFilesAndExts.ResumeLayout(false); + panel2.ResumeLayout(false); + panel2.PerformLayout(); + tabPageFilterDirs.ResumeLayout(false); + panel1.ResumeLayout(false); + panel1.PerformLayout(); + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private System.Windows.Forms.CheckBox checkBoxKeepOriginFiles; + private System.Windows.Forms.CheckBox checkBoxMoveSubfolders; + private System.Windows.Forms.ComboBox comboBoxMethod; + private System.Windows.Forms.TextBox textBoxDestinyPath; + private System.Windows.Forms.TextBox textBoxSourcePath; + private System.Windows.Forms.Label labelMethod; + private System.Windows.Forms.Label labelDestinyPath; + private System.Windows.Forms.Label labelSourcePath; + private System.Windows.Forms.Button buttonAddSource; + private System.Windows.Forms.Button buttonAddDestiny; + private System.Windows.Forms.Button buttonDoneEdit; + private System.Windows.Forms.FolderBrowserDialog folderBrowserDialogEditOption; + private System.Windows.Forms.CheckBox checkBoxCleanDestinyDirectory; + private System.Windows.Forms.Button buttonSwitchPaths; + private System.Windows.Forms.ListView listViewFilesAndExts; + private System.Windows.Forms.RadioButton radioButtonIgnore1; + private System.Windows.Forms.RadioButton radioButtonTransferOnly1; + private System.Windows.Forms.Button buttonRemFileOrExt; + private System.Windows.Forms.Button buttonAddFileOrExt; + private System.Windows.Forms.TextBox textBoxFilesAndExts; + private System.Windows.Forms.ColumnHeader columnHeaderFileOrExt; + private System.Windows.Forms.CheckBox checkBoxDeleteUncommonFiles; + private System.Windows.Forms.Label labelKeepOriginFilesHelp; + private System.Windows.Forms.Label labelCleanDestinyHelp; + private System.Windows.Forms.Label labelDeleteUncommonFilesHelp; + private System.Windows.Forms.ToolTip toolTipHelp; + private System.Windows.Forms.CheckBox checkBoxReenumerate; + private System.Windows.Forms.NumericUpDown numericUpDownMaxKeptRenamedFileCount; + private System.Windows.Forms.Label labelMaxKeptRenamedFileCount; + private System.Windows.Forms.Label labelReenumerateHelp; + private TabControl tabControlFilter; + private TabPage tabPageFilterFilesAndExts; + private CheckBox checkBoxActive1; + private TabPage tabPageFilterDirs; + private CheckBox checkBoxActive2; + private TextBox textBoxDirs; + private RadioButton radioButtonIgnore2; + private ListView listViewDirs; + private ColumnHeader columnHeaderDir; + private Button buttonAddDir; + private RadioButton radioButtonTransferOnly2; + private Button buttonRemDir; + private Label labelFilterDirsHelp; + private Label labelFilterFilesHelp; + private Panel panel1; + private Panel panel2; + } +} \ No newline at end of file diff --git a/BackupHelper/FormEditOptions.cs b/BackupHelper/Forms/FormEditOptions.cs similarity index 54% rename from BackupHelper/FormEditOptions.cs rename to BackupHelper/Forms/FormEditOptions.cs index ee92fdc..6a41718 100644 --- a/BackupHelper/FormEditOptions.cs +++ b/BackupHelper/Forms/FormEditOptions.cs @@ -1,18 +1,10 @@ using BackupHelper.model; using FileControlUtility; -using System; -using System.Collections.Generic; -using System.Drawing; -using System.IO; -using System.Linq; -using System.Windows.Forms; +using Nain; namespace BackupHelper { - public enum FormAction - { - EDIT, CREATE - } + public enum FormAction { EDIT, CREATE } public partial class FormEditOptions : Form { @@ -41,16 +33,17 @@ private FormEditOptions(FormOptionsMenu optionsMenu, Options option = null) { FormAction = FormAction.EDIT; Option = option; - FillCamps(option); + FillFields(option); } else { Text = "New Options"; - FillCamps(new Options { + FillFields(new Options + { SourcePath = "C:\\origin...", DestinyPath = "C:\\destiny...", - IncludeSubFolders = true + IncludeSubFolders = true }); } @@ -58,7 +51,7 @@ private FormEditOptions(FormOptionsMenu optionsMenu, Options option = null) KeyPreview = true; } - private void FillCamps(Options option) + private void FillFields(Options option) { try { @@ -75,13 +68,27 @@ private void FillCamps(Options option) checkBoxKeepOriginFiles.Checked = option.KeepOriginFiles; checkBoxCleanDestinyDirectory.Checked = option.CleanDestinyDirectory; checkBoxDeleteUncommonFiles.Checked = option.DeleteUncommonFiles; - checkBoxManageFileNamesAndExtensions.Checked = option.AllowIgnoreFileExt; - radioButtonIgnore.Checked = option.SpecifiedFileNamesOrExtensionsMode == SpecifiedEntriesMode.IGNORE; + checkBoxActive1.Checked = option.FilterFilesAndExts; + checkBoxActive2.Checked = option.FilterDirectories; + radioButtonIgnore1.Checked = option.FilteredFileNamesOrExtensionsMode == FilterMode.IGNORE; + radioButtonIgnore2.Checked = option.FilteredDirectoriesMode == FilterMode.IGNORE; checkBoxReenumerate.Checked = option.ReenumerateRenamedFiles; numericUpDownMaxKeptRenamedFileCount.Value = option.MaxKeptRenamedFileCount; - foreach (string txt in option.SpecifiedFileNamesAndExtensions) - listViewFileNamesAndExtensions.Items.Add(new ListViewItem(txt)); + foreach (string txt in option.FilteredFileNamesAndExtensions) + listViewFilesAndExts.Items.Add(new ListViewItem(txt)); + + FormsUtility.ResizeListViewColumns(listViewFilesAndExts); + + foreach (string txt in option.FilteredDirectories) + listViewDirs.Items.Add(new ListViewItem(txt)); + + FormsUtility.ResizeListViewColumns(listViewDirs); + + if (option.FilteredFileNamesAndExtensions.Count > 0 && option.FilterFilesAndExts) + tabControlFilter.SelectedTab = tabPageFilterFilesAndExts; + else if (option.FilteredDirectories.Count > 0 && option.FilterDirectories) + tabControlFilter.SelectedTab = tabPageFilterDirs; } catch (Exception e) { @@ -110,7 +117,7 @@ private void SubmitChanges() { editedOption.Profile = OptionsMenu.Profile; editedOption.ListViewIndex = OptionsMenu.listViewOptions.Items.Count; - DBAccess.AddOption(editedOption); + DBAccess.CreateOption(editedOption); OptionsMenu.Options.Add(editedOption); Program.UpdateLastTimeModified(editedOption.Profile); ListViewItem item = new ListViewItem(); @@ -125,13 +132,16 @@ private void SubmitChanges() Option.SourcePath == editedOption.SourcePath && Option.DestinyPath == editedOption.DestinyPath && Option.FileNameConflictMethod == editedOption.FileNameConflictMethod && - Option.SpecifiedFileNamesOrExtensionsMode == editedOption.SpecifiedFileNamesOrExtensionsMode && Option.IncludeSubFolders == editedOption.IncludeSubFolders && Option.KeepOriginFiles == editedOption.KeepOriginFiles && Option.CleanDestinyDirectory == editedOption.CleanDestinyDirectory && Option.DeleteUncommonFiles == editedOption.DeleteUncommonFiles && - Option.AllowIgnoreFileExt == editedOption.AllowIgnoreFileExt && - ExtensionsAreTheSame(Option.SpecifiedFileNamesAndExtensions, editedOption.SpecifiedFileNamesAndExtensions) && + Option.FilteredFileNamesOrExtensionsMode == editedOption.FilteredFileNamesOrExtensionsMode && + Option.FilteredDirectoriesMode == editedOption.FilteredDirectoriesMode && + Option.FilterFilesAndExts == editedOption.FilterFilesAndExts && + Option.FilterDirectories == editedOption.FilterDirectories && + ExtensionsAreTheSame(Option.FilteredFileNamesAndExtensions, editedOption.FilteredFileNamesAndExtensions) && + ExtensionsAreTheSame(Option.FilteredDirectories, editedOption.FilteredDirectories) && Option.ReenumerateRenamedFiles == editedOption.ReenumerateRenamedFiles && Option.MaxKeptRenamedFileCount == editedOption.MaxKeptRenamedFileCount ) @@ -140,13 +150,16 @@ private void SubmitChanges() Option.SourcePath = editedOption.SourcePath; Option.DestinyPath = editedOption.DestinyPath; Option.FileNameConflictMethod = editedOption.FileNameConflictMethod; - Option.SpecifiedFileNamesOrExtensionsMode = editedOption.SpecifiedFileNamesOrExtensionsMode; Option.IncludeSubFolders = editedOption.IncludeSubFolders; Option.KeepOriginFiles = editedOption.KeepOriginFiles; Option.CleanDestinyDirectory = editedOption.CleanDestinyDirectory; Option.DeleteUncommonFiles = editedOption.DeleteUncommonFiles; - Option.AllowIgnoreFileExt = editedOption.AllowIgnoreFileExt; - Option.SpecifiedFileNamesAndExtensions = editedOption.SpecifiedFileNamesAndExtensions; + Option.FilteredFileNamesOrExtensionsMode = editedOption.FilteredFileNamesOrExtensionsMode; + Option.FilteredDirectoriesMode = editedOption.FilteredDirectoriesMode; + Option.FilterFilesAndExts = editedOption.FilterFilesAndExts; + Option.FilterDirectories = editedOption.FilterDirectories; + Option.FilteredFileNamesAndExtensions = editedOption.FilteredFileNamesAndExtensions; + Option.FilteredDirectories = editedOption.FilteredDirectories; Option.ReenumerateRenamedFiles = editedOption.ReenumerateRenamedFiles; Option.MaxKeptRenamedFileCount = editedOption.MaxKeptRenamedFileCount; @@ -155,7 +168,7 @@ private void SubmitChanges() OptionsMenu.EditListViewItem(Option); } } - + DialogResult = DialogResult.Cancel; } catch (Exception e) @@ -166,7 +179,7 @@ private void SubmitChanges() private bool InputsAreValid(Options editedOption) { - if(editedOption.SourcePath == "") + if (editedOption.SourcePath == "") { MessageBox.Show("Invalid source path."); return false; @@ -185,7 +198,7 @@ private bool ExtensionsAreTheSame(List fileExtensions1, List fil { if (fileExtensions1.Count != fileExtensions2.Count) return false; - foreach(string extension in fileExtensions1) + foreach (string extension in fileExtensions1) if (!fileExtensions2.Contains(extension)) return false; return true; @@ -196,14 +209,16 @@ private void SaveFieldsToObject(Options editedOption) editedOption.SourcePath = textBoxSourcePath.Text; editedOption.DestinyPath = textBoxDestinyPath.Text; editedOption.FileNameConflictMethod = (FileNameConflictMethod)comboBoxMethod.SelectedIndex; - editedOption.SpecifiedFileNamesOrExtensionsMode = radioButtonIgnore.Checked ? SpecifiedEntriesMode.IGNORE : - SpecifiedEntriesMode.ALLOW_ONLY; editedOption.IncludeSubFolders = checkBoxMoveSubfolders.Checked; editedOption.KeepOriginFiles = checkBoxKeepOriginFiles.Checked; editedOption.CleanDestinyDirectory = checkBoxCleanDestinyDirectory.Checked; editedOption.DeleteUncommonFiles = checkBoxDeleteUncommonFiles.Checked; - editedOption.AllowIgnoreFileExt = checkBoxManageFileNamesAndExtensions.Checked; - editedOption.SpecifiedFileNamesAndExtensions = listViewFileNamesAndExtensions.Items.Cast().Select(i => i.Text).ToList(); + editedOption.FilteredFileNamesOrExtensionsMode = radioButtonIgnore1.Checked ? FilterMode.IGNORE : FilterMode.TRANSFER_ONLY; + editedOption.FilteredDirectoriesMode = radioButtonIgnore2.Checked ? FilterMode.IGNORE : FilterMode.TRANSFER_ONLY; + editedOption.FilterFilesAndExts = checkBoxActive1.Checked; + editedOption.FilterDirectories = checkBoxActive2.Checked; + editedOption.FilteredFileNamesAndExtensions = listViewFilesAndExts.Items.Cast().Select(i => i.Text).ToList(); + editedOption.FilteredDirectories = listViewDirs.Items.Cast().Select(i => i.Text).ToList(); editedOption.ReenumerateRenamedFiles = checkBoxReenumerate.Checked; editedOption.MaxKeptRenamedFileCount = (int)numericUpDownMaxKeptRenamedFileCount.Value; } @@ -255,25 +270,22 @@ private void CheckBoxCleanDestinyDirectory_CheckedChanged(object sender, EventAr private void CheckBoxDeleteUncommonFiles_CheckedChanged(object sender, EventArgs e) { - if (checkBoxDeleteUncommonFiles.Checked) - { - if (comboBoxMethod.SelectedIndex == 3) - comboBoxMethod.SelectedIndex = 0; - } + if (checkBoxDeleteUncommonFiles.Checked && comboBoxMethod.SelectedIndex == 3) + comboBoxMethod.SelectedIndex = 0; } - private void ComboBoxMethod_DrawItem(object sender,DrawItemEventArgs args) + private void ComboBoxMethod_DrawItem(object sender, DrawItemEventArgs args) { - if (checkBoxDeleteUncommonFiles.Checked && args.Index == 3) - { - args.Graphics.DrawString(comboBoxMethod.Items[args.Index].ToString(), args.Font, Brushes.LightGray, args.Bounds); - } - else - { - args.DrawBackground(); - args.Graphics.DrawString(comboBoxMethod.Items[args.Index].ToString(), args.Font, Brushes.Black, args.Bounds); - args.DrawFocusRectangle(); - } + //if (checkBoxDeleteUncommonFiles.Checked && args.Index == 3) + // args.Graphics.DrawString(comboBoxMethod.Items[args.Index].ToString(), args.Font, Brushes.LightGray, args.Bounds); + //else + //{ + // args.DrawBackground(); + // args.Graphics.DrawString(comboBoxMethod.Items[args.Index].ToString(), args.Font, Brushes.Black, args.Bounds); + // args.DrawFocusRectangle(); + //} + + FormsUtility.DrawItem(comboBoxMethod, args, checkBoxDeleteUncommonFiles.Checked && args.Index == 3); } private void ComboBoxMethod_SelectedIndexChanged(object sender, EventArgs args) @@ -300,107 +312,148 @@ private void ButtonSwitchPaths_Click(object sender, EventArgs e) textBoxDestinyPath.Text = sourcePath; } + private void FormEditOption_KeyDown(object sender, KeyEventArgs args) + { + if (args.Control && args.KeyCode == Keys.S) + { + args.Handled = true; + SubmitChanges(); + + if (DialogResult != DialogResult.None) Close(); + } + } //-- ################ FILENAMES AND EXTENSIONS METHODS ################ - private void CheckBoxManageFileExtensions_CheckedChanged(object sender, EventArgs e) + private bool FilenameIsValid(string text) { - if (checkBoxManageFileNamesAndExtensions.Checked == true) + int length = text.Length; + + if (text == "" || text.Substring(length - 1) == ".") return false; + if (text[0] == Path.DirectorySeparatorChar && text[1] != Path.DirectorySeparatorChar) return false; + + bool filenameHasDir = text.Contains(Path.DirectorySeparatorChar); // || text.Contains(Path.AltDirectorySeparatorChar); + + string name; + + if (filenameHasDir) { - radioButtonAllowOnly.Enabled = true; - radioButtonIgnore.Enabled = true; - listViewFileNamesAndExtensions.Enabled = true; - listViewFileNamesAndExtensions.ForeColor = System.Drawing.SystemColors.WindowText; - textBoxFileNameOrExtension.Enabled = true; - buttonAddFileOrExtension.Enabled = true; - buttonRemoveFileOrExtension.Enabled = true; + //string dir = Path.GetDirectoryName(text); + //name = Path.GetFileName(text); + string dir = text[..text.LastIndexOf(Path.DirectorySeparatorChar)]; + name = text[(text.LastIndexOf(Path.DirectorySeparatorChar) + 1)..]; + + foreach (char s in Path.GetInvalidPathChars()) + if (dir.Contains(s.ToString())) return false; } else - { - radioButtonAllowOnly.Enabled = false; - radioButtonIgnore.Enabled = false; - listViewFileNamesAndExtensions.Enabled = false; - listViewFileNamesAndExtensions.ForeColor = System.Drawing.SystemColors.InactiveCaption; - textBoxFileNameOrExtension.Enabled = false; - buttonAddFileOrExtension.Enabled = false; - buttonRemoveFileOrExtension.Enabled = false; - } - } + name = text; - private void ButtonAddExtension_Click(object sender, EventArgs e) - { - AddListViewExtension(); + foreach (char s in Path.GetInvalidFileNameChars()) + if (name.Contains(s.ToString())) return false; + + return true; } - private bool FileNameOrExtensionIsValid(string text) + private bool PathIsValid(string text) { - int length = textBoxFileNameOrExtension.Text.Length; + int length = text.Length; + if (text == "" || text.Substring(length - 1) == ".") return false; - foreach (char s in Path.GetInvalidFileNameChars()) + foreach (char s in Path.GetInvalidPathChars()) if (text.Contains(s.ToString())) return false; - //|| text.Substring(0, 1) != "." || text.Substring(1, 1) == "." return true; } - private void ButtonRemoveExtension_Click(object sender, EventArgs e) + private void AddFilterFilesListViewItem() { - RemoveListViewExtension(); - } - - private void RemoveListViewExtension() - { - //-- REMOVE SELECTED - if (listViewFileNamesAndExtensions.SelectedItems.Count > 0) - { - listViewFileNamesAndExtensions.SelectedItems[0].Remove(); - return; - } - //-- REMOVE TYPED - else if (textBoxFileNameOrExtension.Text != "") //ExtensionStringIsValid() + try { - if (listViewFileNamesAndExtensions.Items.Count == 0) return; + string fileOrExt = FileControl.AdjustPath(textBoxFilesAndExts.Text); - ListViewItem listViewItem = FindListViewExtensionsItem(textBoxFileNameOrExtension.Text); + if (!FilenameIsValid(fileOrExt)) + { + MessageBox.Show("Enter a valid filename or extension name,e.g.,\".txt\",\"myfile.exe\",\"C:\\pathto\\myfile.exe\"."); + return; + } - if (listViewItem != null) - listViewFileNamesAndExtensions.Items.Remove(listViewItem); - //else - // MessageBox.Show($"No extension named \"{textBoxExtension.Text}\"."); + if (FindListViewItem(listViewFilesAndExts, fileOrExt) != null) + { + MessageBox.Show("Entry is already in the list."); + return; + } - return; + listViewFilesAndExts.Items.Add(new ListViewItem(fileOrExt)); + FormsUtility.ResizeListViewColumns(listViewFilesAndExts); + } + catch (Exception e) + { + MessageBox.Show(e.Message); } - - MessageBox.Show("Select or type an existing extension to be removed."); } - private ListViewItem FindListViewExtensionsItem(string text) + private void AddFilterDirsListViewItem() { - foreach (ListViewItem item in listViewFileNamesAndExtensions.Items) + try { - if (item.Text == text) - return item; + string dir = FileControl.AdjustPath(textBoxDirs.Text); + + if (!PathIsValid(dir)) + { + MessageBox.Show("Enter a valid directory,e.g.,\"\\relative\\path\",\"C:\\full\\path\",\"\\\\server\\path\""); + return; + } + + if (FindListViewItem(listViewDirs, dir) != null) + { + MessageBox.Show("Entry is already in the list."); + return; + } + + listViewDirs.Items.Add(new ListViewItem(dir)); + FormsUtility.ResizeListViewColumns(listViewDirs); + } + catch (Exception e) + { + MessageBox.Show(e.Message); } - - return null; } - private void AddListViewExtension() + private void RemoveFilterListViewItem(ListView listView, string text) { - if (!FileNameOrExtensionIsValid(textBoxFileNameOrExtension.Text)) + //-- REMOVE SELECTED + if (listView.SelectedItems.Count > 0) + listView.SelectedItems[0].Remove(); + + //-- REMOVE TYPED + else if (text != "") //ExtensionStringIsValid() { - MessageBox.Show("Enter a valid filename or extension name,e.g.,\".txt\",\"myfile.exe\"."); - return; - } + if (listView.Items.Count == 0) return; + + ListViewItem listViewItem = FindListViewItem(listView, text); - if(FindListViewExtensionsItem(textBoxFileNameOrExtension.Text) != null) + if (listViewItem != null) + listView.Items.Remove(listViewItem); + //else + // MessageBox.Show($"No extension named \"{textBoxExtension.Text}\"."); + } + else { - MessageBox.Show("Extension name already entered."); + MessageBox.Show("Select or type an existing entry to be removed."); return; } - listViewFileNamesAndExtensions.Items.Add(new ListViewItem(textBoxFileNameOrExtension.Text)); + FormsUtility.ResizeListViewColumns(listView); + } + + private ListViewItem FindListViewItem(ListView listView, string text) + { + foreach (ListViewItem item in listView.Items) + if (item.Text == text) return item; + + return null; } //this.textBoxExtension.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxExtension_KeyDown); @@ -413,37 +466,82 @@ private void AddListViewExtension() // } //} - private void ListViewExtensions_KeyDown(object sender, KeyEventArgs e) + private void ButtonAddFileOrExt_Click(object sender, EventArgs e) + { + AddFilterFilesListViewItem(); + } + + private void ButtonRemoveFileOrExt_Click(object sender, EventArgs e) { - if (e.KeyCode == Keys.Delete && listViewFileNamesAndExtensions.SelectedItems.Count > 0) - RemoveListViewExtension(); + RemoveFilterListViewItem(listViewFilesAndExts, textBoxFilesAndExts.Text); } - private void TextBoxExtension_KeyPress(object o, KeyPressEventArgs e) + private void ListViewFilesAndExts_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Delete && listViewFilesAndExts.SelectedItems.Count > 0) + RemoveFilterListViewItem(listViewFilesAndExts, textBoxFilesAndExts.Text); + } + + private void TextBoxFilesAndExts_KeyPress(object o, KeyPressEventArgs e) { if (e.KeyChar == (char)Keys.Enter) { e.Handled = true; - AddListViewExtension(); + AddFilterFilesListViewItem(); } } - private void FormEditOption_KeyDown(object sender, KeyEventArgs args) + private void CheckBoxReenumerate_CheckedChanged(object sender, EventArgs e) { - if (args.Control && args.KeyCode == Keys.S) - { - args.Handled = true; - SubmitChanges(); + labelMaxKeptRenamedFileCount.Enabled = checkBoxReenumerate.Checked; + numericUpDownMaxKeptRenamedFileCount.Enabled = checkBoxReenumerate.Checked; + } - if (DialogResult != DialogResult.None) - Close(); + private void ButtonAddDir_Click(object sender, EventArgs e) + { + AddFilterDirsListViewItem(); + } + + private void ButtonRemDir_Click(object sender, EventArgs e) + { + RemoveFilterListViewItem(listViewDirs, textBoxDirs.Text); + } + + private void ListViewDirs_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Delete && listViewDirs.SelectedItems.Count > 0) + RemoveFilterListViewItem(listViewDirs, textBoxDirs.Text); + } + + private void TextBoxDirs_KeyPress(object sender, KeyPressEventArgs e) + { + if (e.KeyChar == (char)Keys.Enter) + { + e.Handled = true; + AddFilterDirsListViewItem(); } } - private void CheckBoxReenumerate_CheckedChanged(object sender, EventArgs e) + private void CheckBoxActive1_CheckedChanged(object sender, EventArgs e) { - labelMaxKeptRenamedFileCount.Enabled = checkBoxReenumerate.Checked; - numericUpDownMaxKeptRenamedFileCount.Enabled = checkBoxReenumerate.Checked; + radioButtonTransferOnly1.Enabled = checkBoxActive1.Checked; + radioButtonIgnore1.Enabled = checkBoxActive1.Checked; + listViewFilesAndExts.Enabled = checkBoxActive1.Checked; + listViewFilesAndExts.ForeColor = checkBoxActive1.Checked ? SystemColors.WindowText : SystemColors.InactiveCaption; + textBoxFilesAndExts.Enabled = checkBoxActive1.Checked; + buttonAddFileOrExt.Enabled = checkBoxActive1.Checked; + buttonRemFileOrExt.Enabled = checkBoxActive1.Checked; + } + + private void CheckBoxActive2_CheckedChanged(object sender, EventArgs e) + { + radioButtonTransferOnly2.Enabled = checkBoxActive2.Checked; + radioButtonIgnore2.Enabled = checkBoxActive2.Checked; + listViewDirs.Enabled = checkBoxActive2.Checked; + listViewDirs.ForeColor = checkBoxActive2.Checked ? SystemColors.WindowText : SystemColors.InactiveCaption; + textBoxDirs.Enabled = checkBoxActive2.Checked; + buttonAddDir.Enabled = checkBoxActive2.Checked; + buttonRemDir.Enabled = checkBoxActive2.Checked; } } } diff --git a/BackupHelper/FormEditOptions.resx b/BackupHelper/Forms/FormEditOptions.resx similarity index 55% rename from BackupHelper/FormEditOptions.resx rename to BackupHelper/Forms/FormEditOptions.resx index 2bd7ee3..8f67db7 100644 --- a/BackupHelper/FormEditOptions.resx +++ b/BackupHelper/Forms/FormEditOptions.resx @@ -1,64 +1,4 @@ - - - + diff --git a/BackupHelper/Forms/FormEditProfile.Designer.cs b/BackupHelper/Forms/FormEditProfile.Designer.cs new file mode 100644 index 0000000..827c40c --- /dev/null +++ b/BackupHelper/Forms/FormEditProfile.Designer.cs @@ -0,0 +1,90 @@ +namespace BackupHelper +{ + partial class FormEditProfile + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + buttonSaveProfile = new Button(); + textBoxProfileName = new TextBox(); + label1 = new Label(); + SuspendLayout(); + // + // buttonSaveProfile + // + buttonSaveProfile.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; + buttonSaveProfile.Location = new Point(103, 67); + buttonSaveProfile.Name = "buttonSaveProfile"; + buttonSaveProfile.Size = new Size(71, 29); + buttonSaveProfile.TabIndex = 1; + buttonSaveProfile.Text = "Save"; + buttonSaveProfile.UseVisualStyleBackColor = true; + buttonSaveProfile.Click += ButtonSaveProfile_Click; + // + // textBoxProfileName + // + textBoxProfileName.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; + textBoxProfileName.Location = new Point(12, 39); + textBoxProfileName.Name = "textBoxProfileName"; + textBoxProfileName.Size = new Size(253, 20); + textBoxProfileName.TabIndex = 0; + textBoxProfileName.KeyDown += TextBoxProfileName_KeyDown; + // + // label1 + // + label1.AutoSize = true; + label1.Location = new Point(15, 16); + label1.Name = "label1"; + label1.Size = new Size(95, 13); + label1.TabIndex = 2; + label1.Text = "Enter profile name:"; + // + // FormEditProfile + // + AutoScaleDimensions = new SizeF(6F, 13F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(277, 107); + Controls.Add(label1); + Controls.Add(textBoxProfileName); + Controls.Add(buttonSaveProfile); + Font = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Regular, GraphicsUnit.Point); + FormBorderStyle = FormBorderStyle.FixedDialog; + MaximizeBox = false; + MinimizeBox = false; + Name = "FormEditProfile"; + StartPosition = FormStartPosition.CenterScreen; + Text = "Edit Profile"; + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private System.Windows.Forms.Button buttonSaveProfile; + private System.Windows.Forms.TextBox textBoxProfileName; + private System.Windows.Forms.Label label1; + } +} \ No newline at end of file diff --git a/BackupHelper/FormEditProfile.cs b/BackupHelper/Forms/FormEditProfile.cs similarity index 98% rename from BackupHelper/FormEditProfile.cs rename to BackupHelper/Forms/FormEditProfile.cs index 6260aa9..4bbe6d8 100644 --- a/BackupHelper/FormEditProfile.cs +++ b/BackupHelper/Forms/FormEditProfile.cs @@ -1,7 +1,4 @@ using BackupHelper.model; -using System; -using System.IO; -using System.Windows.Forms; namespace BackupHelper { diff --git a/BackupHelper/Forms/FormEditProfile.resx b/BackupHelper/Forms/FormEditProfile.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/BackupHelper/Forms/FormEditProfile.resx @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/BackupHelper/Forms/FormErrorDialog.Designer.cs b/BackupHelper/Forms/FormErrorDialog.Designer.cs new file mode 100644 index 0000000..84dc5eb --- /dev/null +++ b/BackupHelper/Forms/FormErrorDialog.Designer.cs @@ -0,0 +1,113 @@ +namespace BackupHelper +{ + partial class FormErrorDialog + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + buttonErrorDialogIgnore = new Button(); + buttonErrorDialogCancel = new Button(); + textBoxErrorDialog = new TextBox(); + buttonTryAgain = new Button(); + SuspendLayout(); + // + // buttonErrorDialogIgnore + // + buttonErrorDialogIgnore.Location = new Point(104, 96); + buttonErrorDialogIgnore.Margin = new Padding(3, 3, 3, 5); + buttonErrorDialogIgnore.Name = "buttonErrorDialogIgnore"; + buttonErrorDialogIgnore.Size = new Size(111, 32); + buttonErrorDialogIgnore.TabIndex = 2; + buttonErrorDialogIgnore.Text = "Ignore and Continue"; + buttonErrorDialogIgnore.UseVisualStyleBackColor = true; + buttonErrorDialogIgnore.Click += ButtonErrorDialogIgnore_Click; + // + // buttonErrorDialogCancel + // + buttonErrorDialogCancel.Location = new Point(230, 96); + buttonErrorDialogCancel.Margin = new Padding(3, 3, 3, 5); + buttonErrorDialogCancel.Name = "buttonErrorDialogCancel"; + buttonErrorDialogCancel.Size = new Size(98, 32); + buttonErrorDialogCancel.TabIndex = 3; + buttonErrorDialogCancel.Text = "Cancel Execution"; + buttonErrorDialogCancel.UseVisualStyleBackColor = true; + buttonErrorDialogCancel.Click += ButtonErrorDialogCancel_Click; + // + // textBoxErrorDialog + // + textBoxErrorDialog.BorderStyle = BorderStyle.None; + textBoxErrorDialog.ImeMode = ImeMode.NoControl; + textBoxErrorDialog.Location = new Point(11, 5); + textBoxErrorDialog.Margin = new Padding(13, 13, 5, 13); + textBoxErrorDialog.Multiline = true; + textBoxErrorDialog.Name = "textBoxErrorDialog"; + textBoxErrorDialog.ReadOnly = true; + textBoxErrorDialog.ScrollBars = ScrollBars.Vertical; + textBoxErrorDialog.Size = new Size(334, 78); + textBoxErrorDialog.TabIndex = 0; + // + // buttonTryAgain + // + buttonTryAgain.Location = new Point(22, 96); + buttonTryAgain.Margin = new Padding(3, 3, 3, 5); + buttonTryAgain.Name = "buttonTryAgain"; + buttonTryAgain.Size = new Size(67, 32); + buttonTryAgain.TabIndex = 1; + buttonTryAgain.Text = "Try Again"; + buttonTryAgain.UseVisualStyleBackColor = true; + buttonTryAgain.Click += ButtonTryAgain_Click; + // + // FormErrorDialog + // + AutoScaleDimensions = new SizeF(6F, 13F); + AutoScaleMode = AutoScaleMode.Font; + AutoSize = true; + ClientSize = new Size(344, 143); + ControlBox = false; + Controls.Add(buttonTryAgain); + Controls.Add(textBoxErrorDialog); + Controls.Add(buttonErrorDialogCancel); + Controls.Add(buttonErrorDialogIgnore); + Font = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Regular, GraphicsUnit.Point); + FormBorderStyle = FormBorderStyle.FixedDialog; + MaximizeBox = false; + MinimizeBox = false; + Name = "FormErrorDialog"; + ShowIcon = false; + StartPosition = FormStartPosition.CenterScreen; + Text = "Error"; + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private System.Windows.Forms.Button buttonErrorDialogIgnore; + private System.Windows.Forms.Button buttonErrorDialogCancel; + private System.Windows.Forms.TextBox textBoxErrorDialog; + private System.Windows.Forms.Button buttonTryAgain; + } +} \ No newline at end of file diff --git a/BackupHelper/Forms/FormErrorDialog.cs b/BackupHelper/Forms/FormErrorDialog.cs new file mode 100644 index 0000000..2c4aa4a --- /dev/null +++ b/BackupHelper/Forms/FormErrorDialog.cs @@ -0,0 +1,51 @@ +using FileControlUtility; + +namespace BackupHelper +{ + public partial class FormErrorDialog : Form + { + //private readonly Type ActionType; + //public object Result; + public TransferErrorAction Result; + + //public FormErrorDialog(Type actionType, string message) + public FormErrorDialog(string message) + { + InitializeComponent(); + textBoxErrorDialog.Text = message; + textBoxErrorDialog.TabStop = false; + //ActionType = actionType; + //if (actionType == typeof(FileTransferErrorActionNonRepeatable)) + // buttonTryAgain.Enabled = false; + } + + private void ButtonErrorDialogIgnore_Click(object sender, EventArgs e) + { + //if (ActionType == typeof(FileTransferErrorActionRepeatable)) + // Result = FileTransferErrorActionRepeatable.SKIP; + //if (ActionType == typeof(FileTransferErrorActionNonRepeatable)) + // Result = FileTransferErrorActionNonRepeatable.SKIP; + + Result = TransferErrorAction.SKIP; + Close(); + } + + private void ButtonErrorDialogCancel_Click(object sender, EventArgs e) + { + //if (ActionType == typeof(FileTransferErrorActionRepeatable)) + // Result = FileTransferErrorActionRepeatable.CANCEL; + //if (ActionType == typeof(FileTransferErrorActionNonRepeatable)) + // Result = FileTransferErrorActionNonRepeatable.CANCEL; + + Result = TransferErrorAction.CANCEL; + Close(); + } + + private void ButtonTryAgain_Click(object sender, EventArgs e) + { + //Result = FileTransferErrorActionRepeatable.REPEAT; + Result = TransferErrorAction.RETRY; + Close(); + } + } +} diff --git a/BackupHelper/Forms/FormErrorDialog.resx b/BackupHelper/Forms/FormErrorDialog.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/BackupHelper/Forms/FormErrorDialog.resx @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/BackupHelper/Forms/FormOptionsMenu.Designer.cs b/BackupHelper/Forms/FormOptionsMenu.Designer.cs new file mode 100644 index 0000000..e1e1571 --- /dev/null +++ b/BackupHelper/Forms/FormOptionsMenu.Designer.cs @@ -0,0 +1,322 @@ +using System.Windows.Forms; + +namespace BackupHelper +{ + partial class FormOptionsMenu + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + buttonAddOption = new Button(); + listViewOptions = new ListView(); + columnHeaderSourcePath = new ColumnHeader(); + columnHeaderDestinyPath = new ColumnHeader(); + columnHeaderMethod = new ColumnHeader(); + columnHeaderMoveSubfolders = new ColumnHeader(); + columnHeaderKeepOrigin = new ColumnHeader(); + columnHeaderCleanDestinyDir = new ColumnHeader(); + columnHeaderDeleteUncommonFiles = new ColumnHeader(); + columnHeaderReorganizeFiles = new ColumnHeader(); + contextMenuStripOptionsList = new ContextMenuStrip(components); + toolStripMenuItemClone = new ToolStripMenuItem(); + toolStripMenuItemRemove = new ToolStripMenuItem(); + toolStripMenuItemCopySourcePath = new ToolStripMenuItem(); + toolStripMenuItemCopyDestinyPath = new ToolStripMenuItem(); + toolStripMenuItemOpenSourceFolder = new ToolStripMenuItem(); + toolStripMenuItemOpenDestinyFolder = new ToolStripMenuItem(); + buttonExecute = new Button(); + progressBarOptions = new ProgressBar(); + buttonCancel = new Button(); + labelTransfering = new Label(); + textBoxTransfering = new TextBox(); + buttonShowResult = new Button(); + checkBoxShowResult = new CheckBox(); + contextMenuStripOptionsList.SuspendLayout(); + SuspendLayout(); + // + // buttonAddOption + // + buttonAddOption.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; + buttonAddOption.Location = new Point(1, 224); + buttonAddOption.Name = "buttonAddOption"; + buttonAddOption.Size = new Size(95, 30); + buttonAddOption.TabIndex = 1; + buttonAddOption.Text = "Add Option"; + buttonAddOption.UseVisualStyleBackColor = true; + buttonAddOption.Click += ButtonAddOption_Click; + // + // listViewOptions + // + listViewOptions.AllowDrop = true; + listViewOptions.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; + listViewOptions.BackColor = SystemColors.Window; + listViewOptions.Columns.AddRange(new ColumnHeader[] { columnHeaderSourcePath, columnHeaderDestinyPath, columnHeaderMethod, columnHeaderMoveSubfolders, columnHeaderKeepOrigin, columnHeaderCleanDestinyDir, columnHeaderDeleteUncommonFiles, columnHeaderReorganizeFiles }); + listViewOptions.ContextMenuStrip = contextMenuStripOptionsList; + listViewOptions.FullRowSelect = true; + listViewOptions.GridLines = true; + listViewOptions.HeaderStyle = ColumnHeaderStyle.Nonclickable; + listViewOptions.Location = new Point(0, 0); + listViewOptions.Name = "listViewOptions"; + listViewOptions.ShowItemToolTips = true; + listViewOptions.Size = new Size(1163, 224); + listViewOptions.TabIndex = 0; + listViewOptions.UseCompatibleStateImageBehavior = false; + listViewOptions.View = View.Details; + listViewOptions.KeyDown += ListViewOptions_KeyPress; + // + // columnHeaderSourcePath + // + columnHeaderSourcePath.Text = "Source Path"; + columnHeaderSourcePath.Width = 290; + // + // columnHeaderDestinyPath + // + columnHeaderDestinyPath.Text = "Destiny Path"; + columnHeaderDestinyPath.Width = 290; + // + // columnHeaderMethod + // + columnHeaderMethod.Text = "Filename Conflict Opt."; + columnHeaderMethod.Width = 175; + // + // columnHeaderMoveSubfolders + // + columnHeaderMoveSubfolders.Text = "Move Subfolders"; + columnHeaderMoveSubfolders.Width = 80; + // + // columnHeaderKeepOrigin + // + columnHeaderKeepOrigin.Text = "Keep Origin Files"; + columnHeaderKeepOrigin.Width = 80; + // + // columnHeaderCleanDestinyDir + // + columnHeaderCleanDestinyDir.Text = "Clean Dest. Dir."; + columnHeaderCleanDestinyDir.Width = 80; + // + // columnHeaderDeleteUncommonFiles + // + columnHeaderDeleteUncommonFiles.Text = "Del. Uncommon Files"; + columnHeaderDeleteUncommonFiles.Width = 80; + // + // columnHeaderReorganizeFiles + // + columnHeaderReorganizeFiles.Text = "Reorg. renamed files"; + columnHeaderReorganizeFiles.Width = 80; + // + // contextMenuStripOptionsList + // + contextMenuStripOptionsList.Items.AddRange(new ToolStripItem[] { toolStripMenuItemClone, toolStripMenuItemRemove, toolStripMenuItemCopySourcePath, toolStripMenuItemCopyDestinyPath, toolStripMenuItemOpenSourceFolder, toolStripMenuItemOpenDestinyFolder }); + contextMenuStripOptionsList.Name = "contextMenuStrip1"; + contextMenuStripOptionsList.Size = new Size(179, 136); + contextMenuStripOptionsList.Opening += ContextMenuStripOptionsList_Opening; + // + // toolStripMenuItemClone + // + toolStripMenuItemClone.Name = "toolStripMenuItemClone"; + toolStripMenuItemClone.Size = new Size(178, 22); + toolStripMenuItemClone.Text = "Clone"; + toolStripMenuItemClone.Click += CloneOptionToolStripMenuItem_Click; + // + // toolStripMenuItemRemove + // + toolStripMenuItemRemove.Name = "toolStripMenuItemRemove"; + toolStripMenuItemRemove.Size = new Size(178, 22); + toolStripMenuItemRemove.Text = "Remove"; + toolStripMenuItemRemove.Click += ToolStripMenuItemRemove_Click; + // + // toolStripMenuItemCopySourcePath + // + toolStripMenuItemCopySourcePath.Name = "toolStripMenuItemCopySourcePath"; + toolStripMenuItemCopySourcePath.Size = new Size(178, 22); + toolStripMenuItemCopySourcePath.Text = "Copy source path"; + toolStripMenuItemCopySourcePath.Click += ToolStripMenuItemCopySourcePath_Click; + // + // toolStripMenuItemCopyDestinyPath + // + toolStripMenuItemCopyDestinyPath.Name = "toolStripMenuItemCopyDestinyPath"; + toolStripMenuItemCopyDestinyPath.Size = new Size(178, 22); + toolStripMenuItemCopyDestinyPath.Text = "Copy destiny path"; + toolStripMenuItemCopyDestinyPath.Click += ToolStripMenuItemCopyDestinyPath_Click; + // + // toolStripMenuItemOpenSourceFolder + // + toolStripMenuItemOpenSourceFolder.Name = "toolStripMenuItemOpenSourceFolder"; + toolStripMenuItemOpenSourceFolder.Size = new Size(178, 22); + toolStripMenuItemOpenSourceFolder.Text = "Open source folder"; + toolStripMenuItemOpenSourceFolder.Click += ToolStripMenuItemOpenSourceFolder_Click; + // + // toolStripMenuItemOpenDestinyFolder + // + toolStripMenuItemOpenDestinyFolder.Name = "toolStripMenuItemOpenDestinyFolder"; + toolStripMenuItemOpenDestinyFolder.Size = new Size(178, 22); + toolStripMenuItemOpenDestinyFolder.Text = "Open destiny folder"; + toolStripMenuItemOpenDestinyFolder.Click += ToolStripMenuItemOpenDestinyFolder_Click; + // + // buttonExecute + // + buttonExecute.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; + buttonExecute.BackColor = Color.White; + buttonExecute.FlatAppearance.BorderColor = Color.Red; + buttonExecute.FlatAppearance.MouseDownBackColor = Color.FromArgb(255, 128, 128); + buttonExecute.Location = new Point(95, 224); + buttonExecute.Name = "buttonExecute"; + buttonExecute.Size = new Size(95, 30); + buttonExecute.TabIndex = 4; + buttonExecute.Text = "Execute"; + buttonExecute.UseVisualStyleBackColor = false; + buttonExecute.Click += ButtonExecute_Click; + // + // progressBarOptions + // + progressBarOptions.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; + progressBarOptions.Enabled = false; + progressBarOptions.Location = new Point(0, 254); + progressBarOptions.Maximum = 10000; + progressBarOptions.Name = "progressBarOptions"; + progressBarOptions.Size = new Size(1163, 12); + progressBarOptions.TabIndex = 4; + // + // buttonCancel + // + buttonCancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonCancel.BackColor = Color.FromArgb(255, 192, 192); + buttonCancel.FlatAppearance.BorderColor = Color.Red; + buttonCancel.FlatAppearance.BorderSize = 2; + buttonCancel.ForeColor = Color.White; + buttonCancel.Location = new Point(1068, 224); + buttonCancel.Name = "buttonCancel"; + buttonCancel.Size = new Size(95, 30); + buttonCancel.TabIndex = 8; + buttonCancel.Text = "CANCEL"; + buttonCancel.UseVisualStyleBackColor = false; + buttonCancel.Visible = false; + buttonCancel.Click += ButtonCancel_Click; + // + // labelTransfering + // + labelTransfering.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; + labelTransfering.AutoSize = true; + labelTransfering.Location = new Point(12, 233); + labelTransfering.Name = "labelTransfering"; + labelTransfering.Size = new Size(63, 13); + labelTransfering.TabIndex = 6; + labelTransfering.Text = "Transfering:"; + labelTransfering.Visible = false; + // + // textBoxTransfering + // + textBoxTransfering.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; + textBoxTransfering.BackColor = SystemColors.Control; + textBoxTransfering.BorderStyle = BorderStyle.None; + textBoxTransfering.Font = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Bold, GraphicsUnit.Point); + textBoxTransfering.Location = new Point(85, 233); + textBoxTransfering.Name = "textBoxTransfering"; + textBoxTransfering.ReadOnly = true; + textBoxTransfering.Size = new Size(964, 13); + textBoxTransfering.TabIndex = 7; + textBoxTransfering.Visible = false; + // + // buttonShowResult + // + buttonShowResult.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonShowResult.Enabled = false; + buttonShowResult.Location = new Point(1054, 224); + buttonShowResult.Name = "buttonShowResult"; + buttonShowResult.Size = new Size(108, 30); + buttonShowResult.TabIndex = 8; + buttonShowResult.Text = "Show Last Result"; + buttonShowResult.UseVisualStyleBackColor = true; + buttonShowResult.Click += ButtonShowResult_Click; + // + // checkBoxShowResult + // + checkBoxShowResult.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + checkBoxShowResult.AutoSize = true; + checkBoxShowResult.Checked = true; + checkBoxShowResult.CheckState = CheckState.Checked; + checkBoxShowResult.Location = new Point(912, 232); + checkBoxShowResult.Name = "checkBoxShowResult"; + checkBoxShowResult.Size = new Size(137, 17); + checkBoxShowResult.TabIndex = 7; + checkBoxShowResult.Text = "Show result when done"; + checkBoxShowResult.UseVisualStyleBackColor = true; + // + // FormOptionsMenu + // + AutoScaleDimensions = new SizeF(6F, 13F); + AutoScaleMode = AutoScaleMode.Font; + BackColor = SystemColors.Control; + ClientSize = new Size(1163, 261); + Controls.Add(checkBoxShowResult); + Controls.Add(textBoxTransfering); + Controls.Add(labelTransfering); + Controls.Add(progressBarOptions); + Controls.Add(buttonExecute); + Controls.Add(listViewOptions); + Controls.Add(buttonAddOption); + Controls.Add(buttonShowResult); + Controls.Add(buttonCancel); + Font = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Regular, GraphicsUnit.Point); + Name = "FormOptionsMenu"; + ShowIcon = false; + StartPosition = FormStartPosition.CenterScreen; + Text = "Options - Backup Helper"; + FormClosing += FormOptionsMenu_FormClosing; + contextMenuStripOptionsList.ResumeLayout(false); + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private System.Windows.Forms.Button buttonAddOption; + private System.Windows.Forms.ColumnHeader columnHeaderSourcePath; + private System.Windows.Forms.ColumnHeader columnHeaderDestinyPath; + private System.Windows.Forms.ColumnHeader columnHeaderMethod; + private System.Windows.Forms.ColumnHeader columnHeaderMoveSubfolders; + private System.Windows.Forms.ColumnHeader columnHeaderKeepOrigin; + private System.Windows.Forms.Button buttonExecute; + private System.Windows.Forms.ProgressBar progressBarOptions; + private System.Windows.Forms.Button buttonCancel; + private System.Windows.Forms.Label labelTransfering; + private System.Windows.Forms.TextBox textBoxTransfering; + private System.Windows.Forms.ColumnHeader columnHeaderCleanDestinyDir; + private System.Windows.Forms.ContextMenuStrip contextMenuStripOptionsList; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemCopySourcePath; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemCopyDestinyPath; + private System.Windows.Forms.Button buttonShowResult; + private System.Windows.Forms.CheckBox checkBoxShowResult; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemOpenSourceFolder; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemOpenDestinyFolder; + private System.Windows.Forms.ColumnHeader columnHeaderDeleteUncommonFiles; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemClone; + public ListView listViewOptions; + private ToolStripMenuItem toolStripMenuItemRemove; + private ColumnHeader columnHeaderReorganizeFiles; + } +} \ No newline at end of file diff --git a/BackupHelper/FormOptionsMenu.cs b/BackupHelper/Forms/FormOptionsMenu.cs similarity index 86% rename from BackupHelper/FormOptionsMenu.cs rename to BackupHelper/Forms/FormOptionsMenu.cs index 31543a2..06ecac2 100644 --- a/BackupHelper/FormOptionsMenu.cs +++ b/BackupHelper/Forms/FormOptionsMenu.cs @@ -1,12 +1,6 @@ using BackupHelper.model; -using System; -using System.Collections.Generic; using System.ComponentModel; using System.Data; -using System.Drawing; -using System.Linq; -using System.Threading; -using System.Windows.Forms; using FileControlUtility; namespace BackupHelper @@ -16,12 +10,12 @@ public partial class FormOptionsMenu : Form public readonly Profile Profile; public List Options; private readonly FormProfileMenu ProfileMenu; - public FileControlImpl FileControl; + public FileControl FileControl; private Thread ExecutionThread; private readonly FormCancelExecution CancelExecutionForm; //-- Clicking/dragdrop functions - private System.Timers.Timer ClickTimer = new System.Timers.Timer(300); + private readonly System.Timers.Timer ClickTimer = new(300); private int MouseDownCount = 0; private int MouseUpCount = 0; private ListViewItem ClickedItem; @@ -172,7 +166,7 @@ private void ListOptions() foreach (Options option in Options) { - ListViewItem item = new ListViewItem(); + ListViewItem item = new(); EditListViewItem(option, item); listViewOptions.Items.Add(item); } @@ -215,7 +209,7 @@ private void ButtonAddOption_Click(object sender, EventArgs args) try { FormEditOptions form = FormEditOptions.GetInstance(this); - + if (form.Visible) form.WindowState = FormWindowState.Normal; else @@ -232,7 +226,7 @@ private void EditSelectedOption() try { Options option = Options.Find(o => o.Id == (int)listViewOptions.SelectedItems[0].Tag); - + FormEditOptions form = FormEditOptions.GetInstance(this, option); if (form.Visible) @@ -254,7 +248,7 @@ public void EditListViewItem(Options option, ListViewItem item = null) { if (item == null) item = GetListViewItemById(option.Id); - + string transferMethod = !option.CleanDestinyDirectory ? option.GetTransferMethodDescription(option.FileNameConflictMethod) : "None"; //string[] range = Enumerable.Repeat("", Enum.GetNames(typeof(ListViewOptionSubItemIndex)).Length).ToArray(); @@ -270,7 +264,7 @@ public void EditListViewItem(Options option, ListViewItem item = null) option.DeleteUncommonFiles.ToString(), option.ReenumerateRenamedFiles.ToString() }); - + item.Tag = option.Id; } @@ -308,24 +302,24 @@ private void FormOptionsMenu_FormClosing(object sender, FormClosingEventArgs arg private void ButtonDeleteOption_Click(object sender, EventArgs args) { - DeleteSelectedOption(); + DeleteSelectedOptions(); } - private void DeleteSelectedOption() + private void DeleteSelectedOptions() { try { - ListViewItem selectedItem = listViewOptions.SelectedItems[0]; - - if (MessageBox.Show("Delete selected option?", "", MessageBoxButtons.OKCancel) == DialogResult.OK) + if (MessageBox.Show("Delete selected option(s)?", "", MessageBoxButtons.OKCancel) == DialogResult.Cancel) return; + + foreach (var item in listViewOptions.SelectedItems) { - var option = Options.Find(o => o.Id == (int)selectedItem.Tag); + var option = Options.Find(o => o.Id == (int)listViewOptions.SelectedItems[0].Tag); DBAccess.DeleteOption(option); Options.Remove(option); - selectedItem.Remove(); + listViewOptions.SelectedItems[0].Remove(); Program.UpdateLastTimeModified(Profile); UpdateOptionListViewIndexes(); - //ResizeForm(); + //ResizeForm(); } } catch (ArgumentOutOfRangeException) @@ -342,7 +336,7 @@ private void ButtonExecute_Click(object sender, EventArgs args) { try { - if (Options.Count() == 0) + if (Options.Count == 0) { MessageBox.Show("No options were added."); return; @@ -351,12 +345,14 @@ private void ButtonExecute_Click(object sender, EventArgs args) List options = Options.OrderBy(o => o.ListViewIndex).Select(o => o.Clone()).ToList(); foreach (Options o in options) { - if (!o.AllowIgnoreFileExt) o.SpecifiedFileNamesAndExtensions.Clear(); //-- Names must be ignored + if (!o.FilterFilesAndExts) o.FilteredFileNamesAndExtensions.Clear(); //-- Names must be ignored + if (!o.FilterDirectories) o.FilteredDirectories.Clear(); o.SourcePath = Environment.ExpandEnvironmentVariables(o.SourcePath); o.DestinyPath = Environment.ExpandEnvironmentVariables(o.DestinyPath); } - FileControl = new FileControlImpl(this); + FileControl = new(); + Program.ConfigureFileEvents(FileControl, this); progressBarOptions.Maximum = FileControl.FilesTotal(options.ToList()); //this.OptionIsExecuting = true; @@ -381,7 +377,7 @@ private void ButtonExecute_Click(object sender, EventArgs args) { try { - FileControl.ManageFiles(options.ToList()); + FileControl.Transfer(options.ToList()); } catch (Exception e) { @@ -410,9 +406,9 @@ private void ButtonExecute_Click(object sender, EventArgs args) Enabled = true; ProfileMenu.LastReport = new FormReport(this, FileControl.TransferedFilesReports, FileControl.NotTransferedFilesReports, - FileControl.RenamedFilesReports, FileControl.CreatedDirReports, FileControl.ReplacedFilesReports, + FileControl.RenamedFilesReports, FileControl.CreatedDirReports, FileControl.ReplacedFilesReports, FileControl.RemovedFilesAndDirReports); - + if (checkBoxShowResult.Checked) ProfileMenu.LastReport.Show(); })); @@ -455,18 +451,40 @@ public void ShowCurrentFileExecution(string filename) private void ContextMenuStripOptionsList_Opening(object sender, CancelEventArgs args) { - if (listViewOptions.SelectedItems.Count != 1) args.Cancel = true; + if (listViewOptions.SelectedItems.Count < 1) + { + args.Cancel = true; + return; + } + + if (listViewOptions.SelectedItems.Count > 1) + { + //toolStripMenuItemClone.Enabled = false; + //toolStripMenuItemRemove.Enabled = false; + toolStripMenuItemCopySourcePath.Enabled = false; + toolStripMenuItemCopyDestinyPath.Enabled = false; + toolStripMenuItemOpenSourceFolder.Enabled = false; + toolStripMenuItemOpenDestinyFolder.Enabled = false; + return; + } + + toolStripMenuItemCopySourcePath.Enabled = true; + toolStripMenuItemCopyDestinyPath.Enabled = true; + toolStripMenuItemOpenSourceFolder.Enabled = true; + toolStripMenuItemOpenDestinyFolder.Enabled = true; } private void ToolStripMenuItemCopySourcePath_Click(object sender, EventArgs e) { - CopyToClipboard(listViewOptions.SelectedItems[0].Text); + //CopyToClipboard(listViewOptions.SelectedItems[0].Text); + Clipboard.SetText(listViewOptions.SelectedItems[0].Text); } private void ToolStripMenuItemCopyDestinyPath_Click(object sender, EventArgs e) { //CopyToClipboard(listViewOptions.SelectedItems[0].SubItems[(int)ListViewOptionSubItemIndex.INDEX_DESTINY_PATH].Text); - CopyToClipboard(Options.Find(o => o.Id == (int)listViewOptions.SelectedItems[0].Tag).DestinyPath); + //CopyToClipboard(Options.Find(o => o.Id == (int)listViewOptions.SelectedItems[0].Tag).DestinyPath); + Clipboard.SetText(Options.Find(o => o.Id == (int)listViewOptions.SelectedItems[0].Tag).DestinyPath); } private void ToolStripMenuItemOpenSourceFolder_Click(object sender, EventArgs e) @@ -489,20 +507,28 @@ private void ToolStripMenuItemOpenDestinyFolder_Click(object sender, EventArgs e private void ListViewOptions_KeyPress(object sender, KeyEventArgs args) { if (args.KeyCode == Keys.Delete) - { - if (listViewOptions.SelectedItems.Count > 0) DeleteSelectedOption(); - } + if (listViewOptions.SelectedItems.Count > 0) DeleteSelectedOptions(); else if (args.KeyCode == Keys.Enter) - { if (listViewOptions.SelectedItems.Count > 0) EditSelectedOption(); - } } - private void CopyToClipboard(string text) + //private void CopyToClipboard(string text) + //{ + // try + // { + // Clipboard.SetDataObject(text, false, 5, 200); + // } + // catch (Exception e) + // { + // MessageBox.Show($"Error: {e.Message}"); + // } + //} + + private void OpenFolder(string path) { try { - Clipboard.SetDataObject(text, false, 5, 200); + System.Diagnostics.Process.Start(path); } catch (Exception e) { @@ -510,22 +536,41 @@ private void CopyToClipboard(string text) } } - private void OpenFolder(string path) + private void ButtonShowResult_Click(object sender, EventArgs args) + { + ProfileMenu.LastReport?.Show(); + } + + private void CloneOptionToolStripMenuItem_Click(object sender, EventArgs args) { try { - System.Diagnostics.Process.Start(path); + if (MessageBox.Show("Clone selected option(s)?", "", MessageBoxButtons.OKCancel) + == DialogResult.Cancel) return; + + foreach (ListViewItem item in listViewOptions.SelectedItems) + { + Options selectedOption = Options.Find(o => o.Id == (int)item.Tag); + Options clonedOption = selectedOption.Clone(); + clonedOption.ListViewIndex = listViewOptions.Items.Count; + DBAccess.CreateOption(clonedOption); + Options.Add(clonedOption); + Program.UpdateLastTimeModified(Profile); + ListViewItem newItem = new(); + EditListViewItem(clonedOption, newItem); + listViewOptions.Items.Add(newItem); + //ResizeForm(); + } } catch (Exception e) { - MessageBox.Show($"Error: {e.Message}"); + MessageBox.Show(e.Message); } } - private void ButtonShowResult_Click(object sender, EventArgs args) + private void ToolStripMenuItemRemove_Click(object sender, EventArgs e) { - if (ProfileMenu.LastReport != null) - ProfileMenu.LastReport.Show(); + DeleteSelectedOptions(); } //private void LabelMoveOptionUp_Click(object sender, EventArgs args) @@ -571,7 +616,7 @@ private void ButtonShowResult_Click(object sender, EventArgs args) // listViewOptions.Items[selectedItemIndex] = previousItemClone; // listViewOptions.Items[previousItemIndex] = selectedItemClone; - + // listViewOptions.Items[previousItemIndex].Selected = true; // } // catch (ArgumentOutOfRangeException) { } @@ -632,32 +677,5 @@ private void ButtonShowResult_Click(object sender, EventArgs args) // MessageBox.Show(e.Message); // } //} - - private void CloneOptionToolStripMenuItem_Click(object sender, EventArgs args) - { - try - { - Options selectedOption = Options.Find(o => o.Id == (int)listViewOptions.SelectedItems[0].Tag); - - Options clonedOption = selectedOption.Clone(); - clonedOption.ListViewIndex = listViewOptions.Items.Count; - DBAccess.AddOption(clonedOption); - Options.Add(clonedOption); - Program.UpdateLastTimeModified(Profile); - ListViewItem item = new ListViewItem(); - EditListViewItem(clonedOption, item); - listViewOptions.Items.Add(item); - //ResizeForm(); - } - catch (Exception e) - { - MessageBox.Show(e.Message); - } - } - - private void ToolStripMenuItemRemove_Click(object sender, EventArgs e) - { - DeleteSelectedOption(); - } } } diff --git a/BackupHelper/FormOptionsMenu.resx b/BackupHelper/Forms/FormOptionsMenu.resx similarity index 50% rename from BackupHelper/FormOptionsMenu.resx rename to BackupHelper/Forms/FormOptionsMenu.resx index 6889192..5267eae 100644 --- a/BackupHelper/FormOptionsMenu.resx +++ b/BackupHelper/Forms/FormOptionsMenu.resx @@ -1,64 +1,4 @@ - - - + diff --git a/BackupHelper/Forms/FormProfileMenu.Designer.cs b/BackupHelper/Forms/FormProfileMenu.Designer.cs new file mode 100644 index 0000000..39c7a17 --- /dev/null +++ b/BackupHelper/Forms/FormProfileMenu.Designer.cs @@ -0,0 +1,200 @@ +namespace BackupHelper +{ + partial class FormProfileMenu + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + listViewProfile = new ListView(); + columnHeaderProfileName = new ColumnHeader(); + columnHeaderLastTimeExecuted = new ColumnHeader(); + columnHeaderProfileLastTimeModified = new ColumnHeader(); + columnHeaderProfileTimeCreated = new ColumnHeader(); + contextMenuStripProfile = new ContextMenuStrip(components); + toolStripMenuItemChangeName = new ToolStripMenuItem(); + toolStripMenuItemClone = new ToolStripMenuItem(); + toolStripMenuItemGroup = new ToolStripMenuItem(); + toolStripMenuItemGenerateShortcut = new ToolStripMenuItem(); + toolStripMenuItemDeleteProfile = new ToolStripMenuItem(); + buttonAddProfile = new Button(); + buttonOpenLogFile = new Button(); + labelVersion = new Label(); + saveFileDialogShortcut = new SaveFileDialog(); + contextMenuStripProfile.SuspendLayout(); + SuspendLayout(); + // + // listViewProfile + // + listViewProfile.AllowDrop = true; + listViewProfile.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; + listViewProfile.Columns.AddRange(new ColumnHeader[] { columnHeaderProfileName, columnHeaderLastTimeExecuted, columnHeaderProfileLastTimeModified, columnHeaderProfileTimeCreated }); + listViewProfile.ContextMenuStrip = contextMenuStripProfile; + listViewProfile.FullRowSelect = true; + listViewProfile.GridLines = true; + listViewProfile.HeaderStyle = ColumnHeaderStyle.Nonclickable; + listViewProfile.Location = new Point(0, 0); + listViewProfile.Name = "listViewProfile"; + listViewProfile.ShowItemToolTips = true; + listViewProfile.Size = new Size(698, 324); + listViewProfile.TabIndex = 0; + listViewProfile.UseCompatibleStateImageBehavior = false; + listViewProfile.View = View.Details; + listViewProfile.KeyDown += ListViewProfile_KeyDown; + // + // columnHeaderProfileName + // + columnHeaderProfileName.Text = "Profile Name"; + columnHeaderProfileName.Width = 363; + // + // columnHeaderLastTimeExecuted + // + columnHeaderLastTimeExecuted.Text = "Time Executed"; + columnHeaderLastTimeExecuted.Width = 110; + // + // columnHeaderProfileLastTimeModified + // + columnHeaderProfileLastTimeModified.Text = "Time Modified"; + columnHeaderProfileLastTimeModified.Width = 110; + // + // columnHeaderProfileTimeCreated + // + columnHeaderProfileTimeCreated.Text = "Created At"; + columnHeaderProfileTimeCreated.Width = 110; + // + // contextMenuStripProfile + // + contextMenuStripProfile.Items.AddRange(new ToolStripItem[] { toolStripMenuItemChangeName, toolStripMenuItemClone, toolStripMenuItemGroup, toolStripMenuItemGenerateShortcut, toolStripMenuItemDeleteProfile }); + contextMenuStripProfile.Name = "contextMenuStripProfile"; + contextMenuStripProfile.Size = new Size(169, 114); + // + // toolStripMenuItemChangeName + // + toolStripMenuItemChangeName.Name = "toolStripMenuItemChangeName"; + toolStripMenuItemChangeName.Size = new Size(168, 22); + toolStripMenuItemChangeName.Text = "Change name"; + toolStripMenuItemChangeName.Click += ToolStripMenuItemChangeName_Click; + // + // toolStripMenuItemClone + // + toolStripMenuItemClone.Name = "toolStripMenuItemClone"; + toolStripMenuItemClone.Size = new Size(168, 22); + toolStripMenuItemClone.Text = "Clone"; + toolStripMenuItemClone.Click += ToolStripMenuItemClone_Click; + // + // toolStripMenuItemGroup + // + toolStripMenuItemGroup.Name = "toolStripMenuItemGroup"; + toolStripMenuItemGroup.Size = new Size(168, 22); + toolStripMenuItemGroup.Text = "Group"; + toolStripMenuItemGroup.Click += ToolStripMenuItemGroup_Click; + // + // toolStripMenuItemGenerateShortcut + // + toolStripMenuItemGenerateShortcut.Name = "toolStripMenuItemGenerateShortcut"; + toolStripMenuItemGenerateShortcut.Size = new Size(168, 22); + toolStripMenuItemGenerateShortcut.Text = "Generate shortcut"; + toolStripMenuItemGenerateShortcut.Click += ToolStripMenuItemGenerateShortcut_Click; + // + // toolStripMenuItemDeleteProfile + // + toolStripMenuItemDeleteProfile.Name = "toolStripMenuItemDeleteProfile"; + toolStripMenuItemDeleteProfile.Size = new Size(168, 22); + toolStripMenuItemDeleteProfile.Text = "Delete"; + toolStripMenuItemDeleteProfile.Click += ToolStripMenuItemDeleteProfile_Click; + // + // buttonAddProfile + // + buttonAddProfile.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; + buttonAddProfile.BackColor = SystemColors.ControlLightLight; + buttonAddProfile.FlatAppearance.BorderSize = 0; + buttonAddProfile.Location = new Point(0, 324); + buttonAddProfile.Name = "buttonAddProfile"; + buttonAddProfile.Size = new Size(100, 30); + buttonAddProfile.TabIndex = 2; + buttonAddProfile.Text = "Add Profile"; + buttonAddProfile.UseVisualStyleBackColor = false; + buttonAddProfile.Click += ButtonAddProfile_Click; + // + // buttonOpenLogFile + // + buttonOpenLogFile.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonOpenLogFile.Location = new Point(598, 324); + buttonOpenLogFile.Name = "buttonOpenLogFile"; + buttonOpenLogFile.Size = new Size(100, 30); + buttonOpenLogFile.TabIndex = 5; + buttonOpenLogFile.Text = "Open Log File"; + buttonOpenLogFile.UseVisualStyleBackColor = true; + buttonOpenLogFile.Click += ButtonOpenLogFile_Click; + // + // labelVersion + // + labelVersion.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; + labelVersion.AutoSize = true; + labelVersion.Font = new Font("Microsoft Sans Serif", 7F, FontStyle.Regular, GraphicsUnit.Point); + labelVersion.Location = new Point(116, 332); + labelVersion.Name = "labelVersion"; + labelVersion.Size = new Size(0, 13); + labelVersion.TabIndex = 10; + // + // FormProfileMenu + // + AutoScaleDimensions = new SizeF(6F, 13F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(698, 354); + Controls.Add(labelVersion); + Controls.Add(buttonOpenLogFile); + Controls.Add(buttonAddProfile); + Controls.Add(listViewProfile); + Font = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Regular, GraphicsUnit.Point); + Name = "FormProfileMenu"; + ShowIcon = false; + StartPosition = FormStartPosition.CenterScreen; + Text = "Profile List - Backup Helper"; + contextMenuStripProfile.ResumeLayout(false); + ResumeLayout(false); + PerformLayout(); + } + + #endregion + private System.Windows.Forms.ColumnHeader columnHeaderProfileName; + private System.Windows.Forms.ColumnHeader columnHeaderProfileTimeCreated; + private System.Windows.Forms.Button buttonAddProfile; + private System.Windows.Forms.Button buttonOpenLogFile; + private System.Windows.Forms.ColumnHeader columnHeaderProfileLastTimeModified; + private System.Windows.Forms.ColumnHeader columnHeaderLastTimeExecuted; + private System.Windows.Forms.Label labelVersion; + public System.Windows.Forms.ListView listViewProfile; + private System.Windows.Forms.ContextMenuStrip contextMenuStripProfile; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemChangeName; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemDeleteProfile; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemClone; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemGroup; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemGenerateShortcut; + private System.Windows.Forms.SaveFileDialog saveFileDialogShortcut; + } +} + diff --git a/BackupHelper/FormProfileMenu.cs b/BackupHelper/Forms/FormProfileMenu.cs similarity index 93% rename from BackupHelper/FormProfileMenu.cs rename to BackupHelper/Forms/FormProfileMenu.cs index a0831bf..9c7e72c 100644 --- a/BackupHelper/FormProfileMenu.cs +++ b/BackupHelper/Forms/FormProfileMenu.cs @@ -1,13 +1,7 @@ using BackupHelper.model; using BinanceAutoTrader; -using System; -using System.Collections.Generic; using System.Data; -using System.Drawing; -using System.IO; -using System.Linq; using System.Reflection; -using System.Windows.Forms; namespace BackupHelper { @@ -25,7 +19,7 @@ public partial class FormProfileMenu : Form //private readonly int MaximumListViewItemCount; //-- Clicking/dragdrop functions - private System.Timers.Timer ClickTimer = new System.Timers.Timer(300); + private readonly System.Timers.Timer ClickTimer = new(300); private int MouseDownCount = 0; private int MouseUpCount = 0; private ListViewItem ClickedItem; @@ -35,7 +29,7 @@ public FormProfileMenu() InitializeComponent(); listViewProfile.Groups.Add("Ungrouped", "Ungrouped"); contextMenuStripProfile.Opening += ContextMenuStripProfile_Opening; - labelVersion.Text = $"Version {Application.ProductVersion} ©{Application.CompanyName} 2022"; + labelVersion.Text = $"Version {System.Windows.Forms.Application.ProductVersion} ©{System.Windows.Forms.Application.CompanyName} 2023"; KeyPreview = true; ClickTimer.Elapsed += ClickTimer_Elapsed; ClickTimer.AutoReset = false; @@ -159,13 +153,11 @@ private void ContextMenuStripProfile_Opening(object sender, System.ComponentMode { toolStripMenuItemChangeName.Enabled = true; toolStripMenuItemClone.Enabled = true; - toolStripMenuItemDeleteProfile.Enabled = true; } else if (listViewProfile.SelectedItems.Count > 1) { toolStripMenuItemChangeName.Enabled = false; toolStripMenuItemClone.Enabled = false; - toolStripMenuItemDeleteProfile.Enabled = false; } else e.Cancel = true; @@ -176,7 +168,7 @@ private void ListProfiles() try { Profiles = DBAccess.ListProfiles().OrderBy(p => p.ListViewIndex).ToList(); - + foreach (Profile prof in Profiles) { ListViewItem item = new ListViewItem(); @@ -206,7 +198,7 @@ private void UpdateProfileListViewIndexes() { foreach (ListViewItem item in listViewProfile.Items) { - Profile profile= Profiles.Find(o => o.Id == (int)item.Tag); + Profile profile = Profiles.Find(o => o.Id == (int)item.Tag); if (profile.ListViewIndex != item.Index) { @@ -317,21 +309,20 @@ private void EditSelectedProfileName() } } - private void DeleteSelectedProfile() + private void DeleteSelectedProfiles() { try { - ListViewItem selectedItem = listViewProfile.SelectedItems[0]; - Profile profile = Profiles.Find(p => p.Id == int.Parse(selectedItem.Tag.ToString())); - string text = $"Delete \"{profile.Name}\"?"; + if (MessageBox.Show("Delete selected profiles(s)?", "Warning", MessageBoxButtons.OKCancel) == DialogResult.Cancel) return; - if (MessageBox.Show(text, "", MessageBoxButtons.OKCancel) == DialogResult.OK) + foreach (ListViewItem item in listViewProfile.SelectedItems) { + Profile profile = Profiles.Find(p => p.Id == int.Parse(item.Tag.ToString())); DBAccess.DeleteProfile(profile); Profiles.Remove(profile); - listViewProfile.Items.Remove(selectedItem); + listViewProfile.Items.Remove(item); UpdateProfileListViewIndexes(); - //ResizeForm(); + //ResizeForm(); } } catch (ArgumentOutOfRangeException) @@ -348,7 +339,10 @@ private void ButtonOpenLogFile_Click(object sender, EventArgs args) { try { - System.Diagnostics.Process.Start(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\log.txt"); + System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo { + FileName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\log.txt", + UseShellExecute = true + }); } catch (Exception e) { @@ -360,7 +354,7 @@ private void ListViewProfile_KeyDown(object sender, KeyEventArgs args) { if (args.KeyCode == Keys.Delete) { - if (listViewProfile.SelectedItems.Count > 0) DeleteSelectedProfile(); + if (listViewProfile.SelectedItems.Count > 0) DeleteSelectedProfiles(); } else if (args.KeyCode == Keys.Enter) { @@ -469,7 +463,7 @@ private void LabelMoveProfileDown_Click(object sender, EventArgs args) DBAccess.UpdateProfileListViewIndex(selectedProfile); DBAccess.UpdateProfileListViewIndex(nextProfile); } - catch (Exception){} + catch (Exception) { } throw; } @@ -501,7 +495,7 @@ private void ToolStripMenuItemChangeName_Click(object sender, EventArgs e) private void ToolStripMenuItemDeleteProfile_Click(object sender, EventArgs e) { - DeleteSelectedProfile(); + DeleteSelectedProfiles(); } private void ToolStripMenuItemClone_Click(object sender, EventArgs e) @@ -510,11 +504,11 @@ private void ToolStripMenuItemClone_Click(object sender, EventArgs e) Profile clonedProfile = profile.Clone(); clonedProfile.Name = GenerateEnumeratedName(clonedProfile.Name); - List clonedOptions = new List(); + List clonedOptions = new(); foreach (Options option in DBAccess.ListProfileOptions(profile)) { - Options clonedOption= option.Clone(); + Options clonedOption = option.Clone(); clonedOption.Profile = clonedProfile; clonedOptions.Add(clonedOption); } @@ -524,9 +518,9 @@ private void ToolStripMenuItemClone_Click(object sender, EventArgs e) Profiles.Add(clonedProfile); foreach (Options clonedOption in clonedOptions) - DBAccess.AddOption(clonedOption); + DBAccess.CreateOption(clonedOption); - ListViewItem item = new ListViewItem(); + ListViewItem item = new(); EditListViewItem(clonedProfile, item); listViewProfile.Items.Add(item); //ResizeForm(); diff --git a/BackupHelper/FormProfileMenu.resx b/BackupHelper/Forms/FormProfileMenu.resx similarity index 51% rename from BackupHelper/FormProfileMenu.resx rename to BackupHelper/Forms/FormProfileMenu.resx index c5272d8..2ceea36 100644 --- a/BackupHelper/FormProfileMenu.resx +++ b/BackupHelper/Forms/FormProfileMenu.resx @@ -1,64 +1,4 @@ - - - + diff --git a/BackupHelper/Forms/FormReport.Designer.cs b/BackupHelper/Forms/FormReport.Designer.cs new file mode 100644 index 0000000..bb8678c --- /dev/null +++ b/BackupHelper/Forms/FormReport.Designer.cs @@ -0,0 +1,526 @@ +using System; +using System.ComponentModel; + +namespace BackupHelper +{ + partial class FormReport + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + components = new Container(); + ComponentResourceManager resources = new ComponentResourceManager(typeof(FormReport)); + tabPageCreatedDirectories = new TabPage(); + listViewCreatedDirectories = new ListView(); + columnHeader1 = new ColumnHeader(); + columnHeader2 = new ColumnHeader(); + contextMenuStripCreatedDirectories = new ContextMenuStrip(components); + ToolStripMenuItemCopyDirectoryPath = new ToolStripMenuItem(); + ToolStripMenuItemCopyOriginPath = new ToolStripMenuItem(); + tabPageRenamedFiles = new TabPage(); + listViewRenamedFiles = new ListView(); + columnHeader3 = new ColumnHeader(); + columnHeader4 = new ColumnHeader(); + contextMenuStripRenamedFiles = new ContextMenuStrip(components); + ToolStripMenuItemCopySourceFilePath4 = new ToolStripMenuItem(); + ToolStripMenuItemCopyDestinyPath4 = new ToolStripMenuItem(); + tabPageReplacedFiles = new TabPage(); + listViewReplacedFiles = new ListView(); + columnHeader5 = new ColumnHeader(); + columnHeader6 = new ColumnHeader(); + contextMenuStripReplacedFiles = new ContextMenuStrip(components); + ToolStripMenuItemCopySourceFilePath3 = new ToolStripMenuItem(); + ToolStripMenuItemCopyDestinyPath3 = new ToolStripMenuItem(); + tabPageNotTransfered = new TabPage(); + listViewNotTransferedFiles = new ListView(); + columnHeaderNotTransFile = new ColumnHeader(); + columnHeaderNotTransDestiny = new ColumnHeader(); + columnHeaderNotTransReason = new ColumnHeader(); + contextMenuStripNotTransferedFiles = new ContextMenuStrip(components); + ToolStripMenuItemCopySourceFilePath2 = new ToolStripMenuItem(); + ToolStripMenuItemCopyDestinyPath2 = new ToolStripMenuItem(); + tabPageTransfered = new TabPage(); + listViewTransferedFiles = new ListView(); + columnHeaderTransFile = new ColumnHeader(); + columnHeaderTransDestiny = new ColumnHeader(); + contextMenuStripTransferedFiles = new ContextMenuStrip(components); + ToolStripMenuItemCopySourceFilePath1 = new ToolStripMenuItem(); + ToolStripMenuItemCopyDestinyPath1 = new ToolStripMenuItem(); + tabControlReport = new TabControl(); + tabPageRemovedFilesAndDirectories = new TabPage(); + listViewRemovedFilesAndDirectories = new ListView(); + columnHeaderEntry = new ColumnHeader(); + columnHeaderDescription = new ColumnHeader(); + contextMenuStripRemovedFilesAndDirectories = new ContextMenuStrip(components); + toolStripMenuItemCopyEntry = new ToolStripMenuItem(); + tabPageCreatedDirectories.SuspendLayout(); + contextMenuStripCreatedDirectories.SuspendLayout(); + tabPageRenamedFiles.SuspendLayout(); + contextMenuStripRenamedFiles.SuspendLayout(); + tabPageReplacedFiles.SuspendLayout(); + contextMenuStripReplacedFiles.SuspendLayout(); + tabPageNotTransfered.SuspendLayout(); + contextMenuStripNotTransferedFiles.SuspendLayout(); + tabPageTransfered.SuspendLayout(); + contextMenuStripTransferedFiles.SuspendLayout(); + tabControlReport.SuspendLayout(); + tabPageRemovedFilesAndDirectories.SuspendLayout(); + contextMenuStripRemovedFilesAndDirectories.SuspendLayout(); + SuspendLayout(); + // + // tabPageCreatedDirectories + // + tabPageCreatedDirectories.Controls.Add(listViewCreatedDirectories); + tabPageCreatedDirectories.Location = new Point(4, 24); + tabPageCreatedDirectories.Name = "tabPageCreatedDirectories"; + tabPageCreatedDirectories.Padding = new Padding(3, 3, 3, 3); + tabPageCreatedDirectories.Size = new Size(1102, 315); + tabPageCreatedDirectories.TabIndex = 5; + tabPageCreatedDirectories.Text = "Created Directories"; + tabPageCreatedDirectories.UseVisualStyleBackColor = true; + // + // listViewCreatedDirectories + // + listViewCreatedDirectories.Columns.AddRange(new ColumnHeader[] { columnHeader1, columnHeader2 }); + listViewCreatedDirectories.ContextMenuStrip = contextMenuStripCreatedDirectories; + listViewCreatedDirectories.Dock = DockStyle.Fill; + listViewCreatedDirectories.FullRowSelect = true; + listViewCreatedDirectories.GridLines = true; + listViewCreatedDirectories.Location = new Point(3, 3); + listViewCreatedDirectories.Name = "listViewCreatedDirectories"; + listViewCreatedDirectories.ShowItemToolTips = true; + listViewCreatedDirectories.Size = new Size(1096, 309); + listViewCreatedDirectories.TabIndex = 2; + listViewCreatedDirectories.UseCompatibleStateImageBehavior = false; + listViewCreatedDirectories.View = View.Details; + // + // columnHeader1 + // + columnHeader1.Text = "Directory"; + columnHeader1.Width = 555; + // + // columnHeader2 + // + columnHeader2.Text = "Origin"; + columnHeader2.Width = 535; + // + // contextMenuStripCreatedDirectories + // + contextMenuStripCreatedDirectories.Items.AddRange(new ToolStripItem[] { ToolStripMenuItemCopyDirectoryPath, ToolStripMenuItemCopyOriginPath }); + contextMenuStripCreatedDirectories.Name = "contextMenuStripCreatedDirectories"; + contextMenuStripCreatedDirectories.Size = new Size(214, 48); + contextMenuStripCreatedDirectories.Opening += ContextMenuStripCreatedDirectories_Opening; + // + // ToolStripMenuItemCopyDirectoryPath + // + ToolStripMenuItemCopyDirectoryPath.Name = "ToolStripMenuItemCopyDirectoryPath"; + ToolStripMenuItemCopyDirectoryPath.Size = new Size(213, 22); + ToolStripMenuItemCopyDirectoryPath.Text = "Copy directory path"; + ToolStripMenuItemCopyDirectoryPath.Click += ToolStripMenuItemCopyDirectoryPath_Click; + // + // ToolStripMenuItemCopyOriginPath + // + ToolStripMenuItemCopyOriginPath.Name = "ToolStripMenuItemCopyOriginPath"; + ToolStripMenuItemCopyOriginPath.Size = new Size(213, 22); + ToolStripMenuItemCopyOriginPath.Text = "Copy directory origin path"; + ToolStripMenuItemCopyOriginPath.Click += ToolStripMenuItemCopyOriginPath_Click; + // + // tabPageRenamedFiles + // + tabPageRenamedFiles.Controls.Add(listViewRenamedFiles); + tabPageRenamedFiles.Location = new Point(4, 24); + tabPageRenamedFiles.Name = "tabPageRenamedFiles"; + tabPageRenamedFiles.Padding = new Padding(3, 3, 3, 3); + tabPageRenamedFiles.Size = new Size(1102, 315); + tabPageRenamedFiles.TabIndex = 3; + tabPageRenamedFiles.Text = "Renamed Files"; + tabPageRenamedFiles.UseVisualStyleBackColor = true; + // + // listViewRenamedFiles + // + listViewRenamedFiles.Columns.AddRange(new ColumnHeader[] { columnHeader3, columnHeader4 }); + listViewRenamedFiles.ContextMenuStrip = contextMenuStripRenamedFiles; + listViewRenamedFiles.Dock = DockStyle.Fill; + listViewRenamedFiles.FullRowSelect = true; + listViewRenamedFiles.GridLines = true; + listViewRenamedFiles.Location = new Point(3, 3); + listViewRenamedFiles.Name = "listViewRenamedFiles"; + listViewRenamedFiles.ShowItemToolTips = true; + listViewRenamedFiles.Size = new Size(1096, 309); + listViewRenamedFiles.TabIndex = 2; + listViewRenamedFiles.UseCompatibleStateImageBehavior = false; + listViewRenamedFiles.View = View.Details; + // + // columnHeader3 + // + columnHeader3.Text = "Source File"; + columnHeader3.Width = 579; + // + // columnHeader4 + // + columnHeader4.Text = "Destiny File"; + columnHeader4.Width = 512; + // + // contextMenuStripRenamedFiles + // + contextMenuStripRenamedFiles.Items.AddRange(new ToolStripItem[] { ToolStripMenuItemCopySourceFilePath4, ToolStripMenuItemCopyDestinyPath4 }); + contextMenuStripRenamedFiles.Name = "contextMenuStripRenamedFiles"; + contextMenuStripRenamedFiles.Size = new Size(187, 48); + contextMenuStripRenamedFiles.Opening += ContextMenuStripRenamedFiles_Opening; + // + // ToolStripMenuItemCopySourceFilePath4 + // + ToolStripMenuItemCopySourceFilePath4.Name = "ToolStripMenuItemCopySourceFilePath4"; + ToolStripMenuItemCopySourceFilePath4.Size = new Size(186, 22); + ToolStripMenuItemCopySourceFilePath4.Text = "Copy source file path"; + ToolStripMenuItemCopySourceFilePath4.Click += ToolStripMenuItemCopySourceFilePath4_Click; + // + // ToolStripMenuItemCopyDestinyPath4 + // + ToolStripMenuItemCopyDestinyPath4.Name = "ToolStripMenuItemCopyDestinyPath4"; + ToolStripMenuItemCopyDestinyPath4.Size = new Size(186, 22); + ToolStripMenuItemCopyDestinyPath4.Text = "Copy destiny path"; + ToolStripMenuItemCopyDestinyPath4.Click += ToolStripMenuItemCopyDestinyPath4_Click; + // + // tabPageReplacedFiles + // + tabPageReplacedFiles.Controls.Add(listViewReplacedFiles); + tabPageReplacedFiles.Location = new Point(4, 24); + tabPageReplacedFiles.Name = "tabPageReplacedFiles"; + tabPageReplacedFiles.Padding = new Padding(3, 3, 3, 3); + tabPageReplacedFiles.Size = new Size(1102, 315); + tabPageReplacedFiles.TabIndex = 2; + tabPageReplacedFiles.Text = "Replaced Files"; + tabPageReplacedFiles.UseVisualStyleBackColor = true; + // + // listViewReplacedFiles + // + listViewReplacedFiles.Columns.AddRange(new ColumnHeader[] { columnHeader5, columnHeader6 }); + listViewReplacedFiles.ContextMenuStrip = contextMenuStripReplacedFiles; + listViewReplacedFiles.Dock = DockStyle.Fill; + listViewReplacedFiles.FullRowSelect = true; + listViewReplacedFiles.GridLines = true; + listViewReplacedFiles.Location = new Point(3, 3); + listViewReplacedFiles.Name = "listViewReplacedFiles"; + listViewReplacedFiles.ShowItemToolTips = true; + listViewReplacedFiles.Size = new Size(1096, 309); + listViewReplacedFiles.TabIndex = 3; + listViewReplacedFiles.UseCompatibleStateImageBehavior = false; + listViewReplacedFiles.View = View.Details; + // + // columnHeader5 + // + columnHeader5.Text = "Source File"; + columnHeader5.Width = 550; + // + // columnHeader6 + // + columnHeader6.Text = "Destiny"; + columnHeader6.Width = 538; + // + // contextMenuStripReplacedFiles + // + contextMenuStripReplacedFiles.Items.AddRange(new ToolStripItem[] { ToolStripMenuItemCopySourceFilePath3, ToolStripMenuItemCopyDestinyPath3 }); + contextMenuStripReplacedFiles.Name = "contextMenuStripReplacedFiles"; + contextMenuStripReplacedFiles.Size = new Size(187, 48); + contextMenuStripReplacedFiles.Opening += ContextMenuStripReplacedFiles_Opening; + // + // ToolStripMenuItemCopySourceFilePath3 + // + ToolStripMenuItemCopySourceFilePath3.Name = "ToolStripMenuItemCopySourceFilePath3"; + ToolStripMenuItemCopySourceFilePath3.Size = new Size(186, 22); + ToolStripMenuItemCopySourceFilePath3.Text = "Copy source file path"; + ToolStripMenuItemCopySourceFilePath3.Click += ToolStripMenuItemCopySourceFilePath3_Click; + // + // ToolStripMenuItemCopyDestinyPath3 + // + ToolStripMenuItemCopyDestinyPath3.Name = "ToolStripMenuItemCopyDestinyPath3"; + ToolStripMenuItemCopyDestinyPath3.Size = new Size(186, 22); + ToolStripMenuItemCopyDestinyPath3.Text = "Copy destiny path"; + ToolStripMenuItemCopyDestinyPath3.Click += ToolStripMenuItemCopyDestinyPath3_Click; + // + // tabPageNotTransfered + // + tabPageNotTransfered.Controls.Add(listViewNotTransferedFiles); + tabPageNotTransfered.Location = new Point(4, 24); + tabPageNotTransfered.Name = "tabPageNotTransfered"; + tabPageNotTransfered.Padding = new Padding(3, 3, 3, 3); + tabPageNotTransfered.Size = new Size(1102, 315); + tabPageNotTransfered.TabIndex = 1; + tabPageNotTransfered.Text = "Not Transfered"; + tabPageNotTransfered.UseVisualStyleBackColor = true; + // + // listViewNotTransferedFiles + // + listViewNotTransferedFiles.Columns.AddRange(new ColumnHeader[] { columnHeaderNotTransFile, columnHeaderNotTransDestiny, columnHeaderNotTransReason }); + listViewNotTransferedFiles.ContextMenuStrip = contextMenuStripNotTransferedFiles; + listViewNotTransferedFiles.Dock = DockStyle.Fill; + listViewNotTransferedFiles.FullRowSelect = true; + listViewNotTransferedFiles.GridLines = true; + listViewNotTransferedFiles.Location = new Point(3, 3); + listViewNotTransferedFiles.Name = "listViewNotTransferedFiles"; + listViewNotTransferedFiles.ShowItemToolTips = true; + listViewNotTransferedFiles.Size = new Size(1096, 309); + listViewNotTransferedFiles.TabIndex = 1; + listViewNotTransferedFiles.UseCompatibleStateImageBehavior = false; + listViewNotTransferedFiles.View = View.Details; + // + // columnHeaderNotTransFile + // + columnHeaderNotTransFile.Text = "Source File"; + columnHeaderNotTransFile.Width = 537; + // + // columnHeaderNotTransDestiny + // + columnHeaderNotTransDestiny.Text = "Destiny Folder"; + columnHeaderNotTransDestiny.Width = 390; + // + // columnHeaderNotTransReason + // + columnHeaderNotTransReason.Text = "Reason"; + columnHeaderNotTransReason.Width = 269; + // + // contextMenuStripNotTransferedFiles + // + contextMenuStripNotTransferedFiles.Items.AddRange(new ToolStripItem[] { ToolStripMenuItemCopySourceFilePath2, ToolStripMenuItemCopyDestinyPath2 }); + contextMenuStripNotTransferedFiles.Name = "contextMenuStripNotTransferedFiles"; + contextMenuStripNotTransferedFiles.Size = new Size(187, 48); + contextMenuStripNotTransferedFiles.Opening += ContextMenuStripNotTransferedFiles_Opening; + // + // ToolStripMenuItemCopySourceFilePath2 + // + ToolStripMenuItemCopySourceFilePath2.Name = "ToolStripMenuItemCopySourceFilePath2"; + ToolStripMenuItemCopySourceFilePath2.Size = new Size(186, 22); + ToolStripMenuItemCopySourceFilePath2.Text = "Copy source file path"; + ToolStripMenuItemCopySourceFilePath2.Click += ToolStripMenuItemCopySourceFilePath2_Click; + // + // ToolStripMenuItemCopyDestinyPath2 + // + ToolStripMenuItemCopyDestinyPath2.Name = "ToolStripMenuItemCopyDestinyPath2"; + ToolStripMenuItemCopyDestinyPath2.Size = new Size(186, 22); + ToolStripMenuItemCopyDestinyPath2.Text = "Copy destiny path"; + ToolStripMenuItemCopyDestinyPath2.Click += ToolStripMenuItemCopyDestinyPath2_Click; + // + // tabPageTransfered + // + tabPageTransfered.Controls.Add(listViewTransferedFiles); + tabPageTransfered.Location = new Point(4, 22); + tabPageTransfered.Name = "tabPageTransfered"; + tabPageTransfered.Padding = new Padding(3, 3, 3, 3); + tabPageTransfered.Size = new Size(1102, 317); + tabPageTransfered.TabIndex = 0; + tabPageTransfered.Text = "Transfered Files"; + tabPageTransfered.UseVisualStyleBackColor = true; + // + // listViewTransferedFiles + // + listViewTransferedFiles.Columns.AddRange(new ColumnHeader[] { columnHeaderTransFile, columnHeaderTransDestiny }); + listViewTransferedFiles.ContextMenuStrip = contextMenuStripTransferedFiles; + listViewTransferedFiles.Dock = DockStyle.Fill; + listViewTransferedFiles.FullRowSelect = true; + listViewTransferedFiles.GridLines = true; + listViewTransferedFiles.HeaderStyle = ColumnHeaderStyle.Nonclickable; + listViewTransferedFiles.Location = new Point(3, 3); + listViewTransferedFiles.Name = "listViewTransferedFiles"; + listViewTransferedFiles.ShowItemToolTips = true; + listViewTransferedFiles.Size = new Size(1096, 311); + listViewTransferedFiles.TabIndex = 0; + listViewTransferedFiles.UseCompatibleStateImageBehavior = false; + listViewTransferedFiles.View = View.Details; + // + // columnHeaderTransFile + // + columnHeaderTransFile.Text = "Source File"; + columnHeaderTransFile.Width = 538; + // + // columnHeaderTransDestiny + // + columnHeaderTransDestiny.Text = "Destiny Folder"; + columnHeaderTransDestiny.Width = 550; + // + // contextMenuStripTransferedFiles + // + contextMenuStripTransferedFiles.Items.AddRange(new ToolStripItem[] { ToolStripMenuItemCopySourceFilePath1, ToolStripMenuItemCopyDestinyPath1 }); + contextMenuStripTransferedFiles.Name = "contextMenuStrip1"; + contextMenuStripTransferedFiles.Size = new Size(187, 48); + contextMenuStripTransferedFiles.Opening += ContextMenuStripTransferedFiles_Opening; + // + // ToolStripMenuItemCopySourceFilePath1 + // + ToolStripMenuItemCopySourceFilePath1.Name = "ToolStripMenuItemCopySourceFilePath1"; + ToolStripMenuItemCopySourceFilePath1.Size = new Size(186, 22); + ToolStripMenuItemCopySourceFilePath1.Text = "Copy source file path"; + ToolStripMenuItemCopySourceFilePath1.Click += ToolStripMenuItemCopySourceFilePath1_Click; + // + // ToolStripMenuItemCopyDestinyPath1 + // + ToolStripMenuItemCopyDestinyPath1.Name = "ToolStripMenuItemCopyDestinyPath1"; + ToolStripMenuItemCopyDestinyPath1.Size = new Size(186, 22); + ToolStripMenuItemCopyDestinyPath1.Text = "Copy destiny path"; + ToolStripMenuItemCopyDestinyPath1.Click += ToolStripMenuItemCopyDestinyPath1_Click; + // + // tabControlReport + // + tabControlReport.Controls.Add(tabPageTransfered); + tabControlReport.Controls.Add(tabPageNotTransfered); + tabControlReport.Controls.Add(tabPageReplacedFiles); + tabControlReport.Controls.Add(tabPageRenamedFiles); + tabControlReport.Controls.Add(tabPageCreatedDirectories); + tabControlReport.Controls.Add(tabPageRemovedFilesAndDirectories); + tabControlReport.Dock = DockStyle.Fill; + tabControlReport.Location = new Point(0, 0); + tabControlReport.Name = "tabControlReport"; + tabControlReport.SelectedIndex = 0; + tabControlReport.ShowToolTips = true; + tabControlReport.Size = new Size(1110, 343); + tabControlReport.TabIndex = 1; + // + // tabPageRemovedFilesAndDirectories + // + tabPageRemovedFilesAndDirectories.Controls.Add(listViewRemovedFilesAndDirectories); + tabPageRemovedFilesAndDirectories.Location = new Point(4, 24); + tabPageRemovedFilesAndDirectories.Name = "tabPageRemovedFilesAndDirectories"; + tabPageRemovedFilesAndDirectories.Padding = new Padding(3, 3, 3, 3); + tabPageRemovedFilesAndDirectories.Size = new Size(1102, 315); + tabPageRemovedFilesAndDirectories.TabIndex = 6; + tabPageRemovedFilesAndDirectories.Text = "Removed Files/Directories"; + tabPageRemovedFilesAndDirectories.UseVisualStyleBackColor = true; + // + // listViewRemovedFilesAndDirectories + // + listViewRemovedFilesAndDirectories.Columns.AddRange(new ColumnHeader[] { columnHeaderEntry, columnHeaderDescription }); + listViewRemovedFilesAndDirectories.ContextMenuStrip = contextMenuStripRemovedFilesAndDirectories; + listViewRemovedFilesAndDirectories.Dock = DockStyle.Fill; + listViewRemovedFilesAndDirectories.FullRowSelect = true; + listViewRemovedFilesAndDirectories.GridLines = true; + listViewRemovedFilesAndDirectories.HeaderStyle = ColumnHeaderStyle.Nonclickable; + listViewRemovedFilesAndDirectories.Location = new Point(3, 3); + listViewRemovedFilesAndDirectories.Name = "listViewRemovedFilesAndDirectories"; + listViewRemovedFilesAndDirectories.ShowItemToolTips = true; + listViewRemovedFilesAndDirectories.Size = new Size(1096, 309); + listViewRemovedFilesAndDirectories.TabIndex = 0; + listViewRemovedFilesAndDirectories.UseCompatibleStateImageBehavior = false; + listViewRemovedFilesAndDirectories.View = View.Details; + // + // columnHeaderEntry + // + columnHeaderEntry.Text = "Entry"; + columnHeaderEntry.Width = 555; + // + // columnHeaderDescription + // + columnHeaderDescription.Text = "Description"; + columnHeaderDescription.Width = 535; + // + // contextMenuStripRemovedFilesAndDirectories + // + contextMenuStripRemovedFilesAndDirectories.Items.AddRange(new ToolStripItem[] { toolStripMenuItemCopyEntry }); + contextMenuStripRemovedFilesAndDirectories.Name = "contextMenuStripCreatedDirectories"; + contextMenuStripRemovedFilesAndDirectories.Size = new Size(133, 26); + contextMenuStripRemovedFilesAndDirectories.Opening += ContextMenuStripRemovedFilesAndDirectories_Opening; + // + // toolStripMenuItemCopyEntry + // + toolStripMenuItemCopyEntry.Name = "toolStripMenuItemCopyEntry"; + toolStripMenuItemCopyEntry.Size = new Size(132, 22); + toolStripMenuItemCopyEntry.Text = "Copy entry"; + toolStripMenuItemCopyEntry.Click += ToolStripMenuItemCopyEntry_Click; + // + // FormReport + // + AutoScaleDimensions = new SizeF(6F, 13F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(1110, 343); + Controls.Add(tabControlReport); + Font = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Regular, GraphicsUnit.Point); + Icon = (Icon)resources.GetObject("$this.Icon"); + Name = "FormReport"; + StartPosition = FormStartPosition.CenterScreen; + Text = "Report - Backup Helper"; + FormClosing += FormReport_FormClosing; + tabPageCreatedDirectories.ResumeLayout(false); + contextMenuStripCreatedDirectories.ResumeLayout(false); + tabPageRenamedFiles.ResumeLayout(false); + contextMenuStripRenamedFiles.ResumeLayout(false); + tabPageReplacedFiles.ResumeLayout(false); + contextMenuStripReplacedFiles.ResumeLayout(false); + tabPageNotTransfered.ResumeLayout(false); + contextMenuStripNotTransferedFiles.ResumeLayout(false); + tabPageTransfered.ResumeLayout(false); + contextMenuStripTransferedFiles.ResumeLayout(false); + tabControlReport.ResumeLayout(false); + tabPageRemovedFilesAndDirectories.ResumeLayout(false); + contextMenuStripRemovedFilesAndDirectories.ResumeLayout(false); + ResumeLayout(false); + } + + #endregion + + private System.Windows.Forms.TabPage tabPageCreatedDirectories; + private System.Windows.Forms.ListView listViewCreatedDirectories; + private System.Windows.Forms.ColumnHeader columnHeader1; + private System.Windows.Forms.ColumnHeader columnHeader2; + private System.Windows.Forms.TabPage tabPageRenamedFiles; + private System.Windows.Forms.ListView listViewRenamedFiles; + private System.Windows.Forms.ColumnHeader columnHeader3; + private System.Windows.Forms.ColumnHeader columnHeader4; + private System.Windows.Forms.TabPage tabPageReplacedFiles; + private System.Windows.Forms.ListView listViewReplacedFiles; + private System.Windows.Forms.ColumnHeader columnHeader5; + private System.Windows.Forms.ColumnHeader columnHeader6; + private System.Windows.Forms.TabPage tabPageNotTransfered; + private System.Windows.Forms.ListView listViewNotTransferedFiles; + private System.Windows.Forms.ColumnHeader columnHeaderNotTransFile; + private System.Windows.Forms.ColumnHeader columnHeaderNotTransDestiny; + private System.Windows.Forms.ColumnHeader columnHeaderNotTransReason; + private System.Windows.Forms.TabPage tabPageTransfered; + private System.Windows.Forms.ListView listViewTransferedFiles; + private System.Windows.Forms.ColumnHeader columnHeaderTransFile; + private System.Windows.Forms.ColumnHeader columnHeaderTransDestiny; + private System.Windows.Forms.TabControl tabControlReport; + private System.Windows.Forms.ContextMenuStrip contextMenuStripTransferedFiles; + private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItemCopySourceFilePath1; + private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItemCopyDestinyPath1; + private System.Windows.Forms.ContextMenuStrip contextMenuStripNotTransferedFiles; + private System.Windows.Forms.ContextMenuStrip contextMenuStripReplacedFiles; + private System.Windows.Forms.ContextMenuStrip contextMenuStripRenamedFiles; + private System.Windows.Forms.ContextMenuStrip contextMenuStripCreatedDirectories; + private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItemCopySourceFilePath2; + private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItemCopyDestinyPath2; + private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItemCopySourceFilePath3; + private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItemCopyDestinyPath3; + private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItemCopySourceFilePath4; + private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItemCopyDestinyPath4; + private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItemCopyDirectoryPath; + private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItemCopyOriginPath; + private System.Windows.Forms.TabPage tabPageRemovedFilesAndDirectories; + private System.Windows.Forms.ListView listViewRemovedFilesAndDirectories; + private System.Windows.Forms.ColumnHeader columnHeaderEntry; + private System.Windows.Forms.ColumnHeader columnHeaderDescription; + private System.Windows.Forms.ContextMenuStrip contextMenuStripRemovedFilesAndDirectories; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemCopyEntry; + } +} \ No newline at end of file diff --git a/BackupHelper/FormReport.cs b/BackupHelper/Forms/FormReport.cs similarity index 99% rename from BackupHelper/FormReport.cs rename to BackupHelper/Forms/FormReport.cs index f3532c0..7ebf9b5 100644 --- a/BackupHelper/FormReport.cs +++ b/BackupHelper/Forms/FormReport.cs @@ -173,7 +173,8 @@ private void CopyToClipboard(string text) { Clipboard.SetDataObject(text, false, 5, 200); } - catch (Exception e) { + catch (Exception e) + { MessageBox.Show($"Error: {e.Message}"); } } diff --git a/BackupHelper/FormReport.resx b/BackupHelper/Forms/FormReport.resx similarity index 98% rename from BackupHelper/FormReport.resx rename to BackupHelper/Forms/FormReport.resx index 2bc38be..e2d981f 100644 --- a/BackupHelper/FormReport.resx +++ b/BackupHelper/Forms/FormReport.resx @@ -1,64 +1,4 @@ - - - + diff --git a/BackupHelper/Forms/GroupForm.Designer.cs b/BackupHelper/Forms/GroupForm.Designer.cs new file mode 100644 index 0000000..d4be850 --- /dev/null +++ b/BackupHelper/Forms/GroupForm.Designer.cs @@ -0,0 +1,128 @@ + +namespace BinanceAutoTrader +{ + partial class GroupForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + labelSelected = new Label(); + comboBoxSelectGroup = new ComboBox(); + buttonDone = new Button(); + radioButtonSelectGroup = new RadioButton(); + radioButtonNewGroup = new RadioButton(); + textBoxNewGroup = new TextBox(); + SuspendLayout(); + // + // labelSelected + // + labelSelected.AutoSize = true; + labelSelected.Location = new Point(52, 10); + labelSelected.Name = "labelSelected"; + labelSelected.Size = new Size(55, 13); + labelSelected.TabIndex = 0; + labelSelected.Text = "Selected: "; + // + // comboBoxSelectGroup + // + comboBoxSelectGroup.FormattingEnabled = true; + comboBoxSelectGroup.Location = new Point(111, 39); + comboBoxSelectGroup.Name = "comboBoxSelectGroup"; + comboBoxSelectGroup.Size = new Size(129, 21); + comboBoxSelectGroup.TabIndex = 1; + // + // buttonDone + // + buttonDone.Location = new Point(95, 97); + buttonDone.Name = "buttonDone"; + buttonDone.Size = new Size(75, 23); + buttonDone.TabIndex = 4; + buttonDone.Text = "Done"; + buttonDone.UseVisualStyleBackColor = true; + buttonDone.Click += ButtonDone_Click; + // + // radioButtonSelectGroup + // + radioButtonSelectGroup.AutoSize = true; + radioButtonSelectGroup.Checked = true; + radioButtonSelectGroup.Location = new Point(20, 39); + radioButtonSelectGroup.Name = "radioButtonSelectGroup"; + radioButtonSelectGroup.Size = new Size(88, 17); + radioButtonSelectGroup.TabIndex = 0; + radioButtonSelectGroup.TabStop = true; + radioButtonSelectGroup.Text = "Select group:"; + radioButtonSelectGroup.UseVisualStyleBackColor = true; + radioButtonSelectGroup.CheckedChanged += RadioButtonSelectGroup_CheckedChanged; + // + // radioButtonNewGroup + // + radioButtonNewGroup.AutoSize = true; + radioButtonNewGroup.Location = new Point(20, 64); + radioButtonNewGroup.Name = "radioButtonNewGroup"; + radioButtonNewGroup.Size = new Size(80, 17); + radioButtonNewGroup.TabIndex = 2; + radioButtonNewGroup.Text = "New group:"; + radioButtonNewGroup.UseVisualStyleBackColor = true; + // + // textBoxNewGroup + // + textBoxNewGroup.Enabled = false; + textBoxNewGroup.Location = new Point(111, 64); + textBoxNewGroup.Name = "textBoxNewGroup"; + textBoxNewGroup.Size = new Size(129, 20); + textBoxNewGroup.TabIndex = 3; + // + // GroupForm + // + AutoScaleDimensions = new SizeF(6F, 13F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(261, 128); + Controls.Add(textBoxNewGroup); + Controls.Add(radioButtonNewGroup); + Controls.Add(radioButtonSelectGroup); + Controls.Add(buttonDone); + Controls.Add(comboBoxSelectGroup); + Controls.Add(labelSelected); + Font = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Regular, GraphicsUnit.Point); + FormBorderStyle = FormBorderStyle.FixedDialog; + MaximizeBox = false; + Name = "GroupForm"; + StartPosition = FormStartPosition.CenterScreen; + Text = "Set group"; + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private System.Windows.Forms.Label labelSelected; + private System.Windows.Forms.ComboBox comboBoxSelectGroup; + private System.Windows.Forms.Button buttonDone; + private System.Windows.Forms.RadioButton radioButtonSelectGroup; + private System.Windows.Forms.RadioButton radioButtonNewGroup; + private System.Windows.Forms.TextBox textBoxNewGroup; + } +} \ No newline at end of file diff --git a/BackupHelper/GroupForm.cs b/BackupHelper/Forms/GroupForm.cs similarity index 97% rename from BackupHelper/GroupForm.cs rename to BackupHelper/Forms/GroupForm.cs index b28a1bc..27e136b 100644 --- a/BackupHelper/GroupForm.cs +++ b/BackupHelper/Forms/GroupForm.cs @@ -1,9 +1,5 @@ using BackupHelper; using BackupHelper.model; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Windows.Forms; namespace BinanceAutoTrader { diff --git a/BackupHelper/Forms/GroupForm.resx b/BackupHelper/Forms/GroupForm.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/BackupHelper/Forms/GroupForm.resx @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/BackupHelper/GroupForm.Designer.cs b/BackupHelper/GroupForm.Designer.cs deleted file mode 100644 index ad8c019..0000000 --- a/BackupHelper/GroupForm.Designer.cs +++ /dev/null @@ -1,128 +0,0 @@ - -namespace BinanceAutoTrader -{ - partial class GroupForm - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.labelSelected = new System.Windows.Forms.Label(); - this.comboBoxSelectGroup = new System.Windows.Forms.ComboBox(); - this.buttonDone = new System.Windows.Forms.Button(); - this.radioButtonSelectGroup = new System.Windows.Forms.RadioButton(); - this.radioButtonNewGroup = new System.Windows.Forms.RadioButton(); - this.textBoxNewGroup = new System.Windows.Forms.TextBox(); - this.SuspendLayout(); - // - // labelSelected - // - this.labelSelected.AutoSize = true; - this.labelSelected.Location = new System.Drawing.Point(52, 10); - this.labelSelected.Name = "labelSelected"; - this.labelSelected.Size = new System.Drawing.Size(55, 13); - this.labelSelected.TabIndex = 0; - this.labelSelected.Text = "Selected: "; - // - // comboBoxSelectGroup - // - this.comboBoxSelectGroup.FormattingEnabled = true; - this.comboBoxSelectGroup.Location = new System.Drawing.Point(111, 39); - this.comboBoxSelectGroup.Name = "comboBoxSelectGroup"; - this.comboBoxSelectGroup.Size = new System.Drawing.Size(129, 21); - this.comboBoxSelectGroup.TabIndex = 1; - // - // buttonDone - // - this.buttonDone.Location = new System.Drawing.Point(95, 97); - this.buttonDone.Name = "buttonDone"; - this.buttonDone.Size = new System.Drawing.Size(75, 23); - this.buttonDone.TabIndex = 4; - this.buttonDone.Text = "Done"; - this.buttonDone.UseVisualStyleBackColor = true; - this.buttonDone.Click += new System.EventHandler(this.ButtonDone_Click); - // - // radioButtonSelectGroup - // - this.radioButtonSelectGroup.AutoSize = true; - this.radioButtonSelectGroup.Checked = true; - this.radioButtonSelectGroup.Location = new System.Drawing.Point(20, 39); - this.radioButtonSelectGroup.Name = "radioButtonSelectGroup"; - this.radioButtonSelectGroup.Size = new System.Drawing.Size(88, 17); - this.radioButtonSelectGroup.TabIndex = 0; - this.radioButtonSelectGroup.TabStop = true; - this.radioButtonSelectGroup.Text = "Select group:"; - this.radioButtonSelectGroup.UseVisualStyleBackColor = true; - this.radioButtonSelectGroup.CheckedChanged += new System.EventHandler(this.RadioButtonSelectGroup_CheckedChanged); - // - // radioButtonNewGroup - // - this.radioButtonNewGroup.AutoSize = true; - this.radioButtonNewGroup.Location = new System.Drawing.Point(20, 64); - this.radioButtonNewGroup.Name = "radioButtonNewGroup"; - this.radioButtonNewGroup.Size = new System.Drawing.Size(80, 17); - this.radioButtonNewGroup.TabIndex = 2; - this.radioButtonNewGroup.Text = "New group:"; - this.radioButtonNewGroup.UseVisualStyleBackColor = true; - // - // textBoxNewGroup - // - this.textBoxNewGroup.Enabled = false; - this.textBoxNewGroup.Location = new System.Drawing.Point(111, 64); - this.textBoxNewGroup.Name = "textBoxNewGroup"; - this.textBoxNewGroup.Size = new System.Drawing.Size(129, 20); - this.textBoxNewGroup.TabIndex = 3; - // - // GroupForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(261, 128); - this.Controls.Add(this.textBoxNewGroup); - this.Controls.Add(this.radioButtonNewGroup); - this.Controls.Add(this.radioButtonSelectGroup); - this.Controls.Add(this.buttonDone); - this.Controls.Add(this.comboBoxSelectGroup); - this.Controls.Add(this.labelSelected); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.Name = "GroupForm"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Set group"; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Label labelSelected; - private System.Windows.Forms.ComboBox comboBoxSelectGroup; - private System.Windows.Forms.Button buttonDone; - private System.Windows.Forms.RadioButton radioButtonSelectGroup; - private System.Windows.Forms.RadioButton radioButtonNewGroup; - private System.Windows.Forms.TextBox textBoxNewGroup; - } -} \ No newline at end of file diff --git a/BackupHelper/GroupForm.resx b/BackupHelper/GroupForm.resx deleted file mode 100644 index 1af7de1..0000000 --- a/BackupHelper/GroupForm.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/BackupHelper/LogManager.cs b/BackupHelper/Program/LogManager.cs similarity index 93% rename from BackupHelper/LogManager.cs rename to BackupHelper/Program/LogManager.cs index e97f25a..821d735 100644 --- a/BackupHelper/LogManager.cs +++ b/BackupHelper/Program/LogManager.cs @@ -1,6 +1,4 @@ -using System; -using System.IO; -using System.Reflection; +using System.Reflection; namespace BackupHelper { diff --git a/BackupHelper/Program.cs b/BackupHelper/Program/Program.cs similarity index 76% rename from BackupHelper/Program.cs rename to BackupHelper/Program/Program.cs index a37ec61..abb0bae 100644 --- a/BackupHelper/Program.cs +++ b/BackupHelper/Program/Program.cs @@ -1,13 +1,8 @@ -using BackupHelper.model; +using BackupHelper.model; using FileControlUtility; -using System; -using System.Collections.Generic; using System.Diagnostics; -using System.IO; -using System.Linq; using System.Reflection; using System.Runtime.InteropServices; -using System.Windows.Forms; namespace BackupHelper { @@ -19,6 +14,9 @@ static class Program public static string DBPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\backup_helper.db"; public static FormProfileMenu ProfileMenu; + //public static FileControl FC = new(); + //static bool ShowDialogs = true; //--Whether to show dialogs when running paremeter mode + [STAThread] static void Main(string[] args) { @@ -65,7 +63,7 @@ static void Main(string[] args) List profiles = DBAccess.ListProfiles(); if (profiles.Count == 0) - + { dialogMessage = "No profiles saved in the database. Canceled."; LogManager.WriteLine(dialogMessage); @@ -74,7 +72,9 @@ static void Main(string[] args) } string[] profileNames = profileNamesStr.Split(';'); - FileControlConsoleImpl fileControl = new FileControlConsoleImpl(showDialogs); + + FileControl fileControl = new(); + ConfigureConsoleFileEvents(fileControl, showDialogs); foreach (string profileName in profileNames) { @@ -105,13 +105,14 @@ static void Main(string[] args) foreach (Options o in profile.Options) { - if (!o.AllowIgnoreFileExt) o.SpecifiedFileNamesAndExtensions.Clear(); //-- Names must be ignored + if (!o.FilterFilesAndExts) o.FilteredFileNamesAndExtensions.Clear(); //-- Names must be ignored + if (!o.FilterDirectories) o.FilteredDirectories.Clear(); o.SourcePath = Environment.ExpandEnvironmentVariables(o.SourcePath); o.DestinyPath = Environment.ExpandEnvironmentVariables(o.DestinyPath); } UpdateLastTimeExecuted(profile); - fileControl.ManageFiles(profile.Options.ToList()); + fileControl.Transfer(profile.Options.ToList()); } catch (Exception e) { @@ -159,7 +160,7 @@ static void Main(string[] args) //dbc.CreateDatabase(); // File.Create() //} - + Console.WriteLine("Backup Helper - Log..."); ProfileMenu = new FormProfileMenu(); Application.Run(ProfileMenu); @@ -193,5 +194,49 @@ public static void UpdateLastTimeExecuted(Profile profile) //ProfileMenu.GetListViewItemById(profile.Id).SubItems[(int)ListViewProfileSubItemIndex.INDEX_TIME_EXECUTED].Text = profile.LastTimeExecuted.ToString(); ProfileMenu.EditListViewItem(profile); } + + static public void ConfigureFileEvents(FileControl fileControl, FormOptionsMenu menu) + { + fileControl.ErrorOccured += new ErrorOccuredHandler((sender, args) => + { + FormErrorDialog form = new($"{args.ErrorMessage}{Environment.NewLine}{args.Exception.Message}"); + form.ShowDialog(); + args.TransferErrorAction = form.Result; + }); + + fileControl.FileExecuting += new FileExecutingHandler((sender, args) => + { + menu.ShowCurrentFileExecution(args.TrimmedPathWithFileName.Length > 100 ? + $"...{args.TrimmedPathWithFileName.Substring(args.TrimmedPathWithFileName.Length - 100)}" : args.TrimmedPathWithFileName + ); + }); + + fileControl.LogMessageGenerated += new LogMessageGeneratedHandler((sender, message) => + { + LogManager.WriteLine(message); + }); + } + + static void ConfigureConsoleFileEvents(FileControl fileControl, bool showDialogs) + { + //fileControl.FileExecuting += new FileExecutingHandler((sender, args) => + //{ + + //}); + + fileControl.LogMessageGenerated += new LogMessageGeneratedHandler((sender, message) => + { + LogManager.WriteLine(message); + }); + + if (!showDialogs) return; + + fileControl.ErrorOccured += new ErrorOccuredHandler((sender, args) => + { + FormErrorDialog form = new FormErrorDialog(args.ErrorMessage); + form.ShowDialog(); + args.TransferErrorAction = form.Result; + }); + } } } diff --git a/BackupHelper/Program/SQLiteAccess.cs b/BackupHelper/Program/SQLiteAccess.cs new file mode 100644 index 0000000..070cf63 --- /dev/null +++ b/BackupHelper/Program/SQLiteAccess.cs @@ -0,0 +1,348 @@ +using BackupHelper.model; +using FileControlUtility; +using System.Data.SQLite; + +namespace BackupHelper +{ + public static class DBAccess + { + private static readonly SQLiteConnection CN = new("data source=" + Program.DBPath); + + static DBAccess() => CN.Open(); + + public static void AddProfile(Profile profile) + { + string insertProfileCmdText = "insert into profile(profile_listview_index,profile_name," + + "profile_time_created,profile_last_time_modified,profile_last_time_executed,profile_group) " + + "values(@listviewIndex,@name,@timeCreated,@lastTimeModified,@lastTimeExecuted,@profile_group)"; + string queryProfileLastInsertedIdCmdText = "select last_insert_rowid()"; + + using var insertProfileCmd = new SQLiteCommand(insertProfileCmdText, CN); + using var queryProfileLastInsertedIdCmd = new SQLiteCommand(queryProfileLastInsertedIdCmdText, CN); + + insertProfileCmd.Parameters.AddWithValue("@listviewIndex", profile.ListViewIndex); + insertProfileCmd.Parameters.AddWithValue("@name", profile.Name); + insertProfileCmd.Parameters.AddWithValue("@timeCreated", profile.TimeCreated); + insertProfileCmd.Parameters.AddWithValue("@lastTimeModified", profile.LastTimeModified); + insertProfileCmd.Parameters.AddWithValue("@lastTimeExecuted", profile.LastTimeExecuted); + insertProfileCmd.Parameters.AddWithValue("@profile_group", profile.GroupName); + + insertProfileCmd.ExecuteNonQuery(); + + using SQLiteDataReader reader = queryProfileLastInsertedIdCmd.ExecuteReader(); + + reader.Read(); + profile.Id = int.Parse(reader["last_insert_rowid()"].ToString()); + } + + public static void UpdateProfile(Profile profile) + { + string updateProfileCmdText = "update profile set profile_listview_index=@listviewIndex," + + "profile_name=@name,profile_last_time_modified=@lastTimeModified," + + "profile_last_time_executed=@lastTimeExecuted,profile_group=@profile_group where profile_id=@id"; + + using (var updateProfileCmd = new SQLiteCommand(updateProfileCmdText, CN)) + { + updateProfileCmd.Parameters.AddWithValue("@id", profile.Id); + updateProfileCmd.Parameters.AddWithValue("@listviewIndex", profile.ListViewIndex); + updateProfileCmd.Parameters.AddWithValue("@name", profile.Name); + updateProfileCmd.Parameters.AddWithValue("@lastTimeModified", profile.LastTimeModified); + updateProfileCmd.Parameters.AddWithValue("@lastTimeExecuted", profile.LastTimeExecuted); + updateProfileCmd.Parameters.AddWithValue("@profile_group", profile.GroupName); + + updateProfileCmd.ExecuteNonQuery(); + } + } + + public static void UpdateProfileListViewIndex(Profile profile) + { + string updateProfileCmdText = "update profile set profile_listview_index=@listviewIndex,profile_group=@profile_group " + + "where profile_id=@id"; + + using (var updateProfileCmd = new SQLiteCommand(updateProfileCmdText, CN)) + { + updateProfileCmd.Parameters.AddWithValue("@id", profile.Id); + updateProfileCmd.Parameters.AddWithValue("@listviewIndex", profile.ListViewIndex); + updateProfileCmd.Parameters.AddWithValue("@profile_group", profile.GroupName); + + updateProfileCmd.ExecuteNonQuery(); + } + } + + public static List ListProfiles() + { + List profiles = new(); + string queryProfileCmdText = "select profile_id,profile_listview_index,profile_name,profile_time_created," + + "profile_last_time_modified,profile_last_time_executed,profile_group from profile;"; + + using (var queryProfileCmd = new SQLiteCommand(queryProfileCmdText, CN)) + { + using (SQLiteDataReader reader = queryProfileCmd.ExecuteReader()) + { + while (reader.Read()) + { + Profile prof = new Profile + { + Id = reader.GetInt32(reader.GetOrdinal("profile_id")), + ListViewIndex = reader.GetInt32(reader.GetOrdinal("profile_listview_index")), + Name = reader.GetString(reader.GetOrdinal("profile_name")), + TimeCreated = reader.GetDateTime(reader.GetOrdinal("profile_time_created")), + LastTimeModified = reader.GetDateTime(reader.GetOrdinal("profile_last_time_modified")), + LastTimeExecuted = reader.GetDateTime(reader.GetOrdinal("profile_last_time_executed")), + GroupName = reader.GetString(reader.GetOrdinal("profile_group")) + }; + + profiles.Add(prof); + } + } + } + + return profiles; + } + + public static void DeleteProfile(Profile profile) + { + string deleteProfileCmdText = "delete from profile where profile_id=@profileId"; + string deleteOptionCmdText = "delete from option where profile_id=@profileId"; + string queryOptionCmdText = "select opt_id from option where profile_id=@profileId"; + string deleteSpecifiedFileNamesAndExtsCmdText = "delete from specified_file_or_ext where opt_id=@optId"; + + using (var queryOptionCmd = new SQLiteCommand(queryOptionCmdText, CN)) + using (var deleteSpecifiedFileNamesAndExtsCmd = new SQLiteCommand(deleteSpecifiedFileNamesAndExtsCmdText, CN)) + using (var deleteOptionCmd = new SQLiteCommand(deleteOptionCmdText, CN)) + using (var deleteProfileCmd = new SQLiteCommand(deleteProfileCmdText, CN)) + { + queryOptionCmd.Parameters.AddWithValue("@profileId", profile.Id); + using (SQLiteDataReader reader = queryOptionCmd.ExecuteReader()) + { + while (reader.Read()) + { + deleteSpecifiedFileNamesAndExtsCmd.Parameters.AddWithValue("@optId", int.Parse(reader["opt_id"].ToString())); + deleteSpecifiedFileNamesAndExtsCmd.ExecuteNonQuery(); + } + } + + deleteOptionCmd.Parameters.AddWithValue("@profileId", profile.Id); + deleteOptionCmd.ExecuteNonQuery(); + + deleteProfileCmd.Parameters.AddWithValue("@profileId", profile.Id); + deleteProfileCmd.ExecuteNonQuery(); + } + } + + public static void CreateOption(Options option) + { + string insertOptionCmdText = "insert into option values(" + + "null,@profile_id,@opt_listview_index,@opt_source_path,@opt_destiny_path,@opt_include_subfolders,@opt_keep_origin_files,@opt_clean_destiny_dir," + + "@opt_delete_uncommon_files,@opt_filter_filenames_and_exts,@opt_filter_directories,@opt_spec_filenames_and_exts_mode,@opt_spec_directories_mode," + + "@opt_filename_conflict_method,@opt_reenumerate_renamed_files,@opt_max_kept_renamed_file_count)"; + + string queryOptionLastInsertedIdCmdText = "select last_insert_rowid()"; + string insertSpecifiedFileOrExtCmdText = "insert into specified_file_or_ext(opt_id,spec_name) values (@id,@specName)"; + string insertSpecifiedDirectoriesText = "insert into specified_directory(opt_id,spec_name) values (@id,@specName)"; + + using var insertOptionCmd = new SQLiteCommand(insertOptionCmdText, CN); + using var queryOptionLastInsertedIdCmd = new SQLiteCommand(queryOptionLastInsertedIdCmdText, CN); + using var insertSpecifiedFileOrExtCmd = new SQLiteCommand(insertSpecifiedFileOrExtCmdText, CN); + using var insertSpecifiedDirectoriesCmd = new SQLiteCommand(insertSpecifiedDirectoriesText, CN); + + insertOptionCmd.Prepare(); + insertOptionCmd.Parameters.AddWithValue("@profile_id", option.Profile.Id); + insertOptionCmd.Parameters.AddWithValue("@opt_listview_index", option.ListViewIndex); + insertOptionCmd.Parameters.AddWithValue("@opt_source_path", option.SourcePath); + insertOptionCmd.Parameters.AddWithValue("@opt_destiny_path", option.DestinyPath); + insertOptionCmd.Parameters.AddWithValue("@opt_include_subfolders", option.IncludeSubFolders); + insertOptionCmd.Parameters.AddWithValue("@opt_keep_origin_files", option.KeepOriginFiles); + insertOptionCmd.Parameters.AddWithValue("@opt_clean_destiny_dir", option.CleanDestinyDirectory); + insertOptionCmd.Parameters.AddWithValue("@opt_delete_uncommon_files", option.DeleteUncommonFiles); + insertOptionCmd.Parameters.AddWithValue("@opt_filter_filenames_and_exts", option.FilterFilesAndExts); + insertOptionCmd.Parameters.AddWithValue("@opt_filter_directories", option.FilterDirectories); + insertOptionCmd.Parameters.AddWithValue("@opt_spec_filenames_and_exts_mode", option.FilteredFileNamesOrExtensionsMode); + insertOptionCmd.Parameters.AddWithValue("@opt_spec_directories_mode", option.FilteredDirectoriesMode); + insertOptionCmd.Parameters.AddWithValue("@opt_filename_conflict_method", option.FileNameConflictMethod); + insertOptionCmd.Parameters.AddWithValue("@opt_reenumerate_renamed_files", option.ReenumerateRenamedFiles); + insertOptionCmd.Parameters.AddWithValue("@opt_max_kept_renamed_file_count", option.MaxKeptRenamedFileCount); + insertOptionCmd.ExecuteNonQuery(); + + using (SQLiteDataReader reader = queryOptionLastInsertedIdCmd.ExecuteReader()) + { + reader.Read(); + option.Id = int.Parse(reader["last_insert_rowid()"].ToString()); + } + + foreach (string txt in option.FilteredFileNamesAndExtensions) + { + insertSpecifiedFileOrExtCmd.Parameters.AddWithValue("@id", option.Id); + insertSpecifiedFileOrExtCmd.Parameters.AddWithValue("@specName", txt); + insertSpecifiedFileOrExtCmd.ExecuteNonQuery(); + } + + foreach (string txt in option.FilteredDirectories) + { + insertSpecifiedDirectoriesCmd.Parameters.AddWithValue("@id", option.Id); + insertSpecifiedDirectoriesCmd.Parameters.AddWithValue("@specName", txt); + insertSpecifiedDirectoriesCmd.ExecuteNonQuery(); + } + } + + public static void UpdateOption(Options opt) + { + string updateOptionCmdText = "update option set " + + "opt_listview_index=@opt_listview_index,opt_source_path=@opt_source_path,opt_destiny_path=@opt_destiny_path," + + "opt_include_subfolders=@opt_include_subfolders,opt_keep_origin_files=@opt_keep_origin_files,opt_clean_destiny_dir=@opt_clean_destiny_dir," + + "opt_delete_uncommon_files=@opt_delete_uncommon_files,opt_filter_filenames_and_exts=@opt_filter_filenames_and_exts," + + "opt_filter_directories=@opt_filter_directories,opt_spec_filenames_and_exts_mode=@opt_spec_filenames_and_exts_mode," + + "opt_spec_directories_mode=@opt_spec_directories_mode,opt_filename_conflict_method=@opt_filename_conflict_method," + + "opt_reenumerate_renamed_files=@opt_reenumerate_renamed_files,opt_max_kept_renamed_file_count= @opt_max_kept_renamed_file_count " + + "where profile_id=@profile_id and opt_id=@opt_id"; + + string deleteSpecifiedFilesAndExtsCmdText = "delete from specified_file_or_ext where opt_id = @opt_id"; + string insertSpecifiedFilesAndExtsCmdText = "insert into specified_file_or_ext(opt_id,spec_name) values (@opt_id,@specName)"; + string deleteSpecifiedDirectoriesText = "delete from specified_directory where opt_id = @opt_id"; + string insertSpecifiedDirectoriesText = "insert into specified_directory(opt_id,spec_name) values (@opt_id,@specName)"; + + using var updateOptionCmd = new SQLiteCommand(updateOptionCmdText, CN); + using var deleteSpecifiedFilesAndExtsCmd = new SQLiteCommand(deleteSpecifiedFilesAndExtsCmdText, CN); + using var insertSpecifiedFilesAndExtsCmd = new SQLiteCommand(insertSpecifiedFilesAndExtsCmdText, CN); + using var deleteSpecifiedDirectoriesCmd = new SQLiteCommand(deleteSpecifiedDirectoriesText, CN); + using var insertSpecifiedDirectoriesCmd = new SQLiteCommand(insertSpecifiedDirectoriesText, CN); + + updateOptionCmd.Parameters.AddWithValue("@opt_listview_index", opt.ListViewIndex); + updateOptionCmd.Parameters.AddWithValue("@opt_source_path", opt.SourcePath); + updateOptionCmd.Parameters.AddWithValue("@opt_destiny_path", opt.DestinyPath); + updateOptionCmd.Parameters.AddWithValue("@opt_include_subfolders", opt.IncludeSubFolders); + updateOptionCmd.Parameters.AddWithValue("@opt_keep_origin_files", opt.KeepOriginFiles); + updateOptionCmd.Parameters.AddWithValue("@opt_clean_destiny_dir", opt.CleanDestinyDirectory); + updateOptionCmd.Parameters.AddWithValue("@opt_delete_uncommon_files", opt.DeleteUncommonFiles); + updateOptionCmd.Parameters.AddWithValue("@opt_filter_filenames_and_exts", opt.FilterFilesAndExts); + updateOptionCmd.Parameters.AddWithValue("@opt_filter_directories", opt.FilterDirectories); + updateOptionCmd.Parameters.AddWithValue("@opt_spec_filenames_and_exts_mode", opt.FilteredFileNamesOrExtensionsMode); + updateOptionCmd.Parameters.AddWithValue("@opt_spec_directories_mode", opt.FilteredDirectoriesMode); + updateOptionCmd.Parameters.AddWithValue("@opt_filename_conflict_method", opt.FileNameConflictMethod); + updateOptionCmd.Parameters.AddWithValue("@opt_reenumerate_renamed_files", opt.ReenumerateRenamedFiles); + updateOptionCmd.Parameters.AddWithValue("@opt_max_kept_renamed_file_count", opt.MaxKeptRenamedFileCount); + updateOptionCmd.Parameters.AddWithValue("@profile_id", opt.Profile.Id); + updateOptionCmd.Parameters.AddWithValue("@opt_id", opt.Id); + + updateOptionCmd.ExecuteNonQuery(); + + deleteSpecifiedFilesAndExtsCmd.Parameters.AddWithValue("@opt_id", opt.Id); + deleteSpecifiedFilesAndExtsCmd.ExecuteNonQuery(); + + deleteSpecifiedDirectoriesCmd.Parameters.AddWithValue("@opt_id", opt.Id); + deleteSpecifiedDirectoriesCmd.ExecuteNonQuery(); + + foreach (string txt in opt.FilteredFileNamesAndExtensions) + { + insertSpecifiedFilesAndExtsCmd.Parameters.AddWithValue("@opt_id", opt.Id); + insertSpecifiedFilesAndExtsCmd.Parameters.AddWithValue("@specName", txt); + insertSpecifiedFilesAndExtsCmd.ExecuteNonQuery(); + } + + foreach (string txt in opt.FilteredDirectories) + { + insertSpecifiedDirectoriesCmd.Parameters.AddWithValue("@opt_id", opt.Id); + insertSpecifiedDirectoriesCmd.Parameters.AddWithValue("@specName", txt); + insertSpecifiedDirectoriesCmd.ExecuteNonQuery(); + } + } + + public static void UpdateOptionListViewIndex(Options opt) + { + string updateOptionCmdText = "update option set opt_listview_index=@opt_listview_index where opt_id=@opt_id"; + + using (var updateOptionCmd = new SQLiteCommand(updateOptionCmdText, CN)) + { + updateOptionCmd.Parameters.AddWithValue("@opt_listview_index", opt.ListViewIndex); + updateOptionCmd.Parameters.AddWithValue("@opt_id", opt.Id); + updateOptionCmd.ExecuteNonQuery(); + } + } + + public static List ListProfileOptions(Profile prof) + { + List options = new(); + + string queryOptionCmdText = "select * from option where profile_id=@profile_id"; + string querySpecifiedFilesAndExtsCmdText = "select spec_name from specified_file_or_ext where opt_id=@opt_id"; + string querySpecifiedDirectoriesCmdText = "select spec_name from specified_directory where opt_id=@opt_id"; + + using var queryOptionCmd = new SQLiteCommand(queryOptionCmdText, CN); + using var querySpecifiedFilesAndExtsCmd = new SQLiteCommand(querySpecifiedFilesAndExtsCmdText, CN); + using var querySpecifiedDirectoriesCmd = new SQLiteCommand(querySpecifiedDirectoriesCmdText, CN); + + queryOptionCmd.Parameters.AddWithValue("@profile_id", prof.Id); + + using SQLiteDataReader readerOptions = queryOptionCmd.ExecuteReader(); + + while (readerOptions.Read()) + { + Options opt = new() + { + Profile = prof, + Id = readerOptions.GetInt32(readerOptions.GetOrdinal("opt_id")), + ListViewIndex = readerOptions.GetInt32(readerOptions.GetOrdinal("opt_listview_index")), + SourcePath = readerOptions.GetString(readerOptions.GetOrdinal("opt_source_path")), + DestinyPath = readerOptions.GetString(readerOptions.GetOrdinal("opt_destiny_path")), + IncludeSubFolders = readerOptions.GetBoolean(readerOptions.GetOrdinal("opt_include_subfolders")), + KeepOriginFiles = readerOptions.GetBoolean(readerOptions.GetOrdinal("opt_keep_origin_files")), + CleanDestinyDirectory = readerOptions.GetBoolean(readerOptions.GetOrdinal("opt_clean_destiny_dir")), + DeleteUncommonFiles = readerOptions.GetBoolean(readerOptions.GetOrdinal("opt_delete_uncommon_files")), + FilteredFileNamesOrExtensionsMode = (FilterMode)readerOptions.GetInt32(readerOptions.GetOrdinal("opt_spec_filenames_and_exts_mode")), + FilteredDirectoriesMode = (FilterMode)readerOptions.GetInt32(readerOptions.GetOrdinal("opt_spec_directories_mode")), + FilterFilesAndExts = readerOptions.GetBoolean(readerOptions.GetOrdinal("opt_filter_filenames_and_exts")), + FilterDirectories = readerOptions.GetBoolean(readerOptions.GetOrdinal("opt_filter_directories")), + FileNameConflictMethod = (FileNameConflictMethod)readerOptions.GetInt32(readerOptions.GetOrdinal("opt_filename_conflict_method")), + ReenumerateRenamedFiles = readerOptions.GetBoolean(readerOptions.GetOrdinal("opt_reenumerate_renamed_files")), + MaxKeptRenamedFileCount = readerOptions.GetInt32(readerOptions.GetOrdinal("opt_max_kept_renamed_file_count")) + }; + + querySpecifiedFilesAndExtsCmd.Parameters.AddWithValue("@opt_id", opt.Id); + querySpecifiedDirectoriesCmd.Parameters.AddWithValue("@opt_id", opt.Id); + + using SQLiteDataReader readerSpecifiedFilesAndExts = querySpecifiedFilesAndExtsCmd.ExecuteReader(); + using SQLiteDataReader readerSpecifiedDirectories = querySpecifiedDirectoriesCmd.ExecuteReader(); + + while (readerSpecifiedFilesAndExts.Read()) + opt.FilteredFileNamesAndExtensions.Add(readerSpecifiedFilesAndExts["spec_name"].ToString()); + + while (readerSpecifiedDirectories.Read()) + opt.FilteredDirectories.Add(readerSpecifiedDirectories["spec_name"].ToString()); + + options.Add(opt); + } + + return options; + } + + public static void DeleteOption(Options option) + { + string deleteOptionCmdText = "delete from option where opt_id=@opt_id"; + string deleteSpecifiedFilesAndExtsCmdText = "delete from specified_file_or_ext where opt_id = @opt_id"; + string deleteSpecifiedDirectoriesCmdText = "delete from specified_directory where opt_id = @opt_id"; + + using var deleteOptionCmd = new SQLiteCommand(deleteOptionCmdText, CN); + using var deleteSpecifiedFilesAndExtsCmd = new SQLiteCommand(deleteSpecifiedFilesAndExtsCmdText, CN); + using var deleteSpecifiedDirectoriesCmd = new SQLiteCommand(deleteSpecifiedDirectoriesCmdText, CN); + + deleteSpecifiedFilesAndExtsCmd.Parameters.AddWithValue("@opt_id", option.Id); + deleteSpecifiedFilesAndExtsCmd.ExecuteNonQuery(); + deleteSpecifiedDirectoriesCmd.Parameters.AddWithValue("@opt_id", option.Id); + deleteSpecifiedDirectoriesCmd.ExecuteNonQuery(); + deleteOptionCmd.Parameters.AddWithValue("@opt_id", option.Id); + deleteOptionCmd.ExecuteNonQuery(); + } + + //public bool CreateDatabase() + //{ + // bool result = false; + // string sqlCmd = BackupHelper.Properties.Resources.schema; + // var cn = Connect(); + // cn.Open(); + // using (var cmd = new SQLiteCommand(sqlCmd, cn)) + // if(cmd.ExecuteNonQuery() > 0) result = true; + // cn.Close(); + // return result; + //} + } +} diff --git a/BackupHelper/Properties/AssemblyInfo.cs b/BackupHelper/Properties/AssemblyInfo.cs deleted file mode 100644 index 8567d8e..0000000 --- a/BackupHelper/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Resources; -using System.Reflection; - -[assembly: AssemblyTitle("BackupHelper")] -[assembly: AssemblyDescription("File transfer/backup utility")] -[assembly: AssemblyCompany("Nain")] -[assembly: AssemblyProduct("BackupHelper")] -[assembly: AssemblyCopyright("Copyright © Nain 2021")] -[assembly: AssemblyTrademark("Nain")] -[assembly: AssemblyVersion("1.4.3")] -[assembly: AssemblyFileVersion("1.4.3")] -[assembly: NeutralResourcesLanguage("en-US")] diff --git a/BackupHelper/Properties/Resources.Designer.cs b/BackupHelper/Properties/Resources.Designer.cs index 363b736..fe79ea3 100644 --- a/BackupHelper/Properties/Resources.Designer.cs +++ b/BackupHelper/Properties/Resources.Designer.cs @@ -19,7 +19,7 @@ namespace BackupHelper.Properties { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { diff --git a/BackupHelper/Properties/Resources.resx b/BackupHelper/Properties/Resources.resx index aa34e30..15d2b3d 100644 --- a/BackupHelper/Properties/Resources.resx +++ b/BackupHelper/Properties/Resources.resx @@ -1,4 +1,4 @@ - +