Added auto-lock settings

This commit is contained in:
Sigmanor 2016-01-20 21:21:40 +02:00
parent bccf840007
commit 9214b6f7c6
2 changed files with 20 additions and 4 deletions

View file

@ -57,6 +57,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.checkBox4 = new System.Windows.Forms.CheckBox();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
@ -314,6 +315,7 @@ private void InitializeComponent()
//
// tabPage3
//
this.tabPage3.Controls.Add(this.checkBox4);
this.tabPage3.Controls.Add(this.checkBox3);
this.tabPage3.Controls.Add(this.checkBox2);
this.tabPage3.Controls.Add(this.checkBox1);
@ -328,7 +330,7 @@ private void InitializeComponent()
// checkBox3
//
this.checkBox3.AutoSize = true;
this.checkBox3.Location = new System.Drawing.Point(7, 41);
this.checkBox3.Location = new System.Drawing.Point(7, 45);
this.checkBox3.Name = "checkBox3";
this.checkBox3.Size = new System.Drawing.Size(88, 17);
this.checkBox3.TabIndex = 2;
@ -338,7 +340,7 @@ private void InitializeComponent()
// checkBox2
//
this.checkBox2.AutoSize = true;
this.checkBox2.Location = new System.Drawing.Point(7, 64);
this.checkBox2.Location = new System.Drawing.Point(7, 72);
this.checkBox2.Name = "checkBox2";
this.checkBox2.Size = new System.Drawing.Size(119, 17);
this.checkBox2.TabIndex = 1;
@ -365,6 +367,16 @@ private void InitializeComponent()
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// checkBox4
//
this.checkBox4.AutoSize = true;
this.checkBox4.Location = new System.Drawing.Point(7, 99);
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;
//
// SettingsForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -423,5 +435,6 @@ private void InitializeComponent()
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.CheckBox checkBox3;
private System.Windows.Forms.CheckBox checkBox4;
}
}

View file

@ -28,12 +28,13 @@ private void SettingsForm_Load(object sender, EventArgs e)
comboBox3.Text = ps.KeySize.ToString();
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;
checkBox1.Checked = ps.AssociateCheck;
checkBox2.Checked = ps.AutoCheckUpdate;
checkBox3.Checked = ps.ShowToolbar;
checkBox4.Checked = ps.AutoLock;
}
private void saveSettingsButton_Click(object sender, EventArgs e)
@ -67,6 +68,7 @@ private void SetSettings(string value)
ps.PasswordIterations = Convert.ToInt32(textBox2.Text.ToString());
ps.ShowToolbar = checkBox3.Checked;
ps.AutoCheckUpdate = checkBox2.Checked;
ps.AutoLock = checkBox4.Checked;
ps.Save();
MainWindow.settingsChanged = true;
@ -84,6 +86,7 @@ private void SetSettings(string value)
checkBox1.Checked = false;
checkBox2.Checked = true;
checkBox3.Checked = true;
checkBox4.Checked = false;
}
}