private void removeButton_Click(object sender, EventArgs e) { if (sourcesListBox.SelectedItem != null) { try { client.RemoveSource((string)sourcesListBox.SelectedItem); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } DisplaySources(); } }