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)); }
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)); }
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)); }