From 7832706d0a0d5a2f20502c1d4b23c03adb1c4fca Mon Sep 17 00:00:00 2001 From: Sigmanor Date: Mon, 11 Jan 2016 19:20:28 +0200 Subject: [PATCH] Added toolbar settings --- Crypto Notepad/SettingsForm.Designer.cs | 15 ++++++++++++++- Crypto Notepad/SettingsForm.cs | 5 ++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Crypto Notepad/SettingsForm.Designer.cs b/Crypto Notepad/SettingsForm.Designer.cs index 3b380a5..e4d64c2 100644 --- a/Crypto Notepad/SettingsForm.Designer.cs +++ b/Crypto Notepad/SettingsForm.Designer.cs @@ -55,6 +55,7 @@ private void InitializeComponent() this.checkBox2 = new System.Windows.Forms.CheckBox(); this.checkBox1 = new System.Windows.Forms.CheckBox(); this.button1 = new System.Windows.Forms.Button(); + this.checkBox3 = new System.Windows.Forms.CheckBox(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.tabPage2.SuspendLayout(); @@ -312,6 +313,7 @@ private void InitializeComponent() // // tabPage3 // + this.tabPage3.Controls.Add(this.checkBox3); this.tabPage3.Controls.Add(this.checkBox2); this.tabPage3.Controls.Add(this.checkBox1); this.tabPage3.Location = new System.Drawing.Point(4, 22); @@ -326,7 +328,7 @@ private void InitializeComponent() // this.checkBox2.AutoSize = true; this.checkBox2.Enabled = false; - this.checkBox2.Location = new System.Drawing.Point(7, 47); + this.checkBox2.Location = new System.Drawing.Point(6, 64); this.checkBox2.Name = "checkBox2"; this.checkBox2.Size = new System.Drawing.Size(117, 17); this.checkBox2.TabIndex = 1; @@ -353,6 +355,16 @@ private void InitializeComponent() this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); // + // checkBox3 + // + this.checkBox3.AutoSize = true; + this.checkBox3.Location = new System.Drawing.Point(7, 41); + this.checkBox3.Name = "checkBox3"; + this.checkBox3.Size = new System.Drawing.Size(92, 17); + this.checkBox3.TabIndex = 2; + this.checkBox3.Text = "Show Toolbar"; + this.checkBox3.UseVisualStyleBackColor = true; + // // SettingsForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -409,5 +421,6 @@ private void InitializeComponent() private System.Windows.Forms.TextBox textBox2; private System.Windows.Forms.Label label7; private System.Windows.Forms.Button button1; + private System.Windows.Forms.CheckBox checkBox3; } } \ No newline at end of file diff --git a/Crypto Notepad/SettingsForm.cs b/Crypto Notepad/SettingsForm.cs index cdcf1a3..bdf25a2 100644 --- a/Crypto Notepad/SettingsForm.cs +++ b/Crypto Notepad/SettingsForm.cs @@ -32,7 +32,7 @@ private void SettingsForm_Load(object sender, EventArgs e) textBox1.Text = ps.TheSalt; textBox2.Text = ps.PasswordIterations.ToString(); checkBox1.Checked = ps.AssociateCheck; - + checkBox3.Checked = ps.ShowToolbar; panel1.BackColor = ps.RichForeColor; panel2.BackColor = ps.RichBackColor; panel3.BackColor = ps.HighlightsColor; @@ -155,6 +155,7 @@ private void SetSettings(string value) ps.KeySize = Convert.ToInt32(comboBox3.Text.ToString()); ps.TheSalt = textBox1.Text; ps.PasswordIterations = Convert.ToInt32(textBox2.Text.ToString()); + ps.ShowToolbar = checkBox3.Checked; ps.Save(); MainWindow.settingsChanged = true; @@ -174,6 +175,8 @@ private void SetSettings(string value) comboBox4.Text = "SHA1"; comboBox3.Text = 192.ToString(); textBox2.Text = 2.ToString(); + checkBox3.Checked = true; + ps.ShowToolbar = true; } } }