private void exportKeyButton_Click(object sender, EventArgs e) { ExportKey form = new ExportKey(this.keySettings.Key); DialogResult result = form.ShowDialog(); if (result == DialogResult.OK) { this.Close(); } }