@@ -522,10 +522,8 @@ private void pasteToolStripMenuItem_Click(object sender, EventArgs e)
522522 private void selectAllToolStripMenuItem_Click ( object sender , EventArgs e )
523523 {
524524 Control focusedControl = FindFocusedControl ( new List < Control > { textBoxVSProjectPath , textBoxGitBashBinariesPath } ) ;
525- if ( focusedControl is TextBox )
526- {
527- ( ( TextBox ) focusedControl ) . SelectAll ( ) ;
528- }
525+ TextBox control = focusedControl as TextBox ;
526+ control ? . SelectAll ( ) ;
529527 }
530528
531529 private void CutToClipboard ( TextBoxBase tb , string errorMessage = "nothing" )
@@ -601,23 +599,7 @@ private string Translate(string index) // could add (string index, string _curre
601599
602600 return result ;
603601 }
604-
605- private static Control FindFocusedControl0 ( Control container )
606- {
607- foreach ( Control childControl in container . Controls . Cast < Control > ( ) . Where ( childControl => childControl . Focused ) )
608- {
609- return childControl ;
610- }
611-
612- return ( from Control childControl in container . Controls
613- select FindFocusedControl0 ( childControl ) ) . FirstOrDefault ( maybeFocusedControl => maybeFocusedControl != null ) ;
614- }
615-
616- private static Control FindFocusedControl ( IEnumerable < Control > container )
617- {
618- return container . FirstOrDefault ( control => control . Focused ) ;
619- }
620-
602+
621603 private static Control FindFocusedControl ( List < Control > container )
622604 {
623605 return container . FirstOrDefault ( control => control . Focused ) ;
@@ -690,7 +672,7 @@ private void buttonUpdateVSProjects_Click(object sender, EventArgs e)
690672 {
691673 DisplayMessageOk ( Translate ( "The Path variable does not have the path to the GitBash binaries" ) ,
692674 Translate ( "Path variable no GitBash binaries" ) , MessageBoxButtons . OK ) ;
693- // TODO ask user if he wants to add GitBasdh binary to Windows Path variable
675+ // TODO ask user if he wants to add GitBash binary PATH to Windows Path variable
694676 // set PATH=%PATH%;"c:\Program Files (x86)\Git\bin"
695677 return ;
696678 }
@@ -1250,7 +1232,7 @@ public static IEnumerable<string> GetAllDirectories(string path, string pattern
12501232 return result ;
12511233 }
12521234
1253- bool complete = false ;
1235+ bool complete ;
12541236 do
12551237 {
12561238 try
0 commit comments