diff --git a/CHANGELOG.md b/CHANGELOG.md index 952f85d..80f9acd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Hashing Changelog -All notable changes to this project will be documented in this file. +## [3.5] - 2022-10-19 +- New: Show File request in Find Identicals (#24) +- Security: Newtonsoft.JSON and CRC32.NET updated to latest version +- Hotfix: Much faster list rendering after hash calculation (#23) ## [3.4] - 2022-02-15 - Hotfix: Propely show files (#20) diff --git a/Hashing/Crc32.NET.dll b/Hashing/Crc32.NET.dll index c5e11c0..7a4f538 100644 Binary files a/Hashing/Crc32.NET.dll and b/Hashing/Crc32.NET.dll differ diff --git a/Hashing/Forms/IdenticalsForm.Designer.cs b/Hashing/Forms/IdenticalsForm.Designer.cs index 0d3306b..270ffa8 100644 --- a/Hashing/Forms/IdenticalsForm.Designer.cs +++ b/Hashing/Forms/IdenticalsForm.Designer.cs @@ -36,6 +36,7 @@ private void InitializeComponent() this.SumView = new Hashing.MoonTree(); this.panel1 = new System.Windows.Forms.Panel(); this.boxSelectHash = new Hashing.MoonSelect(); + this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.helperMenu.SuspendLayout(); this.panel2.SuspendLayout(); this.panel1.SuspendLayout(); @@ -49,18 +50,19 @@ private void InitializeComponent() this.helperMenu.ImageScalingSize = new System.Drawing.Size(20, 20); this.helperMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.copyToolStripMenuItem, + this.toolStripMenuItem1, this.saveAsJSONToolStripMenuItem}); this.helperMenu.Name = "helperMenu"; this.helperMenu.RenderMode = System.Windows.Forms.ToolStripRenderMode.System; this.helperMenu.ShowImageMargin = false; - this.helperMenu.Size = new System.Drawing.Size(141, 52); + this.helperMenu.Size = new System.Drawing.Size(156, 98); // // copyToolStripMenuItem // this.copyToolStripMenuItem.Font = new System.Drawing.Font("Segoe UI Semibold", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.copyToolStripMenuItem.ForeColor = System.Drawing.Color.White; this.copyToolStripMenuItem.Name = "copyToolStripMenuItem"; - this.copyToolStripMenuItem.Size = new System.Drawing.Size(140, 24); + this.copyToolStripMenuItem.Size = new System.Drawing.Size(155, 24); this.copyToolStripMenuItem.Text = "Copy"; this.copyToolStripMenuItem.Click += new System.EventHandler(this.copyToolStripMenuItem_Click); // @@ -69,7 +71,7 @@ private void InitializeComponent() this.saveAsJSONToolStripMenuItem.Font = new System.Drawing.Font("Segoe UI Semibold", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.saveAsJSONToolStripMenuItem.ForeColor = System.Drawing.Color.White; this.saveAsJSONToolStripMenuItem.Name = "saveAsJSONToolStripMenuItem"; - this.saveAsJSONToolStripMenuItem.Size = new System.Drawing.Size(140, 24); + this.saveAsJSONToolStripMenuItem.Size = new System.Drawing.Size(155, 24); this.saveAsJSONToolStripMenuItem.Text = "Save as JSON"; this.saveAsJSONToolStripMenuItem.Click += new System.EventHandler(this.saveAsJSONToolStripMenuItem_Click); // @@ -125,6 +127,15 @@ private void InitializeComponent() this.boxSelectHash.TabIndex = 10; this.boxSelectHash.SelectedIndexChanged += new System.EventHandler(this.boxSelectHash_SelectedIndexChanged); // + // toolStripMenuItem1 + // + this.toolStripMenuItem1.Font = new System.Drawing.Font("Segoe UI Semibold", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.toolStripMenuItem1.ForeColor = System.Drawing.Color.White; + this.toolStripMenuItem1.Name = "toolStripMenuItem1"; + this.toolStripMenuItem1.Size = new System.Drawing.Size(155, 24); + this.toolStripMenuItem1.Text = "Show file"; + this.toolStripMenuItem1.Click += new System.EventHandler(this.toolStripMenuItem1_Click); + // // IdenticalsForm // this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); @@ -159,5 +170,6 @@ private void InitializeComponent() private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Panel panel1; private MoonSelect boxSelectHash; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; } } \ No newline at end of file diff --git a/Hashing/Forms/IdenticalsForm.cs b/Hashing/Forms/IdenticalsForm.cs index e726945..dba5486 100644 --- a/Hashing/Forms/IdenticalsForm.cs +++ b/Hashing/Forms/IdenticalsForm.cs @@ -83,7 +83,7 @@ private void SaveJson() File.WriteAllText(dialog.FileName, JsonConvert.SerializeObject(_identicals, Formatting.Indented, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore - })) ; + })); } catch (Exception ex) { @@ -144,7 +144,7 @@ private void ListIdenticals(HashCode algo) _identicals.FindAll(z => z.SHA256 == x).ForEach(y => { - fileNode.Nodes.Add(y.File); + fileNode.Nodes.Add(y.File); }); nodes.Add(fileNode); @@ -374,5 +374,25 @@ private void IdenticalsForm_Resize(object sender, EventArgs e) Y = panel1.Height / 2 - boxSelectHash.Height / 2 }; } + + private void FindFile() + { + if (SumView.Nodes.Count > 0) + { + if (SumView.SelectedNode.Nodes.Count > 0) + { + Utilities.FindFile(SumView.SelectedNode.Nodes[0].Text); + } + else + { + Utilities.FindFile(SumView.SelectedNode.Text); + } + } + } + + private void toolStripMenuItem1_Click(object sender, EventArgs e) + { + FindFile(); + } } } diff --git a/Hashing/Forms/MainForm.cs b/Hashing/Forms/MainForm.cs index 2be1f80..213b65a 100644 --- a/Hashing/Forms/MainForm.cs +++ b/Hashing/Forms/MainForm.cs @@ -443,6 +443,7 @@ private void RefreshSumList() if ((SumResult.Sums != null) && (SumResult.Sums.Count > 0)) { SumView.Nodes.Clear(); + List tmpNodes = new List(); foreach (SumResult sr in SumResult.Sums) { @@ -462,10 +463,10 @@ private void RefreshSumList() if (Options.CurrentOptions.HashOptions.SHA3_384) rootNode.Nodes.Add("SHA3-384: " + sr.SHA3_384); if (Options.CurrentOptions.HashOptions.SHA3_512) rootNode.Nodes.Add("SHA3-512: " + sr.SHA3_512); - SumView.Nodes.Add(rootNode); - + tmpNodes.Add(rootNode); } + SumView.Nodes.AddRange(tmpNodes.ToArray()); SumView.ExpandAll(); _allSums = SumView.Nodes.Cast().ToArray(); } @@ -943,6 +944,7 @@ private void CalculateSums(bool analyzeJson = false) TreeNode rootNode = null; _analyzedFiles = new List(); + List tmpNodes = new List(); if (analyzeJson) { @@ -1014,10 +1016,7 @@ private void CalculateSums(bool analyzeJson = false) if (SumResult.Sums[i].SHA3_512 == _fileSummaries[i].SHA3_512) _analyzedFiles.Add(_fileSummaries[i].File); } - SumView.Invoke((MethodInvoker)delegate - { - SumView.Nodes.Add(rootNode); - }); + tmpNodes.Add(rootNode); } } else @@ -1040,19 +1039,17 @@ private void CalculateSums(bool analyzeJson = false) if (Options.CurrentOptions.HashOptions.SHA3_384) rootNode.Nodes.Add("SHA3-384: " + SumResult.Sums[i].SHA3_384); if (Options.CurrentOptions.HashOptions.SHA3_512) rootNode.Nodes.Add("SHA3-512: " + SumResult.Sums[i].SHA3_512); - SumView.Invoke((MethodInvoker)delegate - { - SumView.Nodes.Add(rootNode); - }); + tmpNodes.Add(rootNode); } } - _allSums = SumView.Nodes.Cast().ToArray(); SumView.Invoke((MethodInvoker)delegate { + SumView.Nodes.AddRange(tmpNodes.ToArray()); SumView.ExpandAll(); }); + _allSums = SumView.Nodes.Cast().ToArray(); lblCalculating.Invoke((MethodInvoker)delegate { @@ -1436,7 +1433,7 @@ private void FilterTable() private void SumView_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e) { - + } } } diff --git a/Hashing/Hashing.csproj b/Hashing/Hashing.csproj index 93be861..398987c 100644 --- a/Hashing/Hashing.csproj +++ b/Hashing/Hashing.csproj @@ -25,7 +25,7 @@ false - AnyCPU + x64 pdbonly true bin\Release\ @@ -39,11 +39,10 @@ - ..\packages\Crc32.NET.1.1.0\lib\net20\Crc32.NET.dll + ..\packages\Crc32.NET.1.2.0\lib\net20\Crc32.NET.dll - - ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll - True + + ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll @@ -186,8 +185,6 @@ - - diff --git a/Hashing/Newtonsoft.Json.dll b/Hashing/Newtonsoft.Json.dll index be6558d..7af125a 100644 Binary files a/Hashing/Newtonsoft.Json.dll and b/Hashing/Newtonsoft.Json.dll differ diff --git a/Hashing/Program.cs b/Hashing/Program.cs index 66c3ee7..3383e4c 100644 --- a/Hashing/Program.cs +++ b/Hashing/Program.cs @@ -12,7 +12,7 @@ static class Program // Enter current version here internal readonly static float Major = 3; - internal readonly static float Minor = 4; + internal readonly static float Minor = 5; /* END OF VERSION PROPERTIES */ diff --git a/Hashing/packages.config b/Hashing/packages.config index fabfab8..3643ff4 100644 --- a/Hashing/packages.config +++ b/Hashing/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/README.md b/README.md index b39055e..7d55720 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Simple utility to calculate and compare hashes of multiple files

- +

@@ -57,6 +57,6 @@ https://github.com/hellzerg/hashing/blob/master/IMAGES.md ## Details: ## -* Latest version: 3.4 -* Released: February 15, 2022 -* SHA256: 066D3090044D5D77D4B2454C013E56648363EC329D13750B416B4C69B0AAE4AA \ No newline at end of file +* Latest version: 3.5 +* Released: October 19, 2022 +* SHA256: 70934C870A61F5BA60A2C0934B5523C52FEA81180F76B7868727E97EF46AB584 \ No newline at end of file diff --git a/version.txt b/version.txt index af1817b..56e972a 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -3.4 \ No newline at end of file +3.5 \ No newline at end of file