private void gv_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) { string key = (string)gv.Rows[e.RowIndex].Cells[0].Value; string value = (string)gv.Rows[e.RowIndex].Cells[1].Value; frmEditDeploy dlg = new frmEditDeploy(); if (dlg.ShowDialog(key, value, defaultTranslations[key]) == DialogResult.OK) { string trans = dlg.GetTranslation(); gv.Rows[e.RowIndex].Cells[1].Value = trans; gv.Rows[e.RowIndex].Cells[0].Style.ForeColor = String.IsNullOrEmpty(trans) ? System.Drawing.Color.Red : System.Drawing.Color.Black; gv.Rows[e.RowIndex].Cells[1].Style.ForeColor = String.IsNullOrEmpty(trans) ? System.Drawing.Color.Red : System.Drawing.Color.Black; ToolStripText(GetUntranslatedCountDeployTool()); } }
private void gv_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) { string key = (string)gv.Rows[e.RowIndex].Cells[0].Value; string value = (string)gv.Rows[e.RowIndex].Cells[1].Value; frmEditDeploy dlg = new frmEditDeploy(); if (dlg.ShowDialog(key, value, defaultTranslations[key]) == DialogResult.OK) { string trans = dlg.GetTranslation(); gv.Rows[e.RowIndex].Cells[1].Value = trans; gv.Rows[e.RowIndex].Cells[0].Style.ForeColor = String.IsNullOrEmpty(trans) ? System.Drawing.Color.Red : System.Drawing.Color.Black; gv.Rows[e.RowIndex].Cells[1].Style.ForeColor = String.IsNullOrEmpty(trans) ? System.Drawing.Color.Red : System.Drawing.Color.Black; ToolStripText(GetUntranslatedCountDeployTool()); } }