@@ -1068,6 +1068,35 @@ private void OnWindowKeyDown(object sender, KeyEventArgs e)
1068
1068
1069
1069
}
1070
1070
1071
+ private void RemoveProjectFromList ( bool confirm = false )
1072
+ {
1073
+ var proj = GetSelectedProject ( ) ;
1074
+ if ( proj == null ) return ;
1075
+
1076
+ if ( confirm == true )
1077
+ {
1078
+ // streamer mode, show first char and last 3 chars, rest as *
1079
+ var cleantitle = proj . Title [ 0 ] + new string ( '*' , proj . Title . Length - 1 ) ;
1080
+ var title = chkStreamerMode . IsChecked == true ? cleantitle : proj . Title ;
1081
+ var result = MessageBox . Show ( "Are you sure you want to remove project from list?\n \n " + title , "Remove project" , MessageBoxButton . YesNo , MessageBoxImage . Question ) ;
1082
+ if ( result == MessageBoxResult . No ) return ;
1083
+ }
1084
+
1085
+ if ( GetProjects . RemoveRecentProject ( proj . Path ) )
1086
+ {
1087
+ RefreshRecentProjects ( ) ;
1088
+ }
1089
+ else
1090
+ {
1091
+ // we had added this project manually, without opening yet, just remove item
1092
+ projectsSource . Remove ( proj ) ;
1093
+ gridRecent . Items . Refresh ( ) ;
1094
+ Tools . SetFocusToGrid ( gridRecent ) ;
1095
+ gridRecent . SelectedIndex = 0 ;
1096
+ }
1097
+
1098
+ }
1099
+
1071
1100
private async void OnTabSelectionChanged ( object sender , SelectionChangedEventArgs e )
1072
1101
{
1073
1102
// if going into updates tab, fetch list (first time only)
@@ -1378,6 +1407,7 @@ private void GridRecent_PreviewKeyDown(object sender, KeyEventArgs e)
1378
1407
// // if edit mode, dont override keys
1379
1408
if ( IsEditingCell ( gridRecent ) == true ) return ;
1380
1409
e . Handled = true ;
1410
+ RemoveProjectFromList ( confirm : true ) ;
1381
1411
// MenuRemoveProject_Click(null, null);
1382
1412
break ;
1383
1413
default :
@@ -3020,22 +3050,7 @@ private void BtnThemeEditor_Click(object sender, RoutedEventArgs e)
3020
3050
3021
3051
private void MenuRemoveProject_Click ( object sender , RoutedEventArgs e )
3022
3052
{
3023
- // delete if enabled in settings
3024
- var proj = GetSelectedProject ( ) ;
3025
- if ( proj == null ) return ;
3026
-
3027
- if ( GetProjects . RemoveRecentProject ( proj . Path ) )
3028
- {
3029
- RefreshRecentProjects ( ) ;
3030
- }
3031
- else
3032
- {
3033
- // we had added this project manually, without opening yet, just remove item
3034
- projectsSource . Remove ( proj ) ;
3035
- gridRecent . Items . Refresh ( ) ;
3036
- Tools . SetFocusToGrid ( gridRecent ) ;
3037
- gridRecent . SelectedIndex = 0 ;
3038
- }
3053
+ RemoveProjectFromList ( ) ;
3039
3054
}
3040
3055
3041
3056
private void MenuItemDownloadAndroidModule_Click ( object sender , RoutedEventArgs e )
@@ -3394,7 +3409,7 @@ private void Window_MouseDown(object sender, MouseButtonEventArgs e)
3394
3409
3395
3410
public void SetStatus ( string msg , MessageType messageType = MessageType . Info )
3396
3411
{
3397
- Console . WriteLine ( messageType ) ;
3412
+ // Console.WriteLine(messageType);
3398
3413
switch ( messageType )
3399
3414
{
3400
3415
case MessageType . Info :
@@ -3772,7 +3787,7 @@ private void OnPipeConnection(IAsyncResult result)
3772
3787
private void CheckCustomIcon ( )
3773
3788
{
3774
3789
string customIconPath = Path . Combine ( Environment . CurrentDirectory , "icon.ico" ) ;
3775
- Console . WriteLine ( customIconPath ) ;
3790
+ // Console.WriteLine(customIconPath);
3776
3791
3777
3792
if ( File . Exists ( customIconPath ) )
3778
3793
{
0 commit comments