private void KeysList_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            var grid = sender as DataGridView;

            if (grid.Columns[e.ColumnIndex] is DataGridViewButtonColumn && e.RowIndex >= 0)
            {
                if (e.ColumnIndex == 1)
                {
                    RSAEncryptor.OpenKeyEdit(true, RSAEncryptor.keys[e.RowIndex]);
                }
                else if (e.ColumnIndex == 2)
                {
                    RSAEncryptor.RemoveKey(e.RowIndex);
                    grid.Rows.RemoveAt(e.RowIndex);
                    KeysList.ClearSelection();
                    UpdateItemsSize();
                }
            }
        }
 private void EditButton_Click(object sender, EventArgs e)
 {
     RSAEncryptor.OpenKeyEdit(true, key);
 }
Example #3
0
        private void BackButton_Click(object sender, EventArgs e)
        {
            EditPanel.Controls.Remove(manualKeyEditor);

            RSAEncryptor.OpenKeyEdit(false);
        }