private void UpdateButton_Click(object sender, EventArgs e) { if (NameComboBox.Text != "") { string GameName = NameComboBox.Text; AddForm af = new AddForm(NameComboBox.Text); af.StartPosition = FormStartPosition.CenterParent; if (af.ShowDialog() == DialogResult.Yes) { updateDGV(); NameComboBox.SelectedIndex = NameComboBox.Items.IndexOf(GameName); } } }
private void AddButton_Click(object sender, EventArgs e) { AddForm af = new AddForm (); af.StartPosition = FormStartPosition.CenterParent; if (af.ShowDialog() == DialogResult.Yes) { updateDGV(); } }