private void SaveButton_Click(object sender, EventArgs e) { if (KeyNameTextBox.Text != string.Empty) { key.KeyName = KeyNameTextBox.Text; } else { key.KeyName = RSAEncryptor.ValidateKeyName("Chave"); } key.encryptionMode = (Key.EncryptionMode)EncryptionModeDropdown.SelectedItem; if (key.encryptionMode == Key.EncryptionMode.Automatic) { SaveAutomaticKey(); } else { SaveManualKey(); } KeysTab.UpdateKeysList(); RSAEncryptor.UpdateKeysList(); }
private void AddKeyButton_Click(object sender, EventArgs e) { string newKeyName = RSAEncryptor.ValidateKeyName("Nova Chave"); var key = new Key(); key.SetName(newKeyName); RSAEncryptor.AddKey(key); AddKey(newKeyName); KeysList.CurrentCell = KeysList.Rows[KeysList.Rows.Count - 1].Cells[0]; UpdateItemsSize(); }