BUG-1653: Accessibility improvements, adding accept/cancel buttons to some of the forms. This way one can e.g. ESC out of a form.

This commit is contained in:
RKrom 2014-07-18 13:56:55 +02:00
parent 5cd6afad74
commit 036aec55f5
25 changed files with 119 additions and 180 deletions

View file

@ -35,6 +35,8 @@ namespace GreenshotOCR {
//
this.config = config;
InitializeComponent();
AcceptButton = buttonOK;
CancelButton = buttonCancel;
this.Icon = GreenshotResources.getGreenshotIcon();
comboBox_languages.Items.Clear();
@ -54,18 +56,12 @@ namespace GreenshotOCR {
index++;
}
}
void ButtonCancelClick(object sender, EventArgs e) {
DialogResult = DialogResult.Cancel;
}
void ButtonOKClick(object sender, EventArgs e) {
string selectedString = (string) comboBox_languages.SelectedItem;
if (selectedString != null) {
config.Language = selectedString.ToUpper();
}
DialogResult = DialogResult.OK;
}
}
}