private void saveButton_Click(object sender, EventArgs e) { if (charBox.Text != "" && subBox.Text != "") { App_Code.SubList Subs = new App_Code.SubList(); Subs.Add(charBox.Text, subBox.Text); this.Close(); } else { MessageBox.Show("Please enter a character and a substitution."); } }