From 1b37bd790b6650bdb61e1352d18bbaff5a0a66d3 Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 21 Aug 2019 15:17:18 +0300 Subject: [PATCH] Renamed colorDialog --- Crypto Notepad/SettingsForm.Designer.cs | 13 ++++--- Crypto Notepad/SettingsForm.cs | 46 ++++++++++++------------- Crypto Notepad/SettingsForm.resx | 4 +-- 3 files changed, 31 insertions(+), 32 deletions(-) diff --git a/Crypto Notepad/SettingsForm.Designer.cs b/Crypto Notepad/SettingsForm.Designer.cs index f7ec3da..2e0fc72 100644 --- a/Crypto Notepad/SettingsForm.Designer.cs +++ b/Crypto Notepad/SettingsForm.Designer.cs @@ -1,4 +1,4 @@ -namespace Crypto_Notepad +namespace Crypto_Notepad { partial class SettingsForm { @@ -28,10 +28,9 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SettingsForm)); this.FontColorLabel = new System.Windows.Forms.Label(); - this.colorDialog1 = new System.Windows.Forms.ColorDialog(); + this.colorDialog = new System.Windows.Forms.ColorDialog(); this.SaveSettingsButton = new System.Windows.Forms.Button(); this.FontNameLabel = new System.Windows.Forms.Label(); this.SettingsTabControl = new System.Windows.Forms.TabControl(); @@ -106,10 +105,10 @@ private void InitializeComponent() this.FontColorLabel.TabIndex = 0; this.FontColorLabel.Text = "Font color"; // - // colorDialog1 + // colorDialog // - this.colorDialog1.AnyColor = true; - this.colorDialog1.FullOpen = true; + this.colorDialog.AnyColor = true; + this.colorDialog.FullOpen = true; // // SaveSettingsButton // @@ -794,7 +793,7 @@ private void InitializeComponent() private System.Windows.Forms.Label BackgroundColorLabel; private System.Windows.Forms.Panel HighlightsColorPanel; private System.Windows.Forms.Label HighlightsColorLabel; - private System.Windows.Forms.ColorDialog colorDialog1; + private System.Windows.Forms.ColorDialog colorDialog; private System.Windows.Forms.TextBox SaltTextBox; private System.Windows.Forms.ComboBox KeySizeComboBox; private System.Windows.Forms.Label SaltLabel; diff --git a/Crypto Notepad/SettingsForm.cs b/Crypto Notepad/SettingsForm.cs index 1a52e89..f43f90c 100644 --- a/Crypto Notepad/SettingsForm.cs +++ b/Crypto Notepad/SettingsForm.cs @@ -256,7 +256,7 @@ private void SettingsForm_Load(object sender, EventArgs e) string custom_colors = ps.CustomColor; int[] array_of_colors = custom_colors.Split(';').Select(n => Convert.ToInt32(n)).ToArray(); - colorDialog1.CustomColors = array_of_colors; + colorDialog.CustomColors = array_of_colors; } /*Form Events*/ @@ -285,32 +285,32 @@ private void SaveSettingsButton_Click(object sender, EventArgs e) /*Settings Section*/ private void FontColorPanel_Click_1(object sender, EventArgs e) { - colorDialog1.Color = FontColorPanel.BackColor; + colorDialog.Color = FontColorPanel.BackColor; using (new CenterWinDialog(this)) { - colorDialog1.ShowDialog(); + colorDialog.ShowDialog(); } - FontColorPanel.BackColor = colorDialog1.Color; + FontColorPanel.BackColor = colorDialog.Color; } private void BackgroundColorPanel_Click(object sender, EventArgs e) { - colorDialog1.Color = BackgroundColorPanel.BackColor; + colorDialog.Color = BackgroundColorPanel.BackColor; using (new CenterWinDialog(this)) { - colorDialog1.ShowDialog(); + colorDialog.ShowDialog(); } - BackgroundColorPanel.BackColor = colorDialog1.Color; + BackgroundColorPanel.BackColor = colorDialog.Color; } private void HighlightsColorPanel_Click(object sender, EventArgs e) { - colorDialog1.Color = HighlightsColorPanel.BackColor; + colorDialog.Color = HighlightsColorPanel.BackColor; using (new CenterWinDialog(this)) { - colorDialog1.ShowDialog(); + colorDialog.ShowDialog(); } - HighlightsColorPanel.BackColor = colorDialog1.Color; + HighlightsColorPanel.BackColor = colorDialog.Color; } private void ToolbarCheckBox_CheckedChanged(object sender, EventArgs e) @@ -328,47 +328,47 @@ private void ToolbarCheckBox_CheckedChanged(object sender, EventArgs e) private void LNBackgroundColorPanel_Click(object sender, EventArgs e) { - colorDialog1.Color = LNBackgroundColorPanel.BackColor; + colorDialog.Color = LNBackgroundColorPanel.BackColor; using (new CenterWinDialog(this)) { - colorDialog1.ShowDialog(); + colorDialog.ShowDialog(); } - LNBackgroundColorPanel.BackColor = colorDialog1.Color; + LNBackgroundColorPanel.BackColor = colorDialog.Color; } private void LNFontColorPanel_Click(object sender, EventArgs e) { - colorDialog1.Color = LNFontColorPanel.BackColor; + colorDialog.Color = LNFontColorPanel.BackColor; using (new CenterWinDialog(this)) { - colorDialog1.ShowDialog(); + colorDialog.ShowDialog(); } - LNFontColorPanel.BackColor = colorDialog1.Color; + LNFontColorPanel.BackColor = colorDialog.Color; } private void BLColorPanel_Click(object sender, EventArgs e) { - colorDialog1.Color = BLColorPanel.BackColor; + colorDialog.Color = BLColorPanel.BackColor; using (new CenterWinDialog(this)) { - colorDialog1.ShowDialog(); + colorDialog.ShowDialog(); } - BLColorPanel.BackColor = colorDialog1.Color; + BLColorPanel.BackColor = colorDialog.Color; } private void GLColorPanel_Click(object sender, EventArgs e) { - colorDialog1.Color = GLColorPanel.BackColor; + colorDialog.Color = GLColorPanel.BackColor; using (new CenterWinDialog(this)) { - colorDialog1.ShowDialog(); + colorDialog.ShowDialog(); } - GLColorPanel.BackColor = colorDialog1.Color; + GLColorPanel.BackColor = colorDialog.Color; } private void SettingsForm_FormClosed(object sender, FormClosedEventArgs e) { - string result = string.Join(";", colorDialog1.CustomColors); + string result = string.Join(";", colorDialog.CustomColors); ps.CustomColor = result; ps.Save(); } diff --git a/Crypto Notepad/SettingsForm.resx b/Crypto Notepad/SettingsForm.resx index 1445532..b7ef92a 100644 --- a/Crypto Notepad/SettingsForm.resx +++ b/Crypto Notepad/SettingsForm.resx @@ -1,4 +1,4 @@ - +