diff --git a/moz-checksum-generator/MainForm.Designer.cs b/moz-checksum-generator/MainForm.Designer.cs index 71c7afc5..1438d54b 100644 --- a/moz-checksum-generator/MainForm.Designer.cs +++ b/moz-checksum-generator/MainForm.Designer.cs @@ -28,6 +28,7 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { + components = new System.ComponentModel.Container(); gbProduct = new System.Windows.Forms.GroupBox(); rbFirefoxAurora = new System.Windows.Forms.RadioButton(); rbSeaMonkey = new System.Windows.Forms.RadioButton(); @@ -39,8 +40,14 @@ private void InitializeComponent() gbChecksums = new System.Windows.Forms.GroupBox(); splitContainer1 = new System.Windows.Forms.SplitContainer(); rtbBit32 = new System.Windows.Forms.RichTextBox(); + contextMenuStripChecksums32Bit = new System.Windows.Forms.ContextMenuStrip(components); + tsmiSelectAll32 = new System.Windows.Forms.ToolStripMenuItem(); + tsmiCopy32ToClipboard = new System.Windows.Forms.ToolStripMenuItem(); lblBit32 = new System.Windows.Forms.Label(); rtbBit64 = new System.Windows.Forms.RichTextBox(); + contextMenuStripChecksums64Bit = new System.Windows.Forms.ContextMenuStrip(components); + tsmiSelectAll64 = new System.Windows.Forms.ToolStripMenuItem(); + tsmiCopy64ToClipboard = new System.Windows.Forms.ToolStripMenuItem(); lblBit64 = new System.Windows.Forms.Label(); lblNewLangs = new System.Windows.Forms.Label(); lblNewLangCodes = new System.Windows.Forms.Label(); @@ -50,6 +57,8 @@ private void InitializeComponent() splitContainer1.Panel1.SuspendLayout(); splitContainer1.Panel2.SuspendLayout(); splitContainer1.SuspendLayout(); + contextMenuStripChecksums32Bit.SuspendLayout(); + contextMenuStripChecksums64Bit.SuspendLayout(); SuspendLayout(); // // gbProduct @@ -193,6 +202,7 @@ private void InitializeComponent() // rtbBit32 // rtbBit32.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + rtbBit32.ContextMenuStrip = contextMenuStripChecksums32Bit; rtbBit32.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); rtbBit32.Location = new System.Drawing.Point(3, 18); rtbBit32.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); @@ -202,6 +212,26 @@ private void InitializeComponent() rtbBit32.TabIndex = 1; rtbBit32.Text = ""; // + // contextMenuStripChecksums32Bit + // + contextMenuStripChecksums32Bit.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { tsmiSelectAll32, tsmiCopy32ToClipboard }); + contextMenuStripChecksums32Bit.Name = "contextMenuStripChecksums"; + contextMenuStripChecksums32Bit.Size = new System.Drawing.Size(170, 48); + // + // tsmiSelectAll32 + // + tsmiSelectAll32.Name = "tsmiSelectAll32"; + tsmiSelectAll32.Size = new System.Drawing.Size(169, 22); + tsmiSelectAll32.Text = "Select all"; + tsmiSelectAll32.Click += tsmiSelectAll32_Click; + // + // tsmiCopy32ToClipboard + // + tsmiCopy32ToClipboard.Name = "tsmiCopy32ToClipboard"; + tsmiCopy32ToClipboard.Size = new System.Drawing.Size(169, 22); + tsmiCopy32ToClipboard.Text = "Copy to clipboard"; + tsmiCopy32ToClipboard.Click += tsmiCopy32ToClipboard_Click; + // // lblBit32 // lblBit32.AutoSize = true; @@ -215,6 +245,7 @@ private void InitializeComponent() // rtbBit64 // rtbBit64.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + rtbBit64.ContextMenuStrip = contextMenuStripChecksums64Bit; rtbBit64.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); rtbBit64.Location = new System.Drawing.Point(6, 18); rtbBit64.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); @@ -224,6 +255,26 @@ private void InitializeComponent() rtbBit64.TabIndex = 1; rtbBit64.Text = ""; // + // contextMenuStripChecksums64Bit + // + contextMenuStripChecksums64Bit.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { tsmiSelectAll64, tsmiCopy64ToClipboard }); + contextMenuStripChecksums64Bit.Name = "contextMenuStripChecksums64Bit"; + contextMenuStripChecksums64Bit.Size = new System.Drawing.Size(170, 48); + // + // tsmiSelectAll64 + // + tsmiSelectAll64.Name = "tsmiSelectAll64"; + tsmiSelectAll64.Size = new System.Drawing.Size(169, 22); + tsmiSelectAll64.Text = "Select all"; + tsmiSelectAll64.Click += tsmiSelectAll64_Click; + // + // tsmiCopy64ToClipboard + // + tsmiCopy64ToClipboard.Name = "tsmiCopy64ToClipboard"; + tsmiCopy64ToClipboard.Size = new System.Drawing.Size(169, 22); + tsmiCopy64ToClipboard.Text = "Copy to clipboard"; + tsmiCopy64ToClipboard.Click += tsmiCopy64ToClipboard_Click; + // // lblBit64 // lblBit64.AutoSize = true; @@ -272,6 +323,8 @@ private void InitializeComponent() splitContainer1.Panel2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)splitContainer1).EndInit(); splitContainer1.ResumeLayout(false); + contextMenuStripChecksums32Bit.ResumeLayout(false); + contextMenuStripChecksums64Bit.ResumeLayout(false); ResumeLayout(false); } @@ -293,6 +346,12 @@ private void InitializeComponent() private System.Windows.Forms.RadioButton rbFirefoxAurora; private System.Windows.Forms.Label lblNewLangs; private System.Windows.Forms.Label lblNewLangCodes; + private System.Windows.Forms.ContextMenuStrip contextMenuStripChecksums32Bit; + private System.Windows.Forms.ToolStripMenuItem tsmiSelectAll32; + private System.Windows.Forms.ToolStripMenuItem tsmiCopy32ToClipboard; + private System.Windows.Forms.ContextMenuStrip contextMenuStripChecksums64Bit; + private System.Windows.Forms.ToolStripMenuItem tsmiSelectAll64; + private System.Windows.Forms.ToolStripMenuItem tsmiCopy64ToClipboard; } } diff --git a/moz-checksum-generator/MainForm.cs b/moz-checksum-generator/MainForm.cs index 2d742899..cf2cef28 100644 --- a/moz-checksum-generator/MainForm.cs +++ b/moz-checksum-generator/MainForm.cs @@ -40,7 +40,9 @@ private void rbFirefoxRelease_CheckedChanged(object sender, EventArgs e) private void clearExistingData() { rtbBit32.Clear(); + rtbBit32.ContextMenuStrip = null; rtbBit64.Clear(); + rtbBit64.ContextMenuStrip = null; lblVersion.Text = ""; lblNewLangCodes.Text = "unknown"; } @@ -139,6 +141,7 @@ void getFxChecksums() data.Add(language, matches[i].Value[..128]); } rtbBit32.Text = getChecksumCode(data); + rtbBit32.ContextMenuStrip = contextMenuStripChecksums32Bit; string new_langs = getNewLangCodes(updater.software.Firefox.validLanguageCodes(), data.Keys); lblNewLangCodes.Text = new_langs; @@ -153,6 +156,7 @@ void getFxChecksums() data.Add(language, matches[i].Value[..128]); } //for rtbBit64.Text = getChecksumCode(data); + rtbBit64.ContextMenuStrip = contextMenuStripChecksums64Bit; } @@ -205,6 +209,7 @@ void getFxAuroraChecksums() data.Add(language, matches[i].Value[..128]); } rtbBit32.Text = getChecksumCode(data); + rtbBit32.ContextMenuStrip = contextMenuStripChecksums32Bit; string new_langs = getNewLangCodes(updater.software.FirefoxAurora.validLanguageCodes(), data.Keys); lblNewLangCodes.Text = new_langs; @@ -219,6 +224,7 @@ void getFxAuroraChecksums() data.Add(language, matches[i].Value[..128]); } rtbBit64.Text = getChecksumCode(data); + rtbBit64.ContextMenuStrip = contextMenuStripChecksums64Bit; } @@ -272,6 +278,7 @@ void getFxEsrChecksums() data.Add(language, matches[i].Value[..128]); } rtbBit32.Text = getChecksumCode(data); + rtbBit32.ContextMenuStrip = contextMenuStripChecksums32Bit; string new_langs = getNewLangCodes(updater.software.FirefoxESR.validLanguageCodes(), data.Keys); lblNewLangCodes.Text = new_langs; @@ -286,6 +293,7 @@ void getFxEsrChecksums() data.Add(language, matches[i].Value[..128]); } rtbBit64.Text = getChecksumCode(data); + rtbBit64.ContextMenuStrip = contextMenuStripChecksums64Bit; } @@ -342,6 +350,7 @@ void getSmChecksums() data.Add(language, matches[i].Value[..128]); } rtbBit32.Text = getChecksumCode(data); + rtbBit32.ContextMenuStrip = contextMenuStripChecksums32Bit; string new_langs = getNewLangCodes(updater.software.SeaMonkey.validLanguageCodes(), data.Keys); lblNewLangCodes.Text = new_langs; @@ -357,6 +366,7 @@ void getSmChecksums() data.Add(language, matches[i].Value[..128]); } rtbBit64.Text = getChecksumCode(data); + rtbBit64.ContextMenuStrip = contextMenuStripChecksums64Bit; } @@ -410,6 +420,7 @@ void getTbChecksums() data.Add(language, matches[i].Value[..128]); } rtbBit32.Text = getChecksumCode(data); + rtbBit32.ContextMenuStrip = contextMenuStripChecksums32Bit; string new_langs = getNewLangCodes(updater.software.Thunderbird.validLanguageCodes(), data.Keys); lblNewLangCodes.Text = new_langs; @@ -424,6 +435,7 @@ void getTbChecksums() data.Add(language, matches[i].Value[..128]); } //for rtbBit64.Text = getChecksumCode(data); + rtbBit64.ContextMenuStrip = contextMenuStripChecksums64Bit; } private static string getNewLangCodes(IEnumerable oldLangCodes, IEnumerable newLangCodes) @@ -447,5 +459,25 @@ private static string getNewLangCodes(IEnumerable oldLangCodes, IEnumera } return newCodes.Remove(0, 2); } + + private void tsmiSelectAll32_Click(object sender, EventArgs e) + { + rtbBit32.SelectAll(); + } + + private void tsmiCopy32ToClipboard_Click(object sender, EventArgs e) + { + rtbBit32.Copy(); + } + + private void tsmiSelectAll64_Click(object sender, EventArgs e) + { + rtbBit64.SelectAll(); + } + + private void tsmiCopy64ToClipboard_Click(object sender, EventArgs e) + { + rtbBit64.Copy(); + } } // class } // namespace diff --git a/moz-checksum-generator/MainForm.resx b/moz-checksum-generator/MainForm.resx index 8b2ff64a..891391ae 100644 --- a/moz-checksum-generator/MainForm.resx +++ b/moz-checksum-generator/MainForm.resx @@ -117,4 +117,10 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 + + + 253, 17 + \ No newline at end of file diff --git a/moz-checksum-generator/moz-checksum-generator.csproj b/moz-checksum-generator/moz-checksum-generator.csproj index 66ac2641..9aa6b9cc 100644 --- a/moz-checksum-generator/moz-checksum-generator.csproj +++ b/moz-checksum-generator/moz-checksum-generator.csproj @@ -9,8 +9,8 @@ disable Utility to generates checksums for Mozilla Firefox / SeaMonkey / Thunderbird setups. Copyright © 2017-2024 Dirk Stolle - 1.3.0.0 - 1.3.0.0 + 1.3.1.0 + 1.3.1.0 GPL-3.0-or-later