Beispiel #1
0
 protected void fillSourceBranchListAndSelect(IEnumerable <Branch> branches, string defaultSourceBrachName)
 {
     comboBoxSourceBranch.Items.AddRange(branches.ToArray());
     WinFormsHelpers.SelectComboBoxItem(comboBoxSourceBranch, String.IsNullOrWhiteSpace(defaultSourceBrachName)
     ? null : new Func <object, bool>(o => (o as Branch).Name == defaultSourceBrachName));
 }
Beispiel #2
0
 protected void fillTargetBranchListAndSelect(IEnumerable <string> branchNames, string defaultTargetBranchName)
 {
     comboBoxTargetBranch.Items.AddRange(branchNames.ToArray());
     WinFormsHelpers.SelectComboBoxItem(comboBoxTargetBranch, String.IsNullOrWhiteSpace(defaultTargetBranchName)
     ? null : new Func <object, bool>(o => (o as string) == defaultTargetBranchName));
 }
Beispiel #3
0
 protected void fillProjectListAndSelect(IEnumerable <string> projects, string defaultProjectName)
 {
     comboBoxProject.Items.AddRange(projects.OrderBy(x => x).ToArray());
     WinFormsHelpers.SelectComboBoxItem(comboBoxProject, String.IsNullOrWhiteSpace(defaultProjectName)
     ? null : new Func <object, bool>(o => (o as string) == defaultProjectName));
 }