private void metroGrid2_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex < 0) { return; } List <Form1.CarTable> list = metroGrid2.DataSource as List <Form1.CarTable>; C1 = list[e.RowIndex]; Form4 f = new Form4(C1.Image_path); f.Text = C1.Car_name; f.Show(); }
void Clear() { C1 = null; cu = null; TextBox7.Text = string.Empty; ComboBox1.SelectedItem = null; ComboBox2.SelectedItem = null; RadioButton1.Checked = false; RadioButton2.Checked = false; textBox1.Text = string.Empty; textBox2.Text = string.Empty; textBox3.Text = string.Empty; textBox4.Text = string.Empty; textBox5.Text = string.Empty; textBox6.Text = string.Empty; textBox8.Text = string.Empty; richTextBox1.Text = string.Empty; }