@@ -120,10 +120,9 @@ private List<Result> Commands()
120
120
context . API . GetTranslation ( "flowlauncher_plugin_sys_dlgtext_shutdown_computer" ) ,
121
121
context . API . GetTranslation ( "flowlauncher_plugin_sys_shutdown_computer" ) ,
122
122
MessageBoxButton . YesNo , MessageBoxImage . Warning ) ;
123
+
123
124
if ( result == MessageBoxResult . Yes )
124
- {
125
125
Process . Start ( "shutdown" , "/s /t 0" ) ;
126
- }
127
126
128
127
return true ;
129
128
}
@@ -140,10 +139,9 @@ private List<Result> Commands()
140
139
context . API . GetTranslation ( "flowlauncher_plugin_sys_dlgtext_restart_computer" ) ,
141
140
context . API . GetTranslation ( "flowlauncher_plugin_sys_restart_computer" ) ,
142
141
MessageBoxButton . YesNo , MessageBoxImage . Warning ) ;
142
+
143
143
if ( result == MessageBoxResult . Yes )
144
- {
145
144
Process . Start ( "shutdown" , "/r /t 0" ) ;
146
- }
147
145
148
146
return true ;
149
147
}
@@ -204,7 +202,11 @@ private List<Result> Commands()
204
202
SubTitle = context . API . GetTranslation ( "flowlauncher_plugin_sys_sleep" ) ,
205
203
Glyph = new GlyphInfo ( FontFamily : "/Resources/#Segoe Fluent Icons" , Glyph : "\xec46 " ) ,
206
204
IcoPath = "Images\\ sleep.png" ,
207
- Action = c => PInvoke . SetSuspendState ( false , false , false )
205
+ Action = c =>
206
+ {
207
+ PInvoke . SetSuspendState ( false , false , false ) ;
208
+ return true ;
209
+ }
208
210
} ,
209
211
new Result
210
212
{
@@ -231,10 +233,7 @@ private List<Result> Commands()
231
233
Glyph = new GlyphInfo ( FontFamily : "/Resources/#Segoe Fluent Icons" , Glyph : "\xe773 " ) ,
232
234
Action = c =>
233
235
{
234
- {
235
- System . Diagnostics . Process . Start ( "control.exe" , "srchadmin.dll" ) ;
236
- }
237
-
236
+ Process . Start ( "control.exe" , "srchadmin.dll" ) ;
238
237
return true ;
239
238
}
240
239
} ,
@@ -272,10 +271,7 @@ private List<Result> Commands()
272
271
CopyText = recycleBinFolder ,
273
272
Action = c =>
274
273
{
275
- {
276
- System . Diagnostics . Process . Start ( "explorer" , recycleBinFolder ) ;
277
- }
278
-
274
+ Process . Start ( "explorer" , recycleBinFolder ) ;
279
275
return true ;
280
276
}
281
277
} ,
0 commit comments