private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { int id = Convert.ToInt32(dataGridView1.SelectedRows[0].Cells[0].Value); FormGameConfigAdd form = new FormGameConfigAdd(id); form.ShowDialog(); }
private void toolStripButtonEdit_Click(object sender, EventArgs e) { if (dataGridView1.SelectedRows.Count == 0) { MessageBox.Show("请选择要修改的数据!", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } int id = Convert.ToInt32(dataGridView1.SelectedRows[0].Cells[0].Value); FormGameConfigAdd form = new FormGameConfigAdd(id); form.ShowDialog(); }
private void toolStripButtonAdd_Click(object sender, EventArgs e) { FormGameConfigAdd form = new FormGameConfigAdd(0); form.ShowDialog(); }