@@ -298,15 +298,7 @@ private async void btnProgramSourceStatus_OnClick(object sender, RoutedEventArgs
298
298
299
299
if ( selectedItems . Count == 0 )
300
300
{
301
- var msg = context . API . GetTranslation ( "flowlauncher_plugin_program_pls_select_program_source" ) ;
302
- context . API . ShowMsgBox ( msg ) ;
303
- return ;
304
- }
305
-
306
- if ( IsAllItemsUserAdded ( selectedItems ) )
307
- {
308
- var msg1 = context . API . GetTranslation ( "flowlauncher_plugin_program_delete_program_source_select_not_user_added" ) ;
309
- context . API . ShowMsgBox ( msg1 ) ;
301
+ context . API . ShowMsgBox ( context . API . GetTranslation ( "flowlauncher_plugin_program_pls_select_program_source" ) ) ;
310
302
return ;
311
303
}
312
304
@@ -376,7 +368,7 @@ private void Sort(string sortBy, ListSortDirection direction)
376
368
var dataView = CollectionViewSource . GetDefaultView ( programSourceView . ItemsSource ) ;
377
369
378
370
dataView . SortDescriptions . Clear ( ) ;
379
- SortDescription sd = new SortDescription ( sortBy , direction ) ;
371
+ var sd = new SortDescription ( sortBy , direction ) ;
380
372
dataView . SortDescriptions . Add ( sd ) ;
381
373
dataView . Refresh ( ) ;
382
374
}
@@ -421,20 +413,18 @@ private async void btnDeleteProgramSource_OnClick(object sender, RoutedEventArgs
421
413
422
414
if ( selectedItems . Count == 0 )
423
415
{
424
- var msg = context . API . GetTranslation ( "flowlauncher_plugin_program_pls_select_program_source" ) ;
425
- context . API . ShowMsgBox ( msg ) ;
416
+ context . API . ShowMsgBox ( context . API . GetTranslation ( "flowlauncher_plugin_program_pls_select_program_source" ) ) ;
426
417
return ;
427
418
}
428
419
429
420
if ( ! IsAllItemsUserAdded ( selectedItems ) )
430
421
{
431
- var msg1 = context . API . GetTranslation ( "flowlauncher_plugin_program_delete_program_source_select_user_added" ) ;
432
- context . API . ShowMsgBox ( msg1 ) ;
422
+ context . API . ShowMsgBox ( context . API . GetTranslation ( "flowlauncher_plugin_program_delete_program_source_select_user_added" ) ) ;
433
423
return ;
434
424
}
435
425
436
- var msg2 = context . API . GetTranslation ( "flowlauncher_plugin_program_delete_program_source" ) ;
437
- if ( context . API . ShowMsgBox ( msg2 , string . Empty , MessageBoxButton . YesNo ) == MessageBoxResult . No )
426
+ if ( context . API . ShowMsgBox ( context . API . GetTranslation ( "flowlauncher_plugin_program_delete_program_source" ) ,
427
+ string . Empty , MessageBoxButton . YesNo ) == MessageBoxResult . No )
438
428
{
439
429
return ;
440
430
}
0 commit comments