SettingsForm code now is more readable

1) Сode has been divided into blocks and commented.
2) Almost all names now starts from an uppercase.
This commit is contained in:
Alexander 2018-12-25 17:36:17 +02:00
parent f63b3c1e05
commit 5443de5378
2 changed files with 440 additions and 439 deletions

View file

@ -30,132 +30,132 @@ private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SettingsForm));
this.BackgroundColorLabel = new System.Windows.Forms.Label();
this.FontColorLabel = new System.Windows.Forms.Label();
this.colorDialog1 = new System.Windows.Forms.ColorDialog();
this.saveSettingsButton = new System.Windows.Forms.Button();
this.fontLabel = new System.Windows.Forms.Label();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.panel3 = new System.Windows.Forms.Panel();
this.label3 = new System.Windows.Forms.Label();
this.comboBox2 = new System.Windows.Forms.ComboBox();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.panel1 = new System.Windows.Forms.Panel();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.textBox2 = new System.Windows.Forms.TextBox();
this.comboBox4 = new System.Windows.Forms.ComboBox();
this.label7 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.comboBox3 = new System.Windows.Forms.ComboBox();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.checkBox3 = new System.Windows.Forms.CheckBox();
this.checkBox6 = new System.Windows.Forms.CheckBox();
this.checkBox5 = new System.Windows.Forms.CheckBox();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.checkBox2 = new System.Windows.Forms.CheckBox();
this.checkBox4 = new System.Windows.Forms.CheckBox();
this.button1 = new System.Windows.Forms.Button();
this.SaveSettingsButton = new System.Windows.Forms.Button();
this.FontNameLabel = new System.Windows.Forms.Label();
this.SettingsTabControl = new System.Windows.Forms.TabControl();
this.EditorTabPage = new System.Windows.Forms.TabPage();
this.HighlightsColorPanel = new System.Windows.Forms.Panel();
this.HighlightsColorLabel = new System.Windows.Forms.Label();
this.FontSizeComboBox = new System.Windows.Forms.ComboBox();
this.BackgroundColorLabel = new System.Windows.Forms.Label();
this.FontSizeLabel = new System.Windows.Forms.Label();
this.BackgroundColorPanel = new System.Windows.Forms.Panel();
this.FontColorPanel = new System.Windows.Forms.Panel();
this.FontNameComboBox = new System.Windows.Forms.ComboBox();
this.EncryptionTabPage = new System.Windows.Forms.TabPage();
this.PwdIterationsTextBox = new System.Windows.Forms.TextBox();
this.HashComboBox = new System.Windows.Forms.ComboBox();
this.PwdIterationsLabel = new System.Windows.Forms.Label();
this.SaltTextBox = new System.Windows.Forms.TextBox();
this.KeySizeComboBox = new System.Windows.Forms.ComboBox();
this.SaltLabel = new System.Windows.Forms.Label();
this.KeySizeLabel = new System.Windows.Forms.Label();
this.HashLabel = new System.Windows.Forms.Label();
this.ApplicationTabPage = new System.Windows.Forms.TabPage();
this.IntegrateCheckBox = new System.Windows.Forms.CheckBox();
this.ToolbarCheckBox = new System.Windows.Forms.CheckBox();
this.SendToCheckBox = new System.Windows.Forms.CheckBox();
this.AutoSaveCheckBox = new System.Windows.Forms.CheckBox();
this.AssociateCheckBox = new System.Windows.Forms.CheckBox();
this.UpdatesCheckBox = new System.Windows.Forms.CheckBox();
this.AutoLockCheckBox = new System.Windows.Forms.CheckBox();
this.ResetSettingsButton = new System.Windows.Forms.Button();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.checkBox7 = new System.Windows.Forms.CheckBox();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.tabPage3.SuspendLayout();
this.SettingsTabControl.SuspendLayout();
this.EditorTabPage.SuspendLayout();
this.EncryptionTabPage.SuspendLayout();
this.ApplicationTabPage.SuspendLayout();
this.SuspendLayout();
//
// BackgroundColorLabel
// FontColorLabel
//
this.BackgroundColorLabel.AutoSize = true;
this.BackgroundColorLabel.Location = new System.Drawing.Point(7, 86);
this.BackgroundColorLabel.Name = "BackgroundColorLabel";
this.BackgroundColorLabel.Size = new System.Drawing.Size(54, 13);
this.BackgroundColorLabel.TabIndex = 0;
this.BackgroundColorLabel.Text = "Font color";
this.FontColorLabel.AutoSize = true;
this.FontColorLabel.Location = new System.Drawing.Point(7, 86);
this.FontColorLabel.Name = "FontColorLabel";
this.FontColorLabel.Size = new System.Drawing.Size(54, 13);
this.FontColorLabel.TabIndex = 0;
this.FontColorLabel.Text = "Font color";
//
// colorDialog1
//
this.colorDialog1.AnyColor = true;
this.colorDialog1.FullOpen = true;
//
// saveSettingsButton
// SaveSettingsButton
//
this.saveSettingsButton.Location = new System.Drawing.Point(179, 239);
this.saveSettingsButton.Name = "saveSettingsButton";
this.saveSettingsButton.Size = new System.Drawing.Size(79, 23);
this.saveSettingsButton.TabIndex = 4;
this.saveSettingsButton.Text = "Save && Close";
this.saveSettingsButton.UseVisualStyleBackColor = true;
this.saveSettingsButton.Click += new System.EventHandler(this.saveSettingsButton_Click);
this.SaveSettingsButton.Location = new System.Drawing.Point(179, 239);
this.SaveSettingsButton.Name = "SaveSettingsButton";
this.SaveSettingsButton.Size = new System.Drawing.Size(79, 23);
this.SaveSettingsButton.TabIndex = 4;
this.SaveSettingsButton.Text = "Save && Close";
this.SaveSettingsButton.UseVisualStyleBackColor = true;
this.SaveSettingsButton.Click += new System.EventHandler(this.SaveSettingsButton_Click);
//
// fontLabel
// FontNameLabel
//
this.fontLabel.AutoSize = true;
this.fontLabel.Location = new System.Drawing.Point(7, 18);
this.fontLabel.Name = "fontLabel";
this.fontLabel.Size = new System.Drawing.Size(57, 13);
this.fontLabel.TabIndex = 1;
this.fontLabel.Text = "Font name";
this.FontNameLabel.AutoSize = true;
this.FontNameLabel.Location = new System.Drawing.Point(7, 18);
this.FontNameLabel.Name = "FontNameLabel";
this.FontNameLabel.Size = new System.Drawing.Size(57, 13);
this.FontNameLabel.TabIndex = 1;
this.FontNameLabel.Text = "Font name";
//
// tabControl1
// SettingsTabControl
//
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Controls.Add(this.tabPage3);
this.tabControl1.Location = new System.Drawing.Point(2, 2);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(260, 231);
this.tabControl1.TabIndex = 4;
this.SettingsTabControl.Controls.Add(this.EditorTabPage);
this.SettingsTabControl.Controls.Add(this.EncryptionTabPage);
this.SettingsTabControl.Controls.Add(this.ApplicationTabPage);
this.SettingsTabControl.Location = new System.Drawing.Point(2, 2);
this.SettingsTabControl.Name = "SettingsTabControl";
this.SettingsTabControl.SelectedIndex = 0;
this.SettingsTabControl.Size = new System.Drawing.Size(260, 231);
this.SettingsTabControl.TabIndex = 4;
//
// tabPage1
// EditorTabPage
//
this.tabPage1.Controls.Add(this.panel3);
this.tabPage1.Controls.Add(this.label3);
this.tabPage1.Controls.Add(this.comboBox2);
this.tabPage1.Controls.Add(this.label2);
this.tabPage1.Controls.Add(this.label1);
this.tabPage1.Controls.Add(this.panel2);
this.tabPage1.Controls.Add(this.panel1);
this.tabPage1.Controls.Add(this.comboBox1);
this.tabPage1.Controls.Add(this.fontLabel);
this.tabPage1.Controls.Add(this.BackgroundColorLabel);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(252, 205);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Editor";
this.tabPage1.UseVisualStyleBackColor = true;
this.EditorTabPage.Controls.Add(this.HighlightsColorPanel);
this.EditorTabPage.Controls.Add(this.HighlightsColorLabel);
this.EditorTabPage.Controls.Add(this.FontSizeComboBox);
this.EditorTabPage.Controls.Add(this.BackgroundColorLabel);
this.EditorTabPage.Controls.Add(this.FontSizeLabel);
this.EditorTabPage.Controls.Add(this.BackgroundColorPanel);
this.EditorTabPage.Controls.Add(this.FontColorPanel);
this.EditorTabPage.Controls.Add(this.FontNameComboBox);
this.EditorTabPage.Controls.Add(this.FontNameLabel);
this.EditorTabPage.Controls.Add(this.FontColorLabel);
this.EditorTabPage.Location = new System.Drawing.Point(4, 22);
this.EditorTabPage.Name = "EditorTabPage";
this.EditorTabPage.Padding = new System.Windows.Forms.Padding(3);
this.EditorTabPage.Size = new System.Drawing.Size(252, 205);
this.EditorTabPage.TabIndex = 0;
this.EditorTabPage.Text = "Editor";
this.EditorTabPage.UseVisualStyleBackColor = true;
//
// panel3
// HighlightsColorPanel
//
this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel3.Cursor = System.Windows.Forms.Cursors.Hand;
this.panel3.Location = new System.Drawing.Point(136, 151);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(100, 21);
this.panel3.TabIndex = 12;
this.panel3.Click += new System.EventHandler(this.panel3_Click);
this.HighlightsColorPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.HighlightsColorPanel.Cursor = System.Windows.Forms.Cursors.Hand;
this.HighlightsColorPanel.Location = new System.Drawing.Point(136, 151);
this.HighlightsColorPanel.Name = "HighlightsColorPanel";
this.HighlightsColorPanel.Size = new System.Drawing.Size(100, 21);
this.HighlightsColorPanel.TabIndex = 12;
this.HighlightsColorPanel.Click += new System.EventHandler(this.HighlightsColorPanel_Click);
//
// label3
// HighlightsColorLabel
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(7, 154);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(79, 13);
this.label3.TabIndex = 11;
this.label3.Text = "Highlights color";
this.HighlightsColorLabel.AutoSize = true;
this.HighlightsColorLabel.Location = new System.Drawing.Point(7, 154);
this.HighlightsColorLabel.Name = "HighlightsColorLabel";
this.HighlightsColorLabel.Size = new System.Drawing.Size(79, 13);
this.HighlightsColorLabel.TabIndex = 11;
this.HighlightsColorLabel.Text = "Highlights color";
//
// comboBox2
// FontSizeComboBox
//
this.comboBox2.FormattingEnabled = true;
this.comboBox2.Items.AddRange(new object[] {
this.FontSizeComboBox.FormattingEnabled = true;
this.FontSizeComboBox.Items.AddRange(new object[] {
"8",
"9",
"10",
@ -172,263 +172,263 @@ private void InitializeComponent()
"36",
"48",
"72"});
this.comboBox2.Location = new System.Drawing.Point(136, 49);
this.comboBox2.Name = "comboBox2";
this.comboBox2.Size = new System.Drawing.Size(100, 21);
this.comboBox2.TabIndex = 6;
this.FontSizeComboBox.Location = new System.Drawing.Point(136, 49);
this.FontSizeComboBox.Name = "FontSizeComboBox";
this.FontSizeComboBox.Size = new System.Drawing.Size(100, 21);
this.FontSizeComboBox.TabIndex = 6;
//
// label2
// BackgroundColorLabel
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(7, 120);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(91, 13);
this.label2.TabIndex = 10;
this.label2.Text = "Background color";
this.BackgroundColorLabel.AutoSize = true;
this.BackgroundColorLabel.Location = new System.Drawing.Point(7, 120);
this.BackgroundColorLabel.Name = "BackgroundColorLabel";
this.BackgroundColorLabel.Size = new System.Drawing.Size(91, 13);
this.BackgroundColorLabel.TabIndex = 10;
this.BackgroundColorLabel.Text = "Background color";
//
// label1
// FontSizeLabel
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(7, 52);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(49, 13);
this.label1.TabIndex = 9;
this.label1.Text = "Font size";
this.FontSizeLabel.AutoSize = true;
this.FontSizeLabel.Location = new System.Drawing.Point(7, 52);
this.FontSizeLabel.Name = "FontSizeLabel";
this.FontSizeLabel.Size = new System.Drawing.Size(49, 13);
this.FontSizeLabel.TabIndex = 9;
this.FontSizeLabel.Text = "Font size";
//
// panel2
// BackgroundColorPanel
//
this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel2.Cursor = System.Windows.Forms.Cursors.Hand;
this.panel2.Location = new System.Drawing.Point(136, 117);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(100, 21);
this.panel2.TabIndex = 8;
this.panel2.Click += new System.EventHandler(this.panel2_Click);
this.BackgroundColorPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.BackgroundColorPanel.Cursor = System.Windows.Forms.Cursors.Hand;
this.BackgroundColorPanel.Location = new System.Drawing.Point(136, 117);
this.BackgroundColorPanel.Name = "BackgroundColorPanel";
this.BackgroundColorPanel.Size = new System.Drawing.Size(100, 21);
this.BackgroundColorPanel.TabIndex = 8;
this.BackgroundColorPanel.Click += new System.EventHandler(this.BackgroundColorPanel_Click);
//
// panel1
// FontColorPanel
//
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel1.Cursor = System.Windows.Forms.Cursors.Hand;
this.panel1.Location = new System.Drawing.Point(136, 83);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(100, 21);
this.panel1.TabIndex = 7;
this.panel1.Click += new System.EventHandler(this.panel1_Click_1);
this.FontColorPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.FontColorPanel.Cursor = System.Windows.Forms.Cursors.Hand;
this.FontColorPanel.Location = new System.Drawing.Point(136, 83);
this.FontColorPanel.Name = "FontColorPanel";
this.FontColorPanel.Size = new System.Drawing.Size(100, 21);
this.FontColorPanel.TabIndex = 7;
this.FontColorPanel.Click += new System.EventHandler(this.FontColorPanel_Click_1);
//
// comboBox1
// FontNameComboBox
//
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Location = new System.Drawing.Point(136, 15);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(100, 21);
this.comboBox1.TabIndex = 5;
this.FontNameComboBox.FormattingEnabled = true;
this.FontNameComboBox.Location = new System.Drawing.Point(136, 15);
this.FontNameComboBox.Name = "FontNameComboBox";
this.FontNameComboBox.Size = new System.Drawing.Size(100, 21);
this.FontNameComboBox.TabIndex = 5;
//
// tabPage2
// EncryptionTabPage
//
this.tabPage2.Controls.Add(this.textBox2);
this.tabPage2.Controls.Add(this.comboBox4);
this.tabPage2.Controls.Add(this.label7);
this.tabPage2.Controls.Add(this.textBox1);
this.tabPage2.Controls.Add(this.comboBox3);
this.tabPage2.Controls.Add(this.label6);
this.tabPage2.Controls.Add(this.label5);
this.tabPage2.Controls.Add(this.label4);
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(252, 205);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Encryption";
this.tabPage2.UseVisualStyleBackColor = true;
this.EncryptionTabPage.Controls.Add(this.PwdIterationsTextBox);
this.EncryptionTabPage.Controls.Add(this.HashComboBox);
this.EncryptionTabPage.Controls.Add(this.PwdIterationsLabel);
this.EncryptionTabPage.Controls.Add(this.SaltTextBox);
this.EncryptionTabPage.Controls.Add(this.KeySizeComboBox);
this.EncryptionTabPage.Controls.Add(this.SaltLabel);
this.EncryptionTabPage.Controls.Add(this.KeySizeLabel);
this.EncryptionTabPage.Controls.Add(this.HashLabel);
this.EncryptionTabPage.Location = new System.Drawing.Point(4, 22);
this.EncryptionTabPage.Name = "EncryptionTabPage";
this.EncryptionTabPage.Padding = new System.Windows.Forms.Padding(3);
this.EncryptionTabPage.Size = new System.Drawing.Size(252, 205);
this.EncryptionTabPage.TabIndex = 1;
this.EncryptionTabPage.Text = "Encryption";
this.EncryptionTabPage.UseVisualStyleBackColor = true;
//
// textBox2
// PwdIterationsTextBox
//
this.textBox2.Location = new System.Drawing.Point(136, 83);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(100, 20);
this.textBox2.TabIndex = 7;
this.PwdIterationsTextBox.Location = new System.Drawing.Point(136, 83);
this.PwdIterationsTextBox.Name = "PwdIterationsTextBox";
this.PwdIterationsTextBox.Size = new System.Drawing.Size(100, 20);
this.PwdIterationsTextBox.TabIndex = 7;
//
// comboBox4
// HashComboBox
//
this.comboBox4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox4.FormattingEnabled = true;
this.comboBox4.Items.AddRange(new object[] {
this.HashComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.HashComboBox.FormattingEnabled = true;
this.HashComboBox.Items.AddRange(new object[] {
"MD5",
"SHA1",
"SHA256",
"SHA384",
"SHA512"});
this.comboBox4.Location = new System.Drawing.Point(136, 15);
this.comboBox4.Name = "comboBox4";
this.comboBox4.Size = new System.Drawing.Size(100, 21);
this.comboBox4.TabIndex = 5;
this.HashComboBox.Location = new System.Drawing.Point(136, 15);
this.HashComboBox.Name = "HashComboBox";
this.HashComboBox.Size = new System.Drawing.Size(100, 21);
this.HashComboBox.TabIndex = 5;
//
// label7
// PwdIterationsLabel
//
this.label7.AutoSize = true;
this.label7.BackColor = System.Drawing.Color.Transparent;
this.label7.Location = new System.Drawing.Point(7, 86);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(98, 13);
this.label7.TabIndex = 6;
this.label7.Text = "Password iterations";
this.PwdIterationsLabel.AutoSize = true;
this.PwdIterationsLabel.BackColor = System.Drawing.Color.Transparent;
this.PwdIterationsLabel.Location = new System.Drawing.Point(7, 86);
this.PwdIterationsLabel.Name = "PwdIterationsLabel";
this.PwdIterationsLabel.Size = new System.Drawing.Size(98, 13);
this.PwdIterationsLabel.TabIndex = 6;
this.PwdIterationsLabel.Text = "Password iterations";
//
// textBox1
// SaltTextBox
//
this.textBox1.Location = new System.Drawing.Point(136, 116);
this.textBox1.Margin = new System.Windows.Forms.Padding(10, 3, 3, 3);
this.textBox1.Name = "textBox1";
this.textBox1.ReadOnly = true;
this.textBox1.Size = new System.Drawing.Size(100, 20);
this.textBox1.TabIndex = 4;
this.textBox1.Visible = false;
this.SaltTextBox.Location = new System.Drawing.Point(136, 116);
this.SaltTextBox.Margin = new System.Windows.Forms.Padding(10, 3, 3, 3);
this.SaltTextBox.Name = "SaltTextBox";
this.SaltTextBox.ReadOnly = true;
this.SaltTextBox.Size = new System.Drawing.Size(100, 20);
this.SaltTextBox.TabIndex = 4;
this.SaltTextBox.Visible = false;
//
// comboBox3
// KeySizeComboBox
//
this.comboBox3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox3.FormattingEnabled = true;
this.comboBox3.Items.AddRange(new object[] {
this.KeySizeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.KeySizeComboBox.FormattingEnabled = true;
this.KeySizeComboBox.Items.AddRange(new object[] {
"128",
"192",
"256"});
this.comboBox3.Location = new System.Drawing.Point(136, 49);
this.comboBox3.Name = "comboBox3";
this.comboBox3.Size = new System.Drawing.Size(100, 21);
this.comboBox3.TabIndex = 3;
this.KeySizeComboBox.Location = new System.Drawing.Point(136, 49);
this.KeySizeComboBox.Name = "KeySizeComboBox";
this.KeySizeComboBox.Size = new System.Drawing.Size(100, 21);
this.KeySizeComboBox.TabIndex = 3;
//
// label6
// SaltLabel
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(7, 119);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(47, 13);
this.label6.TabIndex = 2;
this.label6.Text = "The Salt";
this.label6.Visible = false;
this.SaltLabel.AutoSize = true;
this.SaltLabel.Location = new System.Drawing.Point(7, 119);
this.SaltLabel.Name = "SaltLabel";
this.SaltLabel.Size = new System.Drawing.Size(47, 13);
this.SaltLabel.TabIndex = 2;
this.SaltLabel.Text = "The Salt";
this.SaltLabel.Visible = false;
//
// label5
// KeySizeLabel
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(7, 52);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(46, 13);
this.label5.TabIndex = 1;
this.label5.Text = "Key size";
this.KeySizeLabel.AutoSize = true;
this.KeySizeLabel.Location = new System.Drawing.Point(7, 52);
this.KeySizeLabel.Name = "KeySizeLabel";
this.KeySizeLabel.Size = new System.Drawing.Size(46, 13);
this.KeySizeLabel.TabIndex = 1;
this.KeySizeLabel.Text = "Key size";
//
// label4
// HashLabel
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(7, 18);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(80, 13);
this.label4.TabIndex = 0;
this.label4.Text = "Hash algorithm ";
this.HashLabel.AutoSize = true;
this.HashLabel.Location = new System.Drawing.Point(7, 18);
this.HashLabel.Name = "HashLabel";
this.HashLabel.Size = new System.Drawing.Size(80, 13);
this.HashLabel.TabIndex = 0;
this.HashLabel.Text = "Hash algorithm ";
//
// tabPage3
// ApplicationTabPage
//
this.tabPage3.Controls.Add(this.checkBox7);
this.tabPage3.Controls.Add(this.checkBox3);
this.tabPage3.Controls.Add(this.checkBox6);
this.tabPage3.Controls.Add(this.checkBox5);
this.tabPage3.Controls.Add(this.checkBox1);
this.tabPage3.Controls.Add(this.checkBox2);
this.tabPage3.Controls.Add(this.checkBox4);
this.tabPage3.Location = new System.Drawing.Point(4, 22);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Padding = new System.Windows.Forms.Padding(3);
this.tabPage3.Size = new System.Drawing.Size(252, 205);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "Application";
this.tabPage3.UseVisualStyleBackColor = true;
this.ApplicationTabPage.Controls.Add(this.IntegrateCheckBox);
this.ApplicationTabPage.Controls.Add(this.ToolbarCheckBox);
this.ApplicationTabPage.Controls.Add(this.SendToCheckBox);
this.ApplicationTabPage.Controls.Add(this.AutoSaveCheckBox);
this.ApplicationTabPage.Controls.Add(this.AssociateCheckBox);
this.ApplicationTabPage.Controls.Add(this.UpdatesCheckBox);
this.ApplicationTabPage.Controls.Add(this.AutoLockCheckBox);
this.ApplicationTabPage.Location = new System.Drawing.Point(4, 22);
this.ApplicationTabPage.Name = "ApplicationTabPage";
this.ApplicationTabPage.Padding = new System.Windows.Forms.Padding(3);
this.ApplicationTabPage.Size = new System.Drawing.Size(252, 205);
this.ApplicationTabPage.TabIndex = 2;
this.ApplicationTabPage.Text = "Application";
this.ApplicationTabPage.UseVisualStyleBackColor = true;
//
// checkBox3
// IntegrateCheckBox
//
this.checkBox3.AutoSize = true;
this.checkBox3.Location = new System.Drawing.Point(7, 156);
this.checkBox3.Name = "checkBox3";
this.checkBox3.Size = new System.Drawing.Size(88, 17);
this.checkBox3.TabIndex = 2;
this.checkBox3.Text = "Show toolbar";
this.checkBox3.UseVisualStyleBackColor = true;
this.IntegrateCheckBox.AutoSize = true;
this.IntegrateCheckBox.Location = new System.Drawing.Point(7, 18);
this.IntegrateCheckBox.Name = "IntegrateCheckBox";
this.IntegrateCheckBox.Size = new System.Drawing.Size(201, 17);
this.IntegrateCheckBox.TabIndex = 6;
this.IntegrateCheckBox.Text = "Integrate with windows context menu";
this.IntegrateCheckBox.UseVisualStyleBackColor = true;
//
// checkBox6
// ToolbarCheckBox
//
this.checkBox6.AutoSize = true;
this.checkBox6.Location = new System.Drawing.Point(7, 64);
this.checkBox6.Name = "checkBox6";
this.checkBox6.Size = new System.Drawing.Size(143, 17);
this.checkBox6.TabIndex = 5;
this.checkBox6.Text = "Show in \"Send to\" menu";
this.checkBox6.UseVisualStyleBackColor = true;
this.ToolbarCheckBox.AutoSize = true;
this.ToolbarCheckBox.Location = new System.Drawing.Point(7, 156);
this.ToolbarCheckBox.Name = "ToolbarCheckBox";
this.ToolbarCheckBox.Size = new System.Drawing.Size(88, 17);
this.ToolbarCheckBox.TabIndex = 2;
this.ToolbarCheckBox.Text = "Show toolbar";
this.ToolbarCheckBox.UseVisualStyleBackColor = true;
//
// checkBox5
// SendToCheckBox
//
this.checkBox5.AutoSize = true;
this.checkBox5.Location = new System.Drawing.Point(7, 133);
this.checkBox5.Name = "checkBox5";
this.checkBox5.Size = new System.Drawing.Size(112, 17);
this.checkBox5.TabIndex = 4;
this.checkBox5.Text = "Auto save on lock";
this.checkBox5.UseVisualStyleBackColor = true;
this.SendToCheckBox.AutoSize = true;
this.SendToCheckBox.Location = new System.Drawing.Point(7, 64);
this.SendToCheckBox.Name = "SendToCheckBox";
this.SendToCheckBox.Size = new System.Drawing.Size(143, 17);
this.SendToCheckBox.TabIndex = 5;
this.SendToCheckBox.Text = "Show in \"Send to\" menu";
this.SendToCheckBox.UseVisualStyleBackColor = true;
//
// checkBox1
// AutoSaveCheckBox
//
this.checkBox1.AutoSize = true;
this.checkBox1.Location = new System.Drawing.Point(7, 41);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(143, 17);
this.checkBox1.TabIndex = 0;
this.checkBox1.Text = "Associate with *.cnp files";
this.checkBox1.UseVisualStyleBackColor = true;
this.AutoSaveCheckBox.AutoSize = true;
this.AutoSaveCheckBox.Location = new System.Drawing.Point(7, 133);
this.AutoSaveCheckBox.Name = "AutoSaveCheckBox";
this.AutoSaveCheckBox.Size = new System.Drawing.Size(112, 17);
this.AutoSaveCheckBox.TabIndex = 4;
this.AutoSaveCheckBox.Text = "Auto save on lock";
this.AutoSaveCheckBox.UseVisualStyleBackColor = true;
//
// checkBox2
// AssociateCheckBox
//
this.checkBox2.AutoSize = true;
this.checkBox2.Location = new System.Drawing.Point(7, 110);
this.checkBox2.Name = "checkBox2";
this.checkBox2.Size = new System.Drawing.Size(122, 17);
this.checkBox2.TabIndex = 1;
this.checkBox2.Text = "Auto check updates";
this.checkBox2.UseVisualStyleBackColor = true;
this.AssociateCheckBox.AutoSize = true;
this.AssociateCheckBox.Location = new System.Drawing.Point(7, 41);
this.AssociateCheckBox.Name = "AssociateCheckBox";
this.AssociateCheckBox.Size = new System.Drawing.Size(143, 17);
this.AssociateCheckBox.TabIndex = 0;
this.AssociateCheckBox.Text = "Associate with *.cnp files";
this.AssociateCheckBox.UseVisualStyleBackColor = true;
//
// checkBox4
// UpdatesCheckBox
//
this.checkBox4.AutoSize = true;
this.checkBox4.Location = new System.Drawing.Point(7, 87);
this.checkBox4.Name = "checkBox4";
this.checkBox4.Size = new System.Drawing.Size(128, 17);
this.checkBox4.TabIndex = 3;
this.checkBox4.Text = "Auto lock on minimize";
this.checkBox4.UseVisualStyleBackColor = true;
this.UpdatesCheckBox.AutoSize = true;
this.UpdatesCheckBox.Location = new System.Drawing.Point(7, 110);
this.UpdatesCheckBox.Name = "UpdatesCheckBox";
this.UpdatesCheckBox.Size = new System.Drawing.Size(122, 17);
this.UpdatesCheckBox.TabIndex = 1;
this.UpdatesCheckBox.Text = "Auto check updates";
this.UpdatesCheckBox.UseVisualStyleBackColor = true;
//
// button1
// AutoLockCheckBox
//
this.button1.Location = new System.Drawing.Point(6, 239);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(98, 23);
this.button1.TabIndex = 5;
this.button1.Text = "Reset to Defaults";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
this.AutoLockCheckBox.AutoSize = true;
this.AutoLockCheckBox.Location = new System.Drawing.Point(7, 87);
this.AutoLockCheckBox.Name = "AutoLockCheckBox";
this.AutoLockCheckBox.Size = new System.Drawing.Size(128, 17);
this.AutoLockCheckBox.TabIndex = 3;
this.AutoLockCheckBox.Text = "Auto lock on minimize";
this.AutoLockCheckBox.UseVisualStyleBackColor = true;
//
// checkBox7
// ResetSettingsButton
//
this.checkBox7.AutoSize = true;
this.checkBox7.Location = new System.Drawing.Point(7, 18);
this.checkBox7.Name = "checkBox7";
this.checkBox7.Size = new System.Drawing.Size(201, 17);
this.checkBox7.TabIndex = 6;
this.checkBox7.Text = "Integrate with windows context menu";
this.checkBox7.UseVisualStyleBackColor = true;
this.ResetSettingsButton.Location = new System.Drawing.Point(6, 239);
this.ResetSettingsButton.Name = "ResetSettingsButton";
this.ResetSettingsButton.Size = new System.Drawing.Size(98, 23);
this.ResetSettingsButton.TabIndex = 5;
this.ResetSettingsButton.Text = "Reset to Defaults";
this.ResetSettingsButton.UseVisualStyleBackColor = true;
this.ResetSettingsButton.Click += new System.EventHandler(this.ResetSettingsButton_Click);
//
// SettingsForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(260, 270);
this.Controls.Add(this.button1);
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.saveSettingsButton);
this.Controls.Add(this.ResetSettingsButton);
this.Controls.Add(this.SettingsTabControl);
this.Controls.Add(this.SaveSettingsButton);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
@ -437,51 +437,51 @@ private void InitializeComponent()
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Settings";
this.Load += new System.EventHandler(this.SettingsForm_Load);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
this.tabPage2.ResumeLayout(false);
this.tabPage2.PerformLayout();
this.tabPage3.ResumeLayout(false);
this.tabPage3.PerformLayout();
this.SettingsTabControl.ResumeLayout(false);
this.EditorTabPage.ResumeLayout(false);
this.EditorTabPage.PerformLayout();
this.EncryptionTabPage.ResumeLayout(false);
this.EncryptionTabPage.PerformLayout();
this.ApplicationTabPage.ResumeLayout(false);
this.ApplicationTabPage.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label FontColorLabel;
private System.Windows.Forms.Button SaveSettingsButton;
private System.Windows.Forms.Label FontNameLabel;
private System.Windows.Forms.TabControl SettingsTabControl;
private System.Windows.Forms.TabPage EditorTabPage;
private System.Windows.Forms.TabPage EncryptionTabPage;
private System.Windows.Forms.TabPage ApplicationTabPage;
private System.Windows.Forms.CheckBox AssociateCheckBox;
private System.Windows.Forms.CheckBox UpdatesCheckBox;
private System.Windows.Forms.ComboBox FontNameComboBox;
private System.Windows.Forms.ComboBox FontSizeComboBox;
private System.Windows.Forms.Panel FontColorPanel;
private System.Windows.Forms.Panel BackgroundColorPanel;
private System.Windows.Forms.Label FontSizeLabel;
private System.Windows.Forms.Label BackgroundColorLabel;
private System.Windows.Forms.Button saveSettingsButton;
private System.Windows.Forms.Label fontLabel;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.CheckBox checkBox2;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.ComboBox comboBox2;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Panel HighlightsColorPanel;
private System.Windows.Forms.Label HighlightsColorLabel;
private System.Windows.Forms.ColorDialog colorDialog1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.ComboBox comboBox3;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.ComboBox comboBox4;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.CheckBox checkBox3;
private System.Windows.Forms.CheckBox checkBox4;
private System.Windows.Forms.TextBox SaltTextBox;
private System.Windows.Forms.ComboBox KeySizeComboBox;
private System.Windows.Forms.Label SaltLabel;
private System.Windows.Forms.Label KeySizeLabel;
private System.Windows.Forms.Label HashLabel;
private System.Windows.Forms.ComboBox HashComboBox;
private System.Windows.Forms.TextBox PwdIterationsTextBox;
private System.Windows.Forms.Label PwdIterationsLabel;
private System.Windows.Forms.Button ResetSettingsButton;
private System.Windows.Forms.CheckBox ToolbarCheckBox;
private System.Windows.Forms.CheckBox AutoLockCheckBox;
private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.CheckBox checkBox5;
private System.Windows.Forms.CheckBox checkBox6;
private System.Windows.Forms.CheckBox checkBox7;
private System.Windows.Forms.CheckBox AutoSaveCheckBox;
private System.Windows.Forms.CheckBox SendToCheckBox;
private System.Windows.Forms.CheckBox IntegrateCheckBox;
}
}

View file

@ -14,48 +14,12 @@ public SettingsForm()
InitializeComponent();
}
private void SettingsForm_Load(object sender, EventArgs e)
{
foreach (FontFamily fonts in FontFamily.Families)
{
comboBox1.Items.Add(fonts.Name);
}
comboBox1.Text = ps.RichTextFont;
comboBox2.Text = ps.RichTextSize.ToString();
comboBox4.Text = ps.HashAlgorithm;
comboBox3.Text = ps.KeySize.ToString();
textBox1.Text = ps.TheSalt;
textBox2.Text = ps.PasswordIterations.ToString();
panel1.BackColor = ps.RichForeColor;
panel2.BackColor = ps.RichBackColor;
panel3.BackColor = ps.HighlightsColor;
checkBox1.Checked = ps.AssociateCheck;
checkBox2.Checked = ps.AutoCheckUpdate;
checkBox3.Checked = ps.ShowToolbar;
checkBox4.Checked = ps.AutoLock;
checkBox5.Checked = ps.AutoSave;
checkBox6.Checked = ps.SendTo;
checkBox7.Checked = ps.MenuIntegrate;
if (ps.TheSalt != "")
{
textBox1.Visible = true;
label6.Visible = true;
}
}
private void saveSettingsButton_Click(object sender, EventArgs e)
{
SetSettings("Save");
}
/*Functions*/
private void SetSettings(string value)
{
if (value == "Save")
if (value == "save")
{
if (checkBox1.Checked)
if (AssociateCheckBox.Checked)
{
AssociateExtension(Assembly.GetEntryAssembly().Location, "cnp");
}
@ -64,7 +28,7 @@ private void SetSettings(string value)
DissociateExtension(Assembly.GetEntryAssembly().Location, "cnp");
}
if (checkBox7.Checked)
if (IntegrateCheckBox.Checked)
{
MenuIntegrate("enable");
}
@ -73,46 +37,46 @@ private void SetSettings(string value)
MenuIntegrate("disable");
}
ps.RichForeColor = panel1.BackColor;
ps.RichBackColor = panel2.BackColor;
ps.HighlightsColor = panel3.BackColor;
ps.RichTextFont = comboBox1.Text;
ps.RichTextSize = Convert.ToInt32(comboBox2.Text.ToString());
ps.AssociateCheck = checkBox1.Checked;
ps.HashAlgorithm = comboBox4.Text;
ps.KeySize = Convert.ToInt32(comboBox3.Text.ToString());
ps.TheSalt = textBox1.Text;
ps.PasswordIterations = Convert.ToInt32(textBox2.Text.ToString());
ps.ShowToolbar = checkBox3.Checked;
ps.AutoCheckUpdate = checkBox2.Checked;
ps.AutoLock = checkBox4.Checked;
ps.AutoSave = checkBox5.Checked;
ps.SendTo = checkBox6.Checked;
ps.MenuIntegrate = checkBox7.Checked;
ps.RichForeColor = FontColorPanel.BackColor;
ps.RichBackColor = BackgroundColorPanel.BackColor;
ps.HighlightsColor = HighlightsColorPanel.BackColor;
ps.RichTextFont = FontNameComboBox.Text;
ps.RichTextSize = Convert.ToInt32(FontSizeComboBox.Text.ToString());
ps.AssociateCheck = AssociateCheckBox.Checked;
ps.HashAlgorithm = HashComboBox.Text;
ps.KeySize = Convert.ToInt32(KeySizeComboBox.Text.ToString());
ps.TheSalt = SaltTextBox.Text;
ps.PasswordIterations = Convert.ToInt32(PwdIterationsTextBox.Text.ToString());
ps.ShowToolbar = ToolbarCheckBox.Checked;
ps.AutoCheckUpdate = UpdatesCheckBox.Checked;
ps.AutoLock = AutoLockCheckBox.Checked;
ps.AutoSave = AutoSaveCheckBox.Checked;
ps.SendTo = SendToCheckBox.Checked;
ps.MenuIntegrate = IntegrateCheckBox.Checked;
ps.Save();
PublicVar.settingsChanged = true;
this.Hide();
}
if (value == "Default")
if (value == "default")
{
panel1.BackColor = Color.FromArgb(228, 228, 228);
panel2.BackColor = Color.FromArgb(56, 56, 56);
panel3.BackColor = Color.FromArgb(101, 51, 6);
comboBox1.Text = "Consolas";
comboBox2.Text = 11.ToString();
checkBox1.Checked = false;
checkBox2.Checked = true;
checkBox3.Checked = true;
checkBox4.Checked = false;
checkBox5.Checked = true;
checkBox6.Checked = false;
checkBox7.Checked = false;
FontColorPanel.BackColor = Color.FromArgb(228, 228, 228);
BackgroundColorPanel.BackColor = Color.FromArgb(56, 56, 56);
HighlightsColorPanel.BackColor = Color.FromArgb(101, 51, 6);
FontNameComboBox.Text = "Consolas";
FontSizeComboBox.Text = 11.ToString();
AssociateCheckBox.Checked = false;
UpdatesCheckBox.Checked = true;
ToolbarCheckBox.Checked = true;
AutoLockCheckBox.Checked = false;
AutoSaveCheckBox.Checked = true;
SendToCheckBox.Checked = false;
IntegrateCheckBox.Checked = false;
}
}
public static void AssociateExtension(string applicationExecutablePath, string extension)
private static void AssociateExtension(string applicationExecutablePath, string extension)
{
try
{
@ -132,7 +96,7 @@ public static void AssociateExtension(string applicationExecutablePath, string e
}
}
public static void DissociateExtension(string applicationExecutablePath, string extension)
private static void DissociateExtension(string applicationExecutablePath, string extension)
{
try
{
@ -146,7 +110,7 @@ public static void DissociateExtension(string applicationExecutablePath, string
}
}
public static void MenuIntegrate(string action)
private static void MenuIntegrate(string action)
{
string appExePath = Assembly.GetEntryAssembly().Location;
try
@ -154,16 +118,12 @@ public static void MenuIntegrate(string action)
if (action == "enable")
{
RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\Classes\*\", true);
key = key.CreateSubKey("shell");
key.CreateSubKey("Crypto Notepad").SetValue("icon", appExePath);
key.CreateSubKey("Crypto Notepad").SetValue("SubCommands", "");
key.CreateSubKey(@"Crypto Notepad\shell");
key.CreateSubKey(@"Crypto Notepad\shell\cmd1\").SetValue("MUIVerb", "Encrypt");
key.CreateSubKey(@"Crypto Notepad\shell\cmd1\command").SetValue(string.Empty, "\"" + appExePath + "\" \"%1\" /er");
key.CreateSubKey(@"Crypto Notepad\shell\cmd2\").SetValue("MUIVerb", "Decrypt");
key.CreateSubKey(@"Crypto Notepad\shell\cmd2\command").SetValue(string.Empty, "\"" + appExePath + "\" \"%1\" /o");
@ -180,54 +140,95 @@ public static void MenuIntegrate(string action)
}
}
/*Functions*/
private void panel1_Click_1(object sender, EventArgs e)
/*Form Events*/
private void SettingsForm_Load(object sender, EventArgs e)
{
colorDialog1.Color = panel1.BackColor;
using (new CenterWinDialog(this))
foreach (FontFamily fonts in FontFamily.Families)
{
colorDialog1.ShowDialog();
FontNameComboBox.Items.Add(fonts.Name);
}
panel1.BackColor = colorDialog1.Color;
}
private void panel2_Click(object sender, EventArgs e)
{
colorDialog1.Color = panel2.BackColor;
using (new CenterWinDialog(this))
FontNameComboBox.Text = ps.RichTextFont;
FontSizeComboBox.Text = ps.RichTextSize.ToString();
HashComboBox.Text = ps.HashAlgorithm;
KeySizeComboBox.Text = ps.KeySize.ToString();
SaltTextBox.Text = ps.TheSalt;
PwdIterationsTextBox.Text = ps.PasswordIterations.ToString();
FontColorPanel.BackColor = ps.RichForeColor;
BackgroundColorPanel.BackColor = ps.RichBackColor;
HighlightsColorPanel.BackColor = ps.HighlightsColor;
AssociateCheckBox.Checked = ps.AssociateCheck;
UpdatesCheckBox.Checked = ps.AutoCheckUpdate;
ToolbarCheckBox.Checked = ps.ShowToolbar;
AutoLockCheckBox.Checked = ps.AutoLock;
AutoSaveCheckBox.Checked = ps.AutoSave;
SendToCheckBox.Checked = ps.SendTo;
IntegrateCheckBox.Checked = ps.MenuIntegrate;
if (ps.TheSalt != "")
{
colorDialog1.ShowDialog();
SaltTextBox.Visible = true;
SaltLabel.Visible = true;
}
panel2.BackColor = colorDialog1.Color;
}
/*Form Events*/
private void panel3_Click(object sender, EventArgs e)
{
colorDialog1.Color = panel3.BackColor;
using (new CenterWinDialog(this))
{
colorDialog1.ShowDialog();
}
panel3.BackColor = colorDialog1.Color;
}
private void button1_Click(object sender, EventArgs e)
/*Buttons*/
private void ResetSettingsButton_Click(object sender, EventArgs e)
{
using (new CenterWinDialog(this))
{
DialogResult result = MessageBox.Show("Reset to defaults?", "Settings", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
DialogResult result = MessageBox.Show("Reset app settings to default?", "Settings", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (result == DialogResult.Yes)
{
SetSettings("Default");
SetSettings("default");
}
}
}
private void closeLabel_Click(object sender, EventArgs e)
private void SaveSettingsButton_Click(object sender, EventArgs e)
{
ps.WarningMsg = false;
ps.Save();
SetSettings("save");
}
/*Buttons*/
/*Color Panels*/
private void FontColorPanel_Click_1(object sender, EventArgs e)
{
colorDialog1.Color = FontColorPanel.BackColor;
using (new CenterWinDialog(this))
{
colorDialog1.ShowDialog();
}
FontColorPanel.BackColor = colorDialog1.Color;
}
private void BackgroundColorPanel_Click(object sender, EventArgs e)
{
colorDialog1.Color = BackgroundColorPanel.BackColor;
using (new CenterWinDialog(this))
{
colorDialog1.ShowDialog();
}
BackgroundColorPanel.BackColor = colorDialog1.Color;
}
private void HighlightsColorPanel_Click(object sender, EventArgs e)
{
colorDialog1.Color = HighlightsColorPanel.BackColor;
using (new CenterWinDialog(this))
{
colorDialog1.ShowDialog();
}
HighlightsColorPanel.BackColor = colorDialog1.Color;
}
/*Color Panels*/
}
}