@@ -120,7 +120,7 @@ where node.HasElements
120120
121121 private static void CreateVSVersionFile ( )
122122 {
123-
123+ // TODO
124124 }
125125
126126 private void LoadLanguages ( )
@@ -391,6 +391,7 @@ private void SetLanguage(string myLanguage)
391391 buttonScannWholePC . Text = _languageDicoEn [ "Scan whole Pc" ] ;
392392 buttonLoadVSProjects . Text = _languageDicoEn [ "Search for Visual Studio Projects" ] ;
393393 checkBoxCreateUpdateFile . Text = _languageDicoEn [ "Create script file" ] ;
394+ buttonCheckUncheckAll . Text = _languageDicoEn [ "Check/Uncheck All" ] ;
394395 _currentLanguage = "English" ;
395396 break ;
396397 case "French" :
@@ -430,6 +431,7 @@ private void SetLanguage(string myLanguage)
430431 buttonScannWholePC . Text = _languageDicoFr [ "Scan whole Pc" ] ;
431432 buttonLoadVSProjects . Text = _languageDicoFr [ "Search for Visual Studio Projects" ] ;
432433 checkBoxCreateUpdateFile . Text = _languageDicoFr [ "Create script file" ] ;
434+ buttonCheckUncheckAll . Text = _languageDicoFr [ "Check/Uncheck All" ] ;
433435 _currentLanguage = "French" ;
434436 break ;
435437 }
@@ -813,7 +815,8 @@ private void buttonLoadVSProjects_Click(object sender, EventArgs e)
813815 foreach ( var solutionName in filteredFiles )
814816 {
815817 var tmpSolPath = GetDirectoryFileNameAndExtension ( solutionName ) [ 0 ] ;
816- var tmpSolNameOnly = GetDirectoryFileNameAndExtension ( solutionName ) [ 1 ] ;
818+ var tmpSolNameOnly0 = GetDirectoryFileNameAndExtension ( solutionName ) [ 0 ] ;
819+ var tmpSolNameOnly = tmpSolNameOnly0 . Substring ( tmpSolNameOnly0 . LastIndexOf ( '\\ ' ) + 1 ) ;
817820
818821 var subfilteredDirs = Directory . EnumerateDirectories ( tmpSolPath , "*.git" ) . ToList ( ) ;
819822 if ( subfilteredDirs . Count != 0 )
@@ -952,5 +955,23 @@ private void textBoxVSProjectPath_TextChanged(object sender, EventArgs e)
952955 {
953956 buttonUpdateVSProjects . Enabled = false ;
954957 }
958+
959+ private void buttonCheckUncheckAll_Click ( object sender , EventArgs e )
960+ {
961+ if ( listViewVSProjects . Items . Count != 0 )
962+ {
963+ ToggleAllItems ( listViewVSProjects ) ;
964+ }
965+ }
966+
967+ private static void CheckAllItems ( ListView lvw , bool check )
968+ {
969+ lvw . Items . OfType < ListViewItem > ( ) . ToList ( ) . ForEach ( item => item . Checked = check ) ;
970+ }
971+
972+ private static void ToggleAllItems ( ListView lvw )
973+ {
974+ lvw . Items . OfType < ListViewItem > ( ) . ToList ( ) . ForEach ( item => item . Checked = ! item . Checked ) ;
975+ }
955976 }
956977}
0 commit comments