private void repoCombo_Refresh(string selectedUrl) { RepoCombo.Items.Clear(); if (settings.profiles != null) { List <NPanday.Model.Settings.Repository> repositories = SettingsUtil.GetAllRepositories(settings); foreach (NPanday.Model.Settings.Repository repo in repositories) { if (!RepoCombo.Items.Contains(repo.url)) { RepoCombo.Items.Add(repo.url); } } if (RepoCombo.Items.Count > 0 && !string.IsNullOrEmpty(selectedUrl)) { RepoCombo.SelectedIndex = RepoCombo.Items.IndexOf(selectedUrl); } } }