private void ButtonRemRepo_Click(object sender, EventArgs e) { ReposConfig cnf = ReposConfig.GetInstance(); var select = cnf.GetSelected(); if (select == null) { return; // no selection made } string msg = "Are you sure you wish to remove the reference to " + select.GetName() + "?"; bool confirm = DialogUtil.Confirm(msg); if (confirm) { cnf.RemoveRepoDetails(select); RefreshList(); } }