示例#1
0
        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();
        }
        public void KeysTab_Load()
        {
            instance = this;

            KeysList.AllowUserToAddRows            = false;
            KeysList.AdvancedCellBorderStyle.Left  = DataGridViewAdvancedCellBorderStyle.None;
            KeysList.AdvancedCellBorderStyle.Right = DataGridViewAdvancedCellBorderStyle.None;

            UpdateKeysList();
            ResizeTexts();
            KeyInfoDisplay.DisplayKeyInfo(false);
        }
示例#3
0
        private void RSAEncryptor_Load(object sender, EventArgs e)
        {
            LoadKeysData();

            WindowState         = FormWindowState.Maximized;
            defaultClientHeight = ClientSize.Height;

            //ResizeTexts(15, EncryptorLayout);
            EncryptorTabButton_Click(this, null);
            EncryptorTab.EncryptorTab_Load();
            KeysTab.KeysTab_Load();
            KeyEditTab.KeyEditTab_Load();
            OpenKeyEdit(false);
        }