Skip to content

Commit e4ac354

Browse files
committed
Add ability to cancel/close file import dialog with Esc key
1 parent faca5e5 commit e4ac354

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ff-utils-winforms/Forms/FileImportForm.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,16 @@ private void Done ()
7373
Close();
7474
Program.mainForm.BringToFront();
7575
}
76+
77+
protected override bool ProcessDialogKey(Keys keyData)
78+
{
79+
if (ModifierKeys == Keys.None && keyData == Keys.Escape)
80+
{
81+
Close();
82+
return true;
83+
}
84+
85+
return base.ProcessDialogKey(keyData);
86+
}
7687
}
7788
}

0 commit comments

Comments
 (0)