@@ -476,7 +476,7 @@ private void BtnAddProjectFolder_Click(object sender, RoutedEventArgs e)
476476 p . Title = Path . GetFileName ( folder ) ;
477477 p . Version = Tools . GetProjectVersion ( folder ) ;
478478 p . Arguments = Tools . ReadCustomLaunchArguments ( folder , MainWindow . launcherArgumentsFile ) ;
479- if ( ( bool ) chkShowPlatform . IsChecked == true ) p . TargetPlatform = Tools . ParseTargetPlatform ( folder ) ;
479+ if ( ( bool ) chkShowPlatform . IsChecked == true ) p . TargetPlatform = Tools . GetTargetPlatform ( folder ) ;
480480 if ( ( bool ) chkShowGitBranchColumn . IsChecked == true ) p . GITBranch = Tools . ReadGitBranchInfo ( folder ) ;
481481
482482 // add to list
@@ -1112,7 +1112,7 @@ private void BtnOpenGithub_Click(object sender, RoutedEventArgs e)
11121112 Process . Start ( githubURL ) ;
11131113 }
11141114
1115- // finished editing project name cell or launcher argument cell
1115+ // finished editing project name cell or launcher argument cell or platform cells
11161116 private void GridRecent_CellEditEnding ( object sender , DataGridCellEditEndingEventArgs e )
11171117 {
11181118 // avoid ending event running twice
@@ -1124,16 +1124,22 @@ private void GridRecent_CellEditEnding(object sender, DataGridCellEditEndingEven
11241124
11251125 // check that folder exists
11261126 string path = proj . Path ;
1127- if ( string . IsNullOrEmpty ( path ) ) return ;
1128-
1129- // get current arguments, after editing
1130- TextBox t = e . EditingElement as TextBox ;
1131- string newcellValue = t . Text . ToString ( ) ;
1127+ Console . WriteLine ( e . Column . DisplayIndex ) ;
1128+ Console . WriteLine ( path ) ;
1129+ Console . WriteLine ( string . IsNullOrEmpty ( path ) ) ;
1130+ if ( string . IsNullOrEmpty ( path ) )
1131+ {
11321132
1133+ //return;
1134+ }
11331135
11341136 // check if we edited project name, or launcher arguments
11351137 if ( e . Column . DisplayIndex == 0 )
11361138 {
1139+ // get current arguments, after editing
1140+ TextBox t = e . EditingElement as TextBox ;
1141+ string newcellValue = t . Text . ToString ( ) ;
1142+
11371143 // restore read only
11381144 e . Column . IsReadOnly = true ;
11391145
@@ -1191,8 +1197,11 @@ private void GridRecent_CellEditEnding(object sender, DataGridCellEditEndingEven
11911197 }
11921198
11931199 }
1194- else // edit launcher arguments
1200+ else if ( e . Column . DisplayIndex == 4 ) // edit launcher arguments
11951201 {
1202+ // get current arguments, after editing
1203+ TextBox t = e . EditingElement as TextBox ;
1204+ string newcellValue = t . Text . ToString ( ) ;
11961205
11971206 string projSettingsFolder = "ProjectSettings" ;
11981207
@@ -1217,6 +1226,14 @@ private void GridRecent_CellEditEnding(object sender, DataGridCellEditEndingEven
12171226 Console . WriteLine ( "Error saving launcher arguments: " + ex ) ;
12181227 }
12191228 }
1229+ else if ( e . Column . DisplayIndex == 6 ) // platform dropdown
1230+ {
1231+ // get current arguments, after editing
1232+ var t = e . EditingElement as ComboBox ;
1233+ string newcellValue = t . SelectedItem . ToString ( ) ;
1234+
1235+ Console . WriteLine ( "Modified platform target: " + newcellValue ) ;
1236+ }
12201237
12211238 // TODO select the same row again
12221239 }
@@ -1233,12 +1250,12 @@ private void TxtSearchBoxUnity_TextChanged(object sender, TextChangedEventArgs e
12331250
12341251 private void GridRecent_PreviewMouseDoubleClick ( object sender , MouseButtonEventArgs e )
12351252 {
1236- // cancel if editing cell, because often try to double click to edit
1253+ // cancel if editing cell, because often try to double click to edit instead
12371254 if ( IsEditingCell ( gridRecent ) ) return ;
12381255
1239- // cancel run if double click arguments editable field
1256+ // cancel run if double clicked Arguments or Platform editable field
12401257 var currentColumnCell = gridRecent . CurrentCell . Column . DisplayIndex ;
1241- if ( currentColumnCell == 4 ) return ;
1258+ if ( currentColumnCell == 4 || currentColumnCell == 6 ) return ;
12421259
12431260 var proj = GetSelectedProject ( ) ;
12441261 var proc = Tools . LaunchProject ( proj ) ;
0 commit comments