private void AddToListButton_Click(object sender, EventArgs e) { if (SystemNameText.Text.Length > 0) { ConfigurationManager SaveToConnectionList = new ConfigurationManager(); SaveToConnectionList.AddToRepository(SystemNameText.Text); RefreshView(); } else { MessageBox.Show("Please enter a system name and then continue", "Desk Connect - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }