We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ebb74da commit e6eb8c0Copy full SHA for e6eb8c0
1 file changed
Flow.Launcher/MessageBoxEx.xaml.cs
@@ -159,19 +159,12 @@ private async Task SetImageAsync(string imageName)
159
160
private void KeyEsc_OnPress(object sender, ExecutedRoutedEventArgs e)
161
{
162
- switch (_button)
163
- {
164
- case MessageBoxButton.OK:
165
- _result = MessageBoxResult.None;
166
- break;
167
- case MessageBoxButton.OKCancel:
168
- case MessageBoxButton.YesNoCancel:
169
- _result = MessageBoxResult.Cancel;
170
171
- case MessageBoxButton.YesNo:
172
- _result = MessageBoxResult.No;
173
174
- }
+ if (_button == MessageBoxButton.YesNo)
+ return;
+ else if (_button == MessageBoxButton.OK)
+ _result = MessageBoxResult.OK;
+ else
+ _result = MessageBoxResult.Cancel;
175
DialogResult = false;
176
Close();
177
}
0 commit comments