private void executeRepoUpdate() { if (string.IsNullOrEmpty(RepoCombo.Text)) { MessageBox.Show("Sorry, Repository cannot be blank.", "Repository Configuration", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { string selectedUrl = RepoCombo.Text; // verify if URL is accessible try { if (selectedUrl.Contains("file:///")) { verifyFileProtocol(selectedUrl); } else { verifyRemoteAccess(selectedUrl); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Repository Configuration", MessageBoxButtons.OK, MessageBoxIcon.Warning); artifactTabControl.SelectedIndex = 2; RepoCombo.Text = string.Empty; return; } // add repository to profile NPanday.Model.Settings.Repository repo = SettingsUtil.SetProfileRepository(getDefaultProfile(), selectedUrl, checkBoxRelease.Checked, checkBoxSnapshot.Checked); selectedRepoUrl = selectedUrl; // set the mirror too SettingsUtil.SetMirrorUrl(settings, selectedUrl); // make NPanday.id profile active SettingsUtil.AddActiveProfile(settings, SettingsUtil.defaultProfileID); // write to Settings.xml SettingsUtil.MergeSettings(settings, settingsPath); // do not specify SelectedUrl to suppress SelectedIndexChanged event repoCombo_Refresh(null); MessageBox.Show(this, "Successfully Changed Remote Repository.", "Repository Configuration"); //localListView_Refresh(); } }