diff --git a/Elucidate/Elucidate/ElucidateForm.Designer.cs b/Elucidate/Elucidate/ElucidateForm.Designer.cs index df96825..6da738c 100644 --- a/Elucidate/Elucidate/ElucidateForm.Designer.cs +++ b/Elucidate/Elucidate/ElucidateForm.Designer.cs @@ -73,10 +73,12 @@ private void InitializeComponent() this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.openSnapRAIDConfigToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.editSnapRAIDConfigToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.closeSnapRAIDConfigToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.MenuItemNewVersionReadyForInstall = new System.Windows.Forms.ToolStripMenuItem(); - this.closeSnapRAIDConfigToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.dangerZoneToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.deleteAllSnapRAIDRaidFilesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.statusStrip1.SuspendLayout(); this.tabCoveragePage.SuspendLayout(); this.tabSchedulePage.SuspendLayout(); @@ -94,11 +96,11 @@ private void InitializeComponent() this.statusStrip1.Controls.Add(this.spacer); this.statusStrip1.Controls.Add(this.label3); this.statusStrip1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.statusStrip1.Location = new System.Drawing.Point(0, 535); + this.statusStrip1.Location = new System.Drawing.Point(0, 803); this.statusStrip1.Margin = new System.Windows.Forms.Padding(0); this.statusStrip1.Name = "statusStrip1"; - this.statusStrip1.Padding = new System.Windows.Forms.Padding(3); - this.statusStrip1.Size = new System.Drawing.Size(994, 26); + this.statusStrip1.Padding = new System.Windows.Forms.Padding(4); + this.statusStrip1.Size = new System.Drawing.Size(1491, 39); this.statusStrip1.TabIndex = 1; this.statusStrip1.Text = "statusStrip1"; // @@ -106,9 +108,10 @@ private void InitializeComponent() // this.spacer.AutoSize = true; this.spacer.Dock = System.Windows.Forms.DockStyle.Left; - this.spacer.Location = new System.Drawing.Point(14, 3); + this.spacer.Location = new System.Drawing.Point(20, 4); + this.spacer.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.spacer.Name = "spacer"; - this.spacer.Size = new System.Drawing.Size(11, 14); + this.spacer.Size = new System.Drawing.Size(16, 22); this.spacer.TabIndex = 3; this.spacer.Text = " "; // @@ -116,9 +119,10 @@ private void InitializeComponent() // this.label3.AutoSize = true; this.label3.Dock = System.Windows.Forms.DockStyle.Left; - this.label3.Location = new System.Drawing.Point(3, 3); + this.label3.Location = new System.Drawing.Point(4, 4); + this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(11, 14); + this.label3.Size = new System.Drawing.Size(16, 22); this.label3.TabIndex = 4; this.label3.Text = " "; // @@ -135,11 +139,12 @@ private void InitializeComponent() this.btnDiff.Image = global::Elucidate.Properties.Resources.cam_48; this.btnDiff.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnDiff.ImageMargin = 8F; - this.btnDiff.Location = new System.Drawing.Point(3, 3); - this.btnDiff.MinimumSize = new System.Drawing.Size(300, 64); + this.btnDiff.Location = new System.Drawing.Point(4, 4); + this.btnDiff.Margin = new System.Windows.Forms.Padding(4); + this.btnDiff.MinimumSize = new System.Drawing.Size(450, 96); this.btnDiff.Name = "btnDiff"; this.btnDiff.Rounding = 14F; - this.btnDiff.Size = new System.Drawing.Size(300, 64); + this.btnDiff.Size = new System.Drawing.Size(450, 96); this.btnDiff.Subscript = " Lists all the files have been modified\r\n since the last \"sync\" command."; this.btnDiff.SubscriptFont = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnDiff.TabIndex = 3; @@ -163,11 +168,12 @@ private void InitializeComponent() this.btnScrub.Image = global::Elucidate.Properties.Resources.cam_48; this.btnScrub.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnScrub.ImageMargin = 8F; - this.btnScrub.Location = new System.Drawing.Point(309, 3); - this.btnScrub.MinimumSize = new System.Drawing.Size(300, 64); + this.btnScrub.Location = new System.Drawing.Point(462, 4); + this.btnScrub.Margin = new System.Windows.Forms.Padding(4); + this.btnScrub.MinimumSize = new System.Drawing.Size(450, 96); this.btnScrub.Name = "btnScrub"; this.btnScrub.Rounding = 14F; - this.btnScrub.Size = new System.Drawing.Size(300, 64); + this.btnScrub.Size = new System.Drawing.Size(450, 96); this.btnScrub.Subscript = "Scrubs the array, checking for silent\r\nand input/output errors"; this.btnScrub.SubscriptFont = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnScrub.TabIndex = 8; @@ -193,11 +199,12 @@ private void InitializeComponent() this.btnStatus.Image = global::Elucidate.Properties.Resources.camera_warning_48; this.btnStatus.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnStatus.ImageMargin = 8F; - this.btnStatus.Location = new System.Drawing.Point(615, 3); - this.btnStatus.MinimumSize = new System.Drawing.Size(300, 64); + this.btnStatus.Location = new System.Drawing.Point(920, 4); + this.btnStatus.Margin = new System.Windows.Forms.Padding(4); + this.btnStatus.MinimumSize = new System.Drawing.Size(450, 96); this.btnStatus.Name = "btnStatus"; this.btnStatus.Rounding = 14F; - this.btnStatus.Size = new System.Drawing.Size(300, 64); + this.btnStatus.Size = new System.Drawing.Size(450, 96); this.btnStatus.Subscript = " A summary of the state of the disk\r\n array, upto the last sync time."; this.btnStatus.SubscriptFont = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnStatus.TabIndex = 7; @@ -221,11 +228,12 @@ private void InitializeComponent() this.btnFix.Image = global::Elucidate.Properties.Resources.camera_add_48; this.btnFix.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnFix.ImageMargin = 8F; - this.btnFix.Location = new System.Drawing.Point(615, 73); - this.btnFix.MinimumSize = new System.Drawing.Size(300, 64); + this.btnFix.Location = new System.Drawing.Point(920, 108); + this.btnFix.Margin = new System.Windows.Forms.Padding(4); + this.btnFix.MinimumSize = new System.Drawing.Size(450, 96); this.btnFix.Name = "btnFix"; this.btnFix.Rounding = 14F; - this.btnFix.Size = new System.Drawing.Size(300, 64); + this.btnFix.Size = new System.Drawing.Size(450, 96); this.btnFix.Subscript = "Will default to using \"-e\",\r\nfix errors set by the scrub command. "; this.btnFix.SubscriptFont = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnFix.TabIndex = 9; @@ -250,11 +258,12 @@ private void InitializeComponent() this.btnDupFinder.Image = global::Elucidate.Properties.Resources.camera_warning_48; this.btnDupFinder.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnDupFinder.ImageMargin = 8F; - this.btnDupFinder.Location = new System.Drawing.Point(3, 143); - this.btnDupFinder.MinimumSize = new System.Drawing.Size(300, 64); + this.btnDupFinder.Location = new System.Drawing.Point(4, 212); + this.btnDupFinder.Margin = new System.Windows.Forms.Padding(4); + this.btnDupFinder.MinimumSize = new System.Drawing.Size(450, 96); this.btnDupFinder.Name = "btnDupFinder"; this.btnDupFinder.Rounding = 14F; - this.btnDupFinder.Size = new System.Drawing.Size(300, 64); + this.btnDupFinder.Size = new System.Drawing.Size(450, 96); this.btnDupFinder.Subscript = "Lists all the duplicate files. Two files are\r\nassumed equal if their hashes are m" + "atching. "; this.btnDupFinder.SubscriptFont = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); @@ -270,20 +279,21 @@ private void InitializeComponent() // this.driveSpace.Cursor = System.Windows.Forms.Cursors.Default; this.driveSpace.Dock = System.Windows.Forms.DockStyle.Fill; - this.driveSpace.Location = new System.Drawing.Point(3, 3); - this.driveSpace.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.driveSpace.Location = new System.Drawing.Point(4, 4); + this.driveSpace.Margin = new System.Windows.Forms.Padding(6, 8, 6, 8); this.driveSpace.Name = "driveSpace"; - this.driveSpace.Size = new System.Drawing.Size(980, 473); + this.driveSpace.Size = new System.Drawing.Size(1475, 719); this.driveSpace.TabIndex = 0; this.toolTip1.SetToolTip(this.driveSpace, "Not real time, only updates when shown."); // // tabCoveragePage // this.tabCoveragePage.Controls.Add(this.driveSpace); - this.tabCoveragePage.Location = new System.Drawing.Point(4, 28); + this.tabCoveragePage.Location = new System.Drawing.Point(4, 38); + this.tabCoveragePage.Margin = new System.Windows.Forms.Padding(4); this.tabCoveragePage.Name = "tabCoveragePage"; - this.tabCoveragePage.Padding = new System.Windows.Forms.Padding(3); - this.tabCoveragePage.Size = new System.Drawing.Size(986, 479); + this.tabCoveragePage.Padding = new System.Windows.Forms.Padding(4); + this.tabCoveragePage.Size = new System.Drawing.Size(1483, 727); this.tabCoveragePage.TabIndex = 4; this.tabCoveragePage.Text = " Coverage "; this.tabCoveragePage.UseVisualStyleBackColor = true; @@ -291,10 +301,11 @@ private void InitializeComponent() // tabSchedulePage // this.tabSchedulePage.Controls.Add(this.SchedulePageScheduleControl); - this.tabSchedulePage.Location = new System.Drawing.Point(4, 28); + this.tabSchedulePage.Location = new System.Drawing.Point(4, 38); + this.tabSchedulePage.Margin = new System.Windows.Forms.Padding(4); this.tabSchedulePage.Name = "tabSchedulePage"; - this.tabSchedulePage.Padding = new System.Windows.Forms.Padding(3); - this.tabSchedulePage.Size = new System.Drawing.Size(986, 479); + this.tabSchedulePage.Padding = new System.Windows.Forms.Padding(4); + this.tabSchedulePage.Size = new System.Drawing.Size(1483, 727); this.tabSchedulePage.TabIndex = 5; this.tabSchedulePage.Text = "Schedule"; this.tabSchedulePage.UseVisualStyleBackColor = true; @@ -304,10 +315,10 @@ private void InitializeComponent() this.SchedulePageScheduleControl.AutoSize = true; this.SchedulePageScheduleControl.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.SchedulePageScheduleControl.Dock = System.Windows.Forms.DockStyle.Fill; - this.SchedulePageScheduleControl.Location = new System.Drawing.Point(3, 3); - this.SchedulePageScheduleControl.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.SchedulePageScheduleControl.Location = new System.Drawing.Point(4, 4); + this.SchedulePageScheduleControl.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6); this.SchedulePageScheduleControl.Name = "SchedulePageScheduleControl"; - this.SchedulePageScheduleControl.Size = new System.Drawing.Size(980, 473); + this.SchedulePageScheduleControl.Size = new System.Drawing.Size(1475, 719); this.SchedulePageScheduleControl.TabIndex = 0; // // tabCommonOperations @@ -316,10 +327,10 @@ private void InitializeComponent() this.tabCommonOperations.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.tabCommonOperations.Controls.Add(this.logPanel); this.tabCommonOperations.Controls.Add(this.commandPanel); - this.tabCommonOperations.Location = new System.Drawing.Point(4, 28); + this.tabCommonOperations.Location = new System.Drawing.Point(4, 38); this.tabCommonOperations.Margin = new System.Windows.Forms.Padding(0); this.tabCommonOperations.Name = "tabCommonOperations"; - this.tabCommonOperations.Size = new System.Drawing.Size(986, 479); + this.tabCommonOperations.Size = new System.Drawing.Size(1483, 727); this.tabCommonOperations.TabIndex = 0; this.tabCommonOperations.Text = " Common SnapRaid "; // @@ -327,9 +338,10 @@ private void InitializeComponent() // this.logPanel.Controls.Add(this.liveRunLogControl1); this.logPanel.Dock = System.Windows.Forms.DockStyle.Fill; - this.logPanel.Location = new System.Drawing.Point(0, 210); + this.logPanel.Location = new System.Drawing.Point(0, 312); + this.logPanel.Margin = new System.Windows.Forms.Padding(4); this.logPanel.Name = "logPanel"; - this.logPanel.Size = new System.Drawing.Size(984, 267); + this.logPanel.Size = new System.Drawing.Size(1481, 413); this.logPanel.TabIndex = 11; // // liveRunLogControl1 @@ -340,8 +352,9 @@ private void InitializeComponent() this.liveRunLogControl1.HighlightWarningEnabled = true; this.liveRunLogControl1.IsRunning = false; this.liveRunLogControl1.Location = new System.Drawing.Point(0, 0); + this.liveRunLogControl1.Margin = new System.Windows.Forms.Padding(6, 8, 6, 8); this.liveRunLogControl1.Name = "liveRunLogControl1"; - this.liveRunLogControl1.Size = new System.Drawing.Size(984, 267); + this.liveRunLogControl1.Size = new System.Drawing.Size(1481, 413); this.liveRunLogControl1.TabIndex = 0; // // commandPanel @@ -358,8 +371,9 @@ private void InitializeComponent() this.commandPanel.Controls.Add(this.btnForceFullSync); this.commandPanel.Dock = System.Windows.Forms.DockStyle.Top; this.commandPanel.Location = new System.Drawing.Point(0, 0); + this.commandPanel.Margin = new System.Windows.Forms.Padding(4); this.commandPanel.Name = "commandPanel"; - this.commandPanel.Size = new System.Drawing.Size(984, 210); + this.commandPanel.Size = new System.Drawing.Size(1481, 312); this.commandPanel.TabIndex = 9; // // btnSync @@ -377,11 +391,12 @@ private void InitializeComponent() this.btnSync.Image = global::Elucidate.Properties.Resources.camera_add_48; this.btnSync.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnSync.ImageMargin = 8F; - this.btnSync.Location = new System.Drawing.Point(3, 73); - this.btnSync.MinimumSize = new System.Drawing.Size(300, 64); + this.btnSync.Location = new System.Drawing.Point(4, 108); + this.btnSync.Margin = new System.Windows.Forms.Padding(4); + this.btnSync.MinimumSize = new System.Drawing.Size(450, 96); this.btnSync.Name = "btnSync"; this.btnSync.Rounding = 14F; - this.btnSync.Size = new System.Drawing.Size(300, 64); + this.btnSync.Size = new System.Drawing.Size(450, 96); this.btnSync.Subscript = "Synchronise with any changes that may\r\nhave occurred since the last run."; this.btnSync.SubscriptFont = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnSync.TabIndex = 1; @@ -404,11 +419,12 @@ private void InitializeComponent() this.btnCheck.Image = global::Elucidate.Properties.Resources.camera_warning_48; this.btnCheck.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnCheck.ImageMargin = 8F; - this.btnCheck.Location = new System.Drawing.Point(309, 73); - this.btnCheck.MinimumSize = new System.Drawing.Size(300, 64); + this.btnCheck.Location = new System.Drawing.Point(462, 108); + this.btnCheck.Margin = new System.Windows.Forms.Padding(4); + this.btnCheck.MinimumSize = new System.Drawing.Size(450, 96); this.btnCheck.Name = "btnCheck"; this.btnCheck.Rounding = 14F; - this.btnCheck.Size = new System.Drawing.Size(300, 64); + this.btnCheck.Size = new System.Drawing.Size(450, 96); this.btnCheck.Subscript = "Check the snapshot to confirm\r\nit\'s integrity. (use -a for hash only)"; this.btnCheck.SubscriptFont = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnCheck.TabIndex = 2; @@ -432,11 +448,12 @@ private void InitializeComponent() this.btnForceFullSync.Image = global::Elucidate.Properties.Resources.camera_add_48; this.btnForceFullSync.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnForceFullSync.ImageMargin = 8F; - this.btnForceFullSync.Location = new System.Drawing.Point(309, 143); - this.btnForceFullSync.MinimumSize = new System.Drawing.Size(300, 64); + this.btnForceFullSync.Location = new System.Drawing.Point(462, 212); + this.btnForceFullSync.Margin = new System.Windows.Forms.Padding(4); + this.btnForceFullSync.MinimumSize = new System.Drawing.Size(450, 96); this.btnForceFullSync.Name = "btnForceFullSync"; this.btnForceFullSync.Rounding = 14F; - this.btnForceFullSync.Size = new System.Drawing.Size(300, 64); + this.btnForceFullSync.Size = new System.Drawing.Size(450, 96); this.btnForceFullSync.Subscript = "Force a full synchronization of all content."; this.btnForceFullSync.SubscriptFont = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnForceFullSync.TabIndex = 12; @@ -455,12 +472,12 @@ private void InitializeComponent() this.tabControl.Dock = System.Windows.Forms.DockStyle.Fill; this.tabControl.Font = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.tabControl.HotTrack = true; - this.tabControl.Location = new System.Drawing.Point(0, 24); + this.tabControl.Location = new System.Drawing.Point(0, 34); this.tabControl.Margin = new System.Windows.Forms.Padding(0); this.tabControl.Name = "tabControl"; this.tabControl.Padding = new System.Drawing.Point(0, 0); this.tabControl.SelectedIndex = 0; - this.tabControl.Size = new System.Drawing.Size(994, 511); + this.tabControl.Size = new System.Drawing.Size(1491, 769); this.tabControl.TabIndex = 4; this.tabControl.Selected += new System.Windows.Forms.TabControlEventHandler(this.tabControl_Selected); this.tabControl.Deselecting += new System.Windows.Forms.TabControlCancelEventHandler(this.tabControl_Deselecting); @@ -469,10 +486,11 @@ private void InitializeComponent() // this.tabLogs.BackColor = System.Drawing.Color.Transparent; this.tabLogs.Controls.Add(this.logsViewerControl); - this.tabLogs.Location = new System.Drawing.Point(4, 28); + this.tabLogs.Location = new System.Drawing.Point(4, 38); + this.tabLogs.Margin = new System.Windows.Forms.Padding(4); this.tabLogs.Name = "tabLogs"; - this.tabLogs.Padding = new System.Windows.Forms.Padding(3); - this.tabLogs.Size = new System.Drawing.Size(986, 479); + this.tabLogs.Padding = new System.Windows.Forms.Padding(4); + this.tabLogs.Size = new System.Drawing.Size(1483, 727); this.tabLogs.TabIndex = 6; this.tabLogs.Text = "Logs"; // @@ -482,19 +500,20 @@ private void InitializeComponent() this.logsViewerControl.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.logsViewerControl.Dock = System.Windows.Forms.DockStyle.Fill; this.logsViewerControl.LexerToUse = Elucidate.Controls.LogsViewerControl.LexerNameEnum.ScanRaid; - this.logsViewerControl.Location = new System.Drawing.Point(3, 3); - this.logsViewerControl.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.logsViewerControl.Location = new System.Drawing.Point(4, 4); + this.logsViewerControl.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6); this.logsViewerControl.Name = "logsViewerControl"; - this.logsViewerControl.Size = new System.Drawing.Size(980, 473); + this.logsViewerControl.Size = new System.Drawing.Size(1475, 719); this.logsViewerControl.TabIndex = 0; // // tabRecoverFiles // this.tabRecoverFiles.Controls.Add(this.recover1); - this.tabRecoverFiles.Location = new System.Drawing.Point(4, 28); + this.tabRecoverFiles.Location = new System.Drawing.Point(4, 38); + this.tabRecoverFiles.Margin = new System.Windows.Forms.Padding(4); this.tabRecoverFiles.Name = "tabRecoverFiles"; - this.tabRecoverFiles.Padding = new System.Windows.Forms.Padding(3); - this.tabRecoverFiles.Size = new System.Drawing.Size(986, 479); + this.tabRecoverFiles.Padding = new System.Windows.Forms.Padding(4); + this.tabRecoverFiles.Size = new System.Drawing.Size(1483, 727); this.tabRecoverFiles.TabIndex = 7; this.tabRecoverFiles.Text = "Recover Files"; this.tabRecoverFiles.UseVisualStyleBackColor = true; @@ -502,10 +521,10 @@ private void InitializeComponent() // recover1 // this.recover1.Dock = System.Windows.Forms.DockStyle.Fill; - this.recover1.Location = new System.Drawing.Point(3, 3); - this.recover1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.recover1.Location = new System.Drawing.Point(4, 4); + this.recover1.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6); this.recover1.Name = "recover1"; - this.recover1.Size = new System.Drawing.Size(980, 473); + this.recover1.Size = new System.Drawing.Size(1475, 719); this.recover1.TabIndex = 0; // // logViewToolStripMenuItem @@ -516,21 +535,21 @@ private void InitializeComponent() this.logViewToolStripMenuItem.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.logViewToolStripMenuItem.Name = "logViewToolStripMenuItem"; this.logViewToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.L))); - this.logViewToolStripMenuItem.Size = new System.Drawing.Size(64, 20); + this.logViewToolStripMenuItem.Size = new System.Drawing.Size(92, 28); this.logViewToolStripMenuItem.Text = "&Logging"; this.logViewToolStripMenuItem.ToolTipText = "Open a View of Elucidate log files."; // // logViewToolStripMenuItem1 // this.logViewToolStripMenuItem1.Name = "logViewToolStripMenuItem1"; - this.logViewToolStripMenuItem1.Size = new System.Drawing.Size(135, 22); + this.logViewToolStripMenuItem1.Size = new System.Drawing.Size(185, 30); this.logViewToolStripMenuItem1.Text = "&View..."; this.logViewToolStripMenuItem1.Click += new System.EventHandler(this.logViewToolStripMenuItem_Click); // // changeLogLocationToolStripMenuItem // this.changeLogLocationToolStripMenuItem.Name = "changeLogLocationToolStripMenuItem"; - this.changeLogLocationToolStripMenuItem.Size = new System.Drawing.Size(135, 22); + this.changeLogLocationToolStripMenuItem.Size = new System.Drawing.Size(185, 30); this.changeLogLocationToolStripMenuItem.Text = "&Location..."; this.changeLogLocationToolStripMenuItem.Click += new System.EventHandler(this.changeLogLocationToolStripMenuItem_Click); // @@ -540,7 +559,7 @@ private void InitializeComponent() this.helpToolStripMenuItem.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; this.helpToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F1; - this.helpToolStripMenuItem.Size = new System.Drawing.Size(45, 20); + this.helpToolStripMenuItem.Size = new System.Drawing.Size(63, 28); this.helpToolStripMenuItem.Text = "Help"; this.helpToolStripMenuItem.ToolTipText = "Goto the Help page."; this.helpToolStripMenuItem.Click += new System.EventHandler(this.helpToolStripMenuItem_Click); @@ -552,7 +571,7 @@ private void InitializeComponent() this.VersionIndicator.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.VersionIndicator.Name = "VersionIndicator"; this.VersionIndicator.ShowShortcutKeys = false; - this.VersionIndicator.Size = new System.Drawing.Size(107, 20); + this.VersionIndicator.Size = new System.Drawing.Size(150, 28); this.VersionIndicator.Text = "VersionIndicator"; this.VersionIndicator.ToolTipText = "The build number of this application."; this.VersionIndicator.Click += new System.EventHandler(this.helpToolStripMenuItem_Click); @@ -563,7 +582,7 @@ private void InitializeComponent() this.MenuItemChangelog.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.MenuItemChangelog.Name = "MenuItemChangelog"; this.MenuItemChangelog.ShortcutKeys = System.Windows.Forms.Keys.F1; - this.MenuItemChangelog.Size = new System.Drawing.Size(83, 20); + this.MenuItemChangelog.Size = new System.Drawing.Size(121, 28); this.MenuItemChangelog.Text = "C&hangeLog"; this.MenuItemChangelog.Click += new System.EventHandler(this.changeToolStripMenuItem_Click); // @@ -575,21 +594,21 @@ private void InitializeComponent() this.changeLogOfNewVersionToolStripMenuItem}); this.MenuItemNewVersionAvailable.ForeColor = System.Drawing.SystemColors.HotTrack; this.MenuItemNewVersionAvailable.Name = "MenuItemNewVersionAvailable"; - this.MenuItemNewVersionAvailable.Size = new System.Drawing.Size(161, 20); + this.MenuItemNewVersionAvailable.Size = new System.Drawing.Size(242, 28); this.MenuItemNewVersionAvailable.Text = "New Version Is Available"; this.MenuItemNewVersionAvailable.Visible = false; // // installNewVersionToolStripMenuItem // this.installNewVersionToolStripMenuItem.Name = "installNewVersionToolStripMenuItem"; - this.installNewVersionToolStripMenuItem.Size = new System.Drawing.Size(230, 22); + this.installNewVersionToolStripMenuItem.Size = new System.Drawing.Size(331, 30); this.installNewVersionToolStripMenuItem.Text = "Install New Version"; this.installNewVersionToolStripMenuItem.Click += new System.EventHandler(this.installNewVersionToolStripMenuItem_Click); // // changeLogOfNewVersionToolStripMenuItem // this.changeLogOfNewVersionToolStripMenuItem.Name = "changeLogOfNewVersionToolStripMenuItem"; - this.changeLogOfNewVersionToolStripMenuItem.Size = new System.Drawing.Size(230, 22); + this.changeLogOfNewVersionToolStripMenuItem.Size = new System.Drawing.Size(331, 30); this.changeLogOfNewVersionToolStripMenuItem.Text = "ChangeLog of New Version"; this.changeLogOfNewVersionToolStripMenuItem.Click += new System.EventHandler(this.changeLogOfNewVersionToolStripMenuItem_Click); // @@ -604,11 +623,12 @@ private void InitializeComponent() this.VersionIndicator, this.MenuItemChangelog, this.MenuItemNewVersionAvailable, - this.MenuItemNewVersionReadyForInstall}); + this.MenuItemNewVersionReadyForInstall, + this.dangerZoneToolStripMenuItem}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Padding = new System.Windows.Forms.Padding(7, 2, 0, 2); - this.menuStrip1.Size = new System.Drawing.Size(994, 24); + this.menuStrip1.Padding = new System.Windows.Forms.Padding(10, 3, 0, 3); + this.menuStrip1.Size = new System.Drawing.Size(1491, 34); this.menuStrip1.TabIndex = 0; this.menuStrip1.Text = "menuStrip1"; // @@ -622,7 +642,7 @@ private void InitializeComponent() this.exitToolStripMenuItem}); this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; this.fileToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F))); - this.fileToolStripMenuItem.Size = new System.Drawing.Size(40, 20); + this.fileToolStripMenuItem.Size = new System.Drawing.Size(53, 28); this.fileToolStripMenuItem.Text = "&File"; // // openSnapRAIDConfigToolStripMenuItem @@ -630,7 +650,7 @@ private void InitializeComponent() this.openSnapRAIDConfigToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; this.openSnapRAIDConfigToolStripMenuItem.Name = "openSnapRAIDConfigToolStripMenuItem"; this.openSnapRAIDConfigToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O))); - this.openSnapRAIDConfigToolStripMenuItem.Size = new System.Drawing.Size(252, 22); + this.openSnapRAIDConfigToolStripMenuItem.Size = new System.Drawing.Size(366, 30); this.openSnapRAIDConfigToolStripMenuItem.Text = "&Open SnapRAID Config"; this.openSnapRAIDConfigToolStripMenuItem.Click += new System.EventHandler(this.openSnapRAIDConfigToolStripMenuItem_Click); // @@ -638,20 +658,27 @@ private void InitializeComponent() // this.editSnapRAIDConfigToolStripMenuItem.Name = "editSnapRAIDConfigToolStripMenuItem"; this.editSnapRAIDConfigToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.E))); - this.editSnapRAIDConfigToolStripMenuItem.Size = new System.Drawing.Size(252, 22); + this.editSnapRAIDConfigToolStripMenuItem.Size = new System.Drawing.Size(366, 30); this.editSnapRAIDConfigToolStripMenuItem.Text = "&Edit SnapRAID Config"; this.editSnapRAIDConfigToolStripMenuItem.Click += new System.EventHandler(this.editSnapRAIDConfigToolStripMenuItem_Click); // + // closeSnapRAIDConfigToolStripMenuItem + // + this.closeSnapRAIDConfigToolStripMenuItem.Name = "closeSnapRAIDConfigToolStripMenuItem"; + this.closeSnapRAIDConfigToolStripMenuItem.Size = new System.Drawing.Size(366, 30); + this.closeSnapRAIDConfigToolStripMenuItem.Text = "Close SnapRAID Config"; + this.closeSnapRAIDConfigToolStripMenuItem.Click += new System.EventHandler(this.closeSnapRAIDConfigToolStripMenuItem_Click); + // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(249, 6); + this.toolStripSeparator1.Size = new System.Drawing.Size(363, 6); // // exitToolStripMenuItem // this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; this.exitToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4))); - this.exitToolStripMenuItem.Size = new System.Drawing.Size(252, 22); + this.exitToolStripMenuItem.Size = new System.Drawing.Size(366, 30); this.exitToolStripMenuItem.Text = "E&xit"; this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); // @@ -660,23 +687,33 @@ private void InitializeComponent() this.MenuItemNewVersionReadyForInstall.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; this.MenuItemNewVersionReadyForInstall.ForeColor = System.Drawing.SystemColors.HotTrack; this.MenuItemNewVersionReadyForInstall.Name = "MenuItemNewVersionReadyForInstall"; - this.MenuItemNewVersionReadyForInstall.Size = new System.Drawing.Size(192, 20); + this.MenuItemNewVersionReadyForInstall.Size = new System.Drawing.Size(289, 28); this.MenuItemNewVersionReadyForInstall.Text = "New Version Ready For Install"; this.MenuItemNewVersionReadyForInstall.Visible = false; this.MenuItemNewVersionReadyForInstall.Click += new System.EventHandler(this.MenuItemNewVersionReadyForInstall_Click); // - // closeSnapRAIDConfigToolStripMenuItem + // dangerZoneToolStripMenuItem // - this.closeSnapRAIDConfigToolStripMenuItem.Name = "closeSnapRAIDConfigToolStripMenuItem"; - this.closeSnapRAIDConfigToolStripMenuItem.Size = new System.Drawing.Size(252, 22); - this.closeSnapRAIDConfigToolStripMenuItem.Text = "Close SnapRAID Config"; - this.closeSnapRAIDConfigToolStripMenuItem.Click += new System.EventHandler(this.closeSnapRAIDConfigToolStripMenuItem_Click); + this.dangerZoneToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.deleteAllSnapRAIDRaidFilesToolStripMenuItem}); + this.dangerZoneToolStripMenuItem.Name = "dangerZoneToolStripMenuItem"; + this.dangerZoneToolStripMenuItem.Size = new System.Drawing.Size(137, 28); + this.dangerZoneToolStripMenuItem.Text = "Danger Zone"; + // + // deleteAllSnapRAIDRaidFilesToolStripMenuItem + // + this.deleteAllSnapRAIDRaidFilesToolStripMenuItem.Name = "deleteAllSnapRAIDRaidFilesToolStripMenuItem"; + this.deleteAllSnapRAIDRaidFilesToolStripMenuItem.Size = new System.Drawing.Size(315, 30); + this.deleteAllSnapRAIDRaidFilesToolStripMenuItem.Text = "Delete all SnapRAID files"; + this.deleteAllSnapRAIDRaidFilesToolStripMenuItem.ToolTipText = "This will delete all parity and content files defined in the current configuraito" + + "n file."; + this.deleteAllSnapRAIDRaidFilesToolStripMenuItem.Click += new System.EventHandler(this.deleteAllSnapRAIDRaidFilesToolStripMenuItem_Click); // // ElucidateForm // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); + this.AutoScaleDimensions = new System.Drawing.SizeF(144F, 144F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.ClientSize = new System.Drawing.Size(994, 561); + this.ClientSize = new System.Drawing.Size(1491, 842); this.Controls.Add(this.tabControl); this.Controls.Add(this.statusStrip1); this.Controls.Add(this.menuStrip1); @@ -685,7 +722,8 @@ private void InitializeComponent() this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.KeyPreview = true; this.MainMenuStrip = this.menuStrip1; - this.MinimumSize = new System.Drawing.Size(750, 598); + this.Margin = new System.Windows.Forms.Padding(4); + this.MinimumSize = new System.Drawing.Size(1114, 869); this.Name = "ElucidateForm"; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show; this.Text = "Elucidate"; @@ -757,6 +795,8 @@ private void InitializeComponent() private ToolStripMenuItem exitToolStripMenuItem; private ToolStripSeparator toolStripSeparator1; private ToolStripMenuItem closeSnapRAIDConfigToolStripMenuItem; + private ToolStripMenuItem dangerZoneToolStripMenuItem; + private ToolStripMenuItem deleteAllSnapRAIDRaidFilesToolStripMenuItem; } } diff --git a/Elucidate/Elucidate/ElucidateForm.cs b/Elucidate/Elucidate/ElucidateForm.cs index abbeacc..62f089c 100644 --- a/Elucidate/Elucidate/ElucidateForm.cs +++ b/Elucidate/Elucidate/ElucidateForm.cs @@ -29,19 +29,22 @@ #endregion Copyright (C) using System; +using System.Collections.Generic; using System.Diagnostics; using System.IO; +using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Elucidate.Controls; using Elucidate.HelperClasses; +using Elucidate.Logging; using Elucidate.Shared; namespace Elucidate { public sealed partial class ElucidateForm : Form { - private ConfigFileHelper _srConfig = new ConfigFileHelper(); + private readonly ConfigFileHelper _srConfig = new ConfigFileHelper(); public ElucidateForm() { @@ -58,8 +61,19 @@ public ElucidateForm() liveRunLogControl1.ActionWorker.RunWorkerCompleted += liveRunLogControl1_RunWorkerCompleted; recover1.TaskStarted += Recover1_TaskStarted; recover1.TaskCompleted += Recover1_TaskCompleted; - AppUpdate.NewVersonAvailable += VersionCheck_NewVersonAvailable; - AppUpdate.NewVersonInstallReady += VersionCheck_NewVersonInstallReady; + AppUpdate.NewVersionAvailable += VersionCheck_NewVersonAvailable; + AppUpdate.NewVersionInstallReady += VersionCheck_NewVersonInstallReady; + Settings.ConfigSaved += Settings_ConfigUpdated; + } + + private void Settings_ConfigUpdated(object sender, EventArgs e) + { + if (File.Exists(Properties.Settings.Default.ConfigFileLocation)) + { + LoadConfigFile(Properties.Settings.Default.ConfigFileLocation); + } + + EnableIfValid(Properties.Settings.Default.ConfigFileIsValid); } private void ElucidateForm_Load(object sender, EventArgs e) @@ -362,7 +376,7 @@ private void SetElucidateFormTitle(string filePath) newTitle += $" - {filePath}"; } - this.Text = newTitle; + Text = newTitle; } private void editSnapRAIDConfigToolStripMenuItem_Click(object sender, EventArgs e) @@ -400,5 +414,82 @@ private void closeSnapRAIDConfigToolStripMenuItem_Click(object sender, EventArgs Properties.Settings.Default.ConfigFileIsValid = false; EnableIfValid(false); } + + private void deleteAllSnapRAIDRaidFilesToolStripMenuItem_Click(object sender, EventArgs e) + { + List parityFiles = new List(); + + List contentFiles = new List(); + + if (!string.IsNullOrEmpty(_srConfig.ParityFile1)) + parityFiles.Add(_srConfig.ParityFile1); + + if (!string.IsNullOrEmpty(_srConfig.ParityFile2)) + parityFiles.Add(_srConfig.ParityFile2); + + if (!string.IsNullOrEmpty(_srConfig.ParityFile3)) + parityFiles.Add(_srConfig.ParityFile3); + + if (!string.IsNullOrEmpty(_srConfig.ParityFile4)) + parityFiles.Add(_srConfig.ParityFile4); + + if (!string.IsNullOrEmpty(_srConfig.ParityFile5)) + parityFiles.Add(_srConfig.ParityFile5); + + if (!string.IsNullOrEmpty(_srConfig.ParityFile6)) + parityFiles.Add(_srConfig.ParityFile6); + + foreach (var file in _srConfig.ContentFiles) + { + contentFiles.Add(file); + } + + var sb = new StringBuilder(); + + sb.AppendLine(@"Are you sure you want to remove the files below?"); + + sb.AppendLine(@"This action cannot be undone."); + + sb.AppendLine(""); + + foreach (var file in parityFiles) + { + sb.AppendLine($"Parity File: {file}"); + } + + foreach (var file in contentFiles) + { + sb.AppendLine($"Content File: {file}"); + } + + var result = MessageBox.Show( + this, + sb.ToString(), + @"Delete All SnapRAID Files", + MessageBoxButtons.YesNoCancel, + MessageBoxIcon.Warning); + + if (result == DialogResult.Yes) + { + try + { + foreach (var file in parityFiles) + { + File.Delete(file); + } + + foreach (var file in contentFiles) + { + File.Delete(file); + } + + MessageBoxExt.Show(this, @"The SnapRAID files have been removed", @"Files Removed"); + } + catch (Exception ex) + { + Log.Instance.Error(ex); + } + } + } } } \ No newline at end of file