@@ -298,15 +298,7 @@ private async void btnProgramSourceStatus_OnClick(object sender, RoutedEventArgs
298298
299299 if ( selectedItems . Count == 0 )
300300 {
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" ) ) ;
310302 return ;
311303 }
312304
@@ -376,7 +368,7 @@ private void Sort(string sortBy, ListSortDirection direction)
376368 var dataView = CollectionViewSource . GetDefaultView ( programSourceView . ItemsSource ) ;
377369
378370 dataView . SortDescriptions . Clear ( ) ;
379- SortDescription sd = new SortDescription ( sortBy , direction ) ;
371+ var sd = new SortDescription ( sortBy , direction ) ;
380372 dataView . SortDescriptions . Add ( sd ) ;
381373 dataView . Refresh ( ) ;
382374 }
@@ -421,20 +413,18 @@ private async void btnDeleteProgramSource_OnClick(object sender, RoutedEventArgs
421413
422414 if ( selectedItems . Count == 0 )
423415 {
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" ) ) ;
426417 return ;
427418 }
428419
429420 if ( ! IsAllItemsUserAdded ( selectedItems ) )
430421 {
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" ) ) ;
433423 return ;
434424 }
435425
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 )
438428 {
439429 return ;
440430 }
0 commit comments