@@ -43,22 +43,22 @@ private void ConfirmTextBox_TextChanged(object sender, EventArgs e)
4343 else
4444 ErrorLabel . Text = "Passwords match!" ;
4545
46- this . progressBar1 . Value = PasswordStrength . Strength ( this . masterPasswordTextbox . Text ) ;
47- if ( this . progressBar1 . Value <= 10 )
46+ this . strengthProgress . Value = PasswordStrength . Strength ( this . masterPasswordTextbox . Text ) ;
47+ if ( this . strengthProgress . Value <= 10 )
4848 {
49- this . progressBar1 . ForeColor = Color . Red ;
49+ this . strengthProgress . ForeColor = Color . Red ;
5050 }
51- else if ( this . progressBar1 . Value <= 50 )
51+ else if ( this . strengthProgress . Value <= 50 )
5252 {
53- this . progressBar1 . ForeColor = Color . Yellow ;
53+ this . strengthProgress . ForeColor = Color . Yellow ;
5454 }
55- else if ( this . progressBar1 . Value <= 75 )
55+ else if ( this . strengthProgress . Value <= 75 )
5656 {
57- this . progressBar1 . ForeColor = Color . Green ;
57+ this . strengthProgress . ForeColor = Color . Green ;
5858 }
59- else if ( this . progressBar1 . Value <= 100 )
59+ else if ( this . strengthProgress . Value <= 100 )
6060 {
61- this . progressBar1 . ForeColor = Color . Blue ;
61+ this . strengthProgress . ForeColor = Color . Blue ;
6262 }
6363
6464 }
@@ -67,6 +67,15 @@ private void EnableMasterPassword_CheckedChanged(object sender, EventArgs e)
6767 {
6868 panel1 . Enabled = EnableMasterPassword . Checked ;
6969 this . HidePassword ( ) ;
70+ this . SwitchMasterKeyWarning ( ) ;
71+ }
72+
73+ private void SwitchMasterKeyWarning ( )
74+ {
75+ this . warnLabel . Visible = ! this . EnableMasterPassword . Checked ;
76+ this . warnPicture . Visible = ! this . EnableMasterPassword . Checked ;
77+ this . strengthProgress . Visible = this . EnableMasterPassword . Checked ;
78+ this . stregthLabel . Visible = this . EnableMasterPassword . Checked ;
7079 }
7180
7281 public void AssignPersistence ( IPersistence persistence )
@@ -81,7 +90,6 @@ public void AssignPersistence(IPersistence persistence)
8190
8291 private void RevealOrHidePwd ( object sender , EventArgs e )
8392 {
84-
8593 if ( this . revealPwdButton . ImageIndex == 1 )
8694 {
8795 this . HidePassword ( ) ;
0 commit comments