void OnGeneratePassword(object sender, EventArgs e) { int length = Convert.ToInt32(m_LengthTextBox.Text); int nonAlphanumeric = Convert.ToInt32(m_NonAlphanumericTextBox.Text); using (PasswordManagerProxy passwordManager = new PasswordManagerProxy(ServiceAddress)) { string password = passwordManager.GeneratePassword(ServiceAddress, length, nonAlphanumeric); Clipboard.SetText(password); MessageBox.Show("Generated password: "******" " + Environment.NewLine + "The password is avaiable on the clipboard as well.", "Credentials Manager", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
void OnCheckedChanged(object sender, EventArgs e) { if (m_GeneratePasswordCheckBox.Checked) { using (PasswordManagerProxy passwordManager = new PasswordManagerProxy(m_Url)) { int length = passwordManager.GetMinRequiredPasswordLength(m_Application); int nonAlphaNumeric = passwordManager.GetMinRequiredNonAlphanumericCharacters(m_Application); string password = passwordManager.GeneratePassword(m_Application, length, nonAlphaNumeric); m_PasswordTextbox.Text = password; m_ConfirmedPasswordTextBox.Text = password; m_PasswordTextbox.PasswordChar = '\0'; m_ConfirmedPasswordTextBox.PasswordChar = '\0'; } } else { m_PasswordTextbox.PasswordChar = '*'; m_ConfirmedPasswordTextBox.PasswordChar = '*'; } }
void OnCheckedChanged(object sender,EventArgs e) { if(m_GeneratePasswordCheckBox.Checked) { using(PasswordManagerProxy passwordManager = new PasswordManagerProxy(m_Url)) { int length = passwordManager.GetMinRequiredPasswordLength(m_Application); int nonAlphaNumeric = passwordManager.GetMinRequiredNonAlphanumericCharacters(m_Application); string password = passwordManager.GeneratePassword(m_Application,length,nonAlphaNumeric); m_PasswordTextbox.Text = password; m_ConfirmedPasswordTextBox.Text = password; m_PasswordTextbox.PasswordChar = '\0'; m_ConfirmedPasswordTextBox.PasswordChar = '\0'; } } else { m_PasswordTextbox.PasswordChar = '*'; m_ConfirmedPasswordTextBox.PasswordChar = '*'; } }
void OnGeneratePassword(object sender,EventArgs e) { int length = Convert.ToInt32(m_LengthTextBox.Text); int nonAlphanumeric = Convert.ToInt32(m_NonAlphanumericTextBox.Text); using(PasswordManagerProxy passwordManager = new PasswordManagerProxy(ServiceAddress)) { string password = passwordManager.GeneratePassword(ServiceAddress,length,nonAlphanumeric); Clipboard.SetText(password); MessageBox.Show("Generated password: "******" " + Environment.NewLine + "The password is avaiable on the clipboard as well.","Credentials Manager",MessageBoxButtons.OK,MessageBoxIcon.Information); } }