private void buttonOK_Click(object sender, EventArgs e) { textBoxPass.Text = textBoxPass.Text.TrimEnd(); textBoxPass.Text = textBoxPass.Text.TrimStart(); textBoxConf.Text = textBoxConf.Text.TrimEnd(); textBoxConf.Text = textBoxConf.Text.TrimStart(); textBoxLabel.Text = textBoxLabel.Text.TrimEnd(); textBoxLabel.Text = textBoxLabel.Text.TrimStart(); if (CheckFields() == false) { return; } char letter = (char)comboBoxLetters.SelectedItem; string label = textBoxLabel.Text; string root = textBoxFolder.Text; string password = textBoxPass.Text; SecureBox.BL.DriveInfo drive = new SecureBox.BL.DriveInfo(letter, label, root, true); secBox.AddDrive(drive, password); this.Close(); }
public PasswordChange(SecureBox.BL.SecureBox secBox, SecureBox.BL.DriveInfo drive) { InitializeComponent(); this.secBox = secBox; this.drive = drive; }