private void Button1Click(object sender, EventArgs e) { iForm iForm = new A2(); iForm.Data = this.textBox1.Text; iForm.SetText(); iForm.ShowDialog(); this.textBox1.Text = iForm.Data; }
private void ButtonClick(object sender, EventArgs e) { int num = int.Parse(((Button)sender).Name.Substring(2, 2)); iForm iForm = new A2(); iForm.Data = this.tb[num].Text; iForm.SetText(); iForm.ShowDialog(); this.tb[num].Text = iForm.Data; }
private void DataGridView2CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 2 && e.RowIndex != -1 && !this.DataGridView2.Rows[e.RowIndex].IsNewRow) { iForm iForm = new A2(); iForm.Data = Convert.ToString(this.DataGridView2.Rows[e.RowIndex].Cells[e.ColumnIndex].Value); iForm.SetText(); iForm.ShowDialog(); this.DataGridView2.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = iForm.Data; } }
private void GridCellClick(object sender, DataGridViewCellEventArgs e) { int columnIndex = e.ColumnIndex; int rowIndex = e.RowIndex; if (((columnIndex == 3) && (e.RowIndex != -1)) && !this.DataGridView1.Rows[e.RowIndex].IsNewRow) { iForm form; string str = Convert.ToString(this.DataGridView1.Rows[rowIndex].Cells[1].Value); string str2 = Convert.ToString(this.DataGridView1.Rows[rowIndex].Cells[3].Value); switch (str.ToUpper()) { case "A2": form = new A2(); form.Data = str2; form.SetText(); form.ShowDialog(); this.DataGridView1.Rows[rowIndex].Cells[3].Value = form.Data; break; case "A3": form = new A3(); form.Data = str2; form.SetText(); form.ShowDialog(); this.DataGridView1.Rows[rowIndex].Cells[3].Value = form.Data; break; case "A4": form = new A4(); form.Data = str2; form.SetText(); form.ShowDialog(); this.DataGridView1.Rows[rowIndex].Cells[3].Value = form.Data; break; case "A5": form = new A5(); form.Data = str2; form.SetText(); form.ShowDialog(); this.DataGridView1.Rows[rowIndex].Cells[3].Value = form.Data; break; case "A6": form = new A6(); form.Data = str2; form.SetText(); form.ShowDialog(); this.DataGridView1.Rows[rowIndex].Cells[3].Value = form.Data; break; case "A9": form = new A9(); form.Data = str2; form.SetText(); form.ShowDialog(); this.DataGridView1.Rows[rowIndex].Cells[3].Value = form.Data; break; case "A25": form = new A25(); form.Data = str2; form.SetText(); form.ShowDialog(); this.DataGridView1.Rows[rowIndex].Cells[3].Value = form.Data; break; } } }