private void _dgvFile_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (isCellNoHeader(e.RowIndex)) { int idDTPFile; int.TryParse(_dgvFile.Rows[e.RowIndex].Cells[0].Value.ToString(), out idDTPFile); DTPFile dtpFile = dtpFileList.getItem(idDTPFile); if ((e.ColumnIndex == 2) && (dtpFile.File != string.Empty)) { WorkWithFiles.openFile(dtpFile.File); } else { DTPFile_AddEdit dtpFAE = new DTPFile_AddEdit(dtpFile); if (dtpFAE.ShowDialog() == System.Windows.Forms.DialogResult.OK) { FillDgv(); } } } }
private void _dgvFile_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (isCellNoHeader(e.RowIndex)) { int idDTPFile; int.TryParse(_dgvFile.Rows[e.RowIndex].Cells[0].Value.ToString(), out idDTPFile); DTPFile dtpFile = dtpFileList.getItem(idDTPFile); if ((e.ColumnIndex == 2) && (dtpFile.File != string.Empty)) WorkWithFiles.openFile(dtpFile.File); else { DTPFile_AddEdit dtpFAE = new DTPFile_AddEdit(dtpFile); if (dtpFAE.ShowDialog() == System.Windows.Forms.DialogResult.OK) FillDgv(); } } }