@@ -148,7 +148,7 @@ void Start()
148
148
//Properties.Settings.Default.projectPaths = null;
149
149
//Properties.Settings.Default.Save();
150
150
151
- projectsSource = GetProjects . Scan ( getGitBranch : ( bool ) chkShowGitBranchColumn . IsChecked , getPlasticBranch : ( bool ) chkCheckPlasticBranch . IsChecked , getArguments : ( bool ) chkShowLauncherArgumentsColumn . IsChecked , showMissingFolders : ( bool ) chkShowMissingFolderProjects . IsChecked , showTargetPlatform : ( bool ) chkShowPlatform . IsChecked , AllProjectPaths : Properties . Settings . Default . projectPaths , searchGitbranchRecursivly : ( bool ) chkGetGitBranchRecursively . IsChecked ) ;
151
+ projectsSource = GetProjects . Scan ( getGitBranch : ( bool ) chkShowGitBranchColumn . IsChecked , getPlasticBranch : ( bool ) chkCheckPlasticBranch . IsChecked , getArguments : ( bool ) chkShowLauncherArgumentsColumn . IsChecked , showMissingFolders : ( bool ) chkShowMissingFolderProjects . IsChecked , showTargetPlatform : ( bool ) chkShowPlatform . IsChecked , AllProjectPaths : Properties . Settings . Default . projectPaths , searchGitbranchRecursivly : ( bool ) chkGetGitBranchRecursively . IsChecked , showSRP : ( bool ) chkCheckSRP . IsChecked ) ;
152
152
153
153
//Console.WriteLine("projectsSource.Count: " + projectsSource.Count);
154
154
@@ -453,6 +453,7 @@ void LoadSettings()
453
453
chkEnableProjectRename . IsChecked = Settings . Default . enableProjectRename ;
454
454
chkStreamerMode . IsChecked = Settings . Default . streamerMode ;
455
455
chkShowPlatform . IsChecked = Settings . Default . showTargetPlatform ;
456
+ chkCheckSRP . IsChecked = Settings . Default . checkSRP ;
456
457
chkUseCustomTheme . IsChecked = Settings . Default . useCustomTheme ;
457
458
txtRootFolderForNewProjects . Text = Settings . Default . newProjectsRoot ;
458
459
txtWebglRelativePath . Text = Settings . Default . webglBuildPath ;
@@ -467,6 +468,7 @@ void LoadSettings()
467
468
gridRecent . Columns [ 4 ] . Visibility = ( bool ) chkShowLauncherArgumentsColumn . IsChecked ? Visibility . Visible : Visibility . Collapsed ;
468
469
gridRecent . Columns [ 5 ] . Visibility = ( bool ) chkShowGitBranchColumn . IsChecked ? Visibility . Visible : Visibility . Collapsed ;
469
470
gridRecent . Columns [ 6 ] . Visibility = ( bool ) chkShowPlatform . IsChecked ? Visibility . Visible : Visibility . Collapsed ;
471
+ gridRecent . Columns [ 7 ] . Visibility = ( bool ) chkCheckSRP . IsChecked ? Visibility . Visible : Visibility . Collapsed ;
470
472
471
473
// update installations folder listbox
472
474
lstRootFolders . Items . Clear ( ) ;
@@ -654,9 +656,9 @@ private void SaveSettingsOnExit()
654
656
List < int > gridWidths ;
655
657
656
658
// if we dont have any settings yet
657
- if ( Properties . Settings . Default . gridColumnWidths != null )
659
+ if ( Settings . Default . gridColumnWidths != null )
658
660
{
659
- gridWidths = new List < int > ( Properties . Settings . Default . gridColumnWidths ) ;
661
+ gridWidths = new List < int > ( Settings . Default . gridColumnWidths ) ;
660
662
}
661
663
else
662
664
{
@@ -667,7 +669,7 @@ private void SaveSettingsOnExit()
667
669
var column = gridRecent . Columns [ 0 ] ;
668
670
for ( int i = 0 ; i < gridRecent . Columns . Count ; ++ i )
669
671
{
670
- if ( Properties . Settings . Default . gridColumnWidths != null && Properties . Settings . Default . gridColumnWidths . Length > i )
672
+ if ( Settings . Default . gridColumnWidths != null && Settings . Default . gridColumnWidths . Length > i )
671
673
{
672
674
gridWidths [ i ] = ( int ) gridRecent . Columns [ i ] . Width . Value ;
673
675
}
@@ -676,17 +678,17 @@ private void SaveSettingsOnExit()
676
678
gridWidths . Add ( ( int ) gridRecent . Columns [ i ] . Width . Value ) ;
677
679
}
678
680
}
679
- Properties . Settings . Default . gridColumnWidths = gridWidths . ToArray ( ) ;
680
- Properties . Settings . Default . Save ( ) ;
681
+ Settings . Default . gridColumnWidths = gridWidths . ToArray ( ) ;
682
+ Settings . Default . Save ( ) ;
681
683
682
684
683
685
// save buildrepot column widths
684
686
gridWidths . Clear ( ) ;
685
687
686
688
// if we dont have any settings yet
687
- if ( Properties . Settings . Default . gridColumnWidthsBuildReport != null )
689
+ if ( Settings . Default . gridColumnWidthsBuildReport != null )
688
690
{
689
- gridWidths = new List < int > ( Properties . Settings . Default . gridColumnWidthsBuildReport ) ;
691
+ gridWidths = new List < int > ( Settings . Default . gridColumnWidthsBuildReport ) ;
690
692
}
691
693
else
692
694
{
@@ -697,7 +699,7 @@ private void SaveSettingsOnExit()
697
699
column = gridBuildReport . Columns [ 0 ] ;
698
700
for ( int i = 0 ; i < gridBuildReport . Columns . Count ; ++ i )
699
701
{
700
- if ( Properties . Settings . Default . gridColumnWidthsBuildReport != null && Properties . Settings . Default . gridColumnWidthsBuildReport . Length > i )
702
+ if ( Settings . Default . gridColumnWidthsBuildReport != null && Settings . Default . gridColumnWidthsBuildReport . Length > i )
701
703
{
702
704
gridWidths [ i ] = ( int ) gridBuildReport . Columns [ i ] . Width . Value ;
703
705
}
@@ -706,9 +708,9 @@ private void SaveSettingsOnExit()
706
708
gridWidths . Add ( ( int ) gridBuildReport . Columns [ i ] . Width . Value ) ;
707
709
}
708
710
}
709
- Properties . Settings . Default . gridColumnWidthsBuildReport = gridWidths . ToArray ( ) ;
710
- Properties . Settings . Default . projectName = projectNameSetting ;
711
- Properties . Settings . Default . Save ( ) ;
711
+ Settings . Default . gridColumnWidthsBuildReport = gridWidths . ToArray ( ) ;
712
+ Settings . Default . projectName = projectNameSetting ;
713
+ Settings . Default . Save ( ) ;
712
714
713
715
// make backup
714
716
var config = ConfigurationManager . OpenExeConfiguration ( ConfigurationUserLevel . PerUserRoamingAndLocal ) ;
@@ -813,7 +815,7 @@ public void RefreshRecentProjects()
813
815
// take currently selected project row
814
816
lastSelectedProjectIndex = gridRecent . SelectedIndex ;
815
817
// rescan recent projects
816
- projectsSource = GetProjects . Scan ( getGitBranch : ( bool ) chkShowGitBranchColumn . IsChecked , getPlasticBranch : ( bool ) chkCheckPlasticBranch . IsChecked , getArguments : ( bool ) chkShowLauncherArgumentsColumn . IsChecked , showMissingFolders : ( bool ) chkShowMissingFolderProjects . IsChecked , showTargetPlatform : ( bool ) chkShowPlatform . IsChecked , AllProjectPaths : Settings . Default . projectPaths , searchGitbranchRecursivly : ( bool ) chkGetGitBranchRecursively . IsChecked ) ;
818
+ projectsSource = GetProjects . Scan ( getGitBranch : ( bool ) chkShowGitBranchColumn . IsChecked , getPlasticBranch : ( bool ) chkCheckPlasticBranch . IsChecked , getArguments : ( bool ) chkShowLauncherArgumentsColumn . IsChecked , showMissingFolders : ( bool ) chkShowMissingFolderProjects . IsChecked , showTargetPlatform : ( bool ) chkShowPlatform . IsChecked , AllProjectPaths : Settings . Default . projectPaths , searchGitbranchRecursivly : ( bool ) chkGetGitBranchRecursively . IsChecked , showSRP : ( bool ) chkCheckSRP . IsChecked ) ;
817
819
gridRecent . ItemsSource = projectsSource ;
818
820
819
821
// fix sorting on refresh
@@ -3332,6 +3334,12 @@ public int Compare(Object a, Object b)
3332
3334
if ( ( ( Project ) a ) . TargetPlatform == null ) return direction == ListSortDirection . Ascending ? - 1 : 1 ;
3333
3335
if ( ( ( Project ) b ) . TargetPlatform == null ) return direction == ListSortDirection . Ascending ? 1 : - 1 ;
3334
3336
return direction == ListSortDirection . Ascending ? ( ( Project ) a ) . TargetPlatform . CompareTo ( ( ( Project ) b ) . TargetPlatform ) : ( ( Project ) b ) . TargetPlatform . CompareTo ( ( ( Project ) a ) . TargetPlatform ) ;
3337
+ case "SRP" :
3338
+ // handle null values
3339
+ if ( ( ( Project ) a ) . SRP == null && ( ( Project ) b ) . SRP == null ) return 0 ;
3340
+ if ( ( ( Project ) a ) . SRP == null ) return direction == ListSortDirection . Ascending ? - 1 : 1 ;
3341
+ if ( ( ( Project ) b ) . SRP == null ) return direction == ListSortDirection . Ascending ? 1 : - 1 ;
3342
+ return direction == ListSortDirection . Ascending ? ( ( Project ) a ) . SRP . CompareTo ( ( ( Project ) b ) . SRP ) : ( ( Project ) b ) . SRP . CompareTo ( ( ( Project ) a ) . SRP ) ;
3335
3343
default :
3336
3344
return 0 ;
3337
3345
}
@@ -3798,6 +3806,17 @@ private void CheckCustomIcon()
3798
3806
//Debug.WriteLine("Custom icon not found. Using default.");
3799
3807
}
3800
3808
}
3809
+
3810
+ private void chkCheckSRP_Checked ( object sender , RoutedEventArgs e )
3811
+ {
3812
+ if ( this . IsActive == false ) return ; // dont run code on window init
3813
+
3814
+ gridRecent . Columns [ 7 ] . Visibility = ( bool ) chkCheckSRP . IsChecked ? Visibility . Visible : Visibility . Collapsed ;
3815
+
3816
+ Settings . Default . checkSRP = ( bool ) chkCheckSRP . IsChecked ;
3817
+ Settings . Default . Save ( ) ;
3818
+ RefreshRecentProjects ( ) ;
3819
+ }
3801
3820
//private void menuProjectProperties_Click(object sender, RoutedEventArgs e)
3802
3821
//{
3803
3822
// var proj = GetSelectedProject();
0 commit comments