@@ -206,7 +206,7 @@ private List<Result> Commands(Query query)
206206 IcoPath = "Images\\ shutdown.png" ,
207207 Action = c =>
208208 {
209- MessageBoxResult result = _settings . SkipPowerActionConfirmation
209+ var result = _settings . SkipPowerActionConfirmation
210210 ? MessageBoxResult . Yes
211211 : Context . API . ShowMsgBox (
212212 Localize . flowlauncher_plugin_sys_dlgtext_shutdown_computer ( ) ,
@@ -231,7 +231,7 @@ private List<Result> Commands(Query query)
231231 IcoPath = "Images\\ restart.png" ,
232232 Action = c =>
233233 {
234- MessageBoxResult result = _settings . SkipPowerActionConfirmation
234+ var result = _settings . SkipPowerActionConfirmation
235235 ? MessageBoxResult . Yes
236236 : Context . API . ShowMsgBox (
237237 Localize . flowlauncher_plugin_sys_dlgtext_restart_computer ( ) ,
@@ -283,16 +283,16 @@ private List<Result> Commands(Query query)
283283 IcoPath = "Images\\ logoff.png" ,
284284 Action = c =>
285285 {
286- MessageBoxResult result = _settings . SkipPowerActionConfirmation
287- ? MessageBoxResult . Yes
288- : Context . API . ShowMsgBox (
289- Localize . flowlauncher_plugin_sys_dlgtext_logoff_computer ( ) ,
290- Localize . flowlauncher_plugin_sys_log_off ( ) ,
291- MessageBoxButton . YesNo , MessageBoxImage . Warning ) ;
292-
293- if ( result == MessageBoxResult . Yes )
294- PInvoke . ExitWindowsEx ( EXIT_WINDOWS_FLAGS . EWX_LOGOFF , REASON ) ;
295- return true ;
286+ var result = _settings . SkipPowerActionConfirmation
287+ ? MessageBoxResult . Yes
288+ : Context . API . ShowMsgBox (
289+ Localize . flowlauncher_plugin_sys_dlgtext_logoff_computer ( ) ,
290+ Localize . flowlauncher_plugin_sys_log_off ( ) ,
291+ MessageBoxButton . YesNo , MessageBoxImage . Warning ) ;
292+
293+ if ( result == MessageBoxResult . Yes )
294+ PInvoke . ExitWindowsEx ( EXIT_WINDOWS_FLAGS . EWX_LOGOFF , REASON ) ;
295+ return true ;
296296 }
297297 } ,
298298 new Result
0 commit comments