private void ApplyRepository() { if (_suppliedRepository != null) { repositoryTextBox.Text = _suppliedRepository.Url.AbsoluteUri; var branches = FindBranch.FindBrach(_suppliedRepository.Url.AbsoluteUri); if (branches != null) { branchComboBox.Items.AddRange(branches); branchComboBox.SelectedIndex = 0; okButton.Enabled = !string.IsNullOrEmpty(branchComboBox.SelectedItem.ToString()); } } }
private void checkButton_Click(object sender, EventArgs e) { branchComboBox.Items.Clear(); var branches = FindBranch.FindBrach(repositoryTextBox.Text); if (branches != null) { branchComboBox.Items.AddRange(branches); branchComboBox.SelectedIndex = 0; okButton.Enabled = !string.IsNullOrEmpty(branchComboBox.SelectedItem.ToString()); } else { MessageBox.Show("Something went wrong!"); } }