private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { string pathF; if (e.RowIndex != -1 && e.ColumnIndex != -1) { string value = null; if (dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value != null) { value = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(); } StreamReader file = null; if (e.ColumnIndex == 4 || e.ColumnIndex == 5) { pathF = Properties.Settings.Default.pathPHA + @"scripts\"; FileDisplay fd = new FileDisplay(value, pathF); if (fd != null) { fd.Show(); } } if (e.ColumnIndex == 6) { pathF = Properties.Settings.Default.pathPHA + @"actual\"; FileDisplay fd = new FileDisplay(value, pathF); if (fd != null) { fd.Show(); } } if (e.ColumnIndex == 7) { pathF = Properties.Settings.Default.pathPHA + @"expected\"; FileDisplay fd = new FileDisplay(value, pathF); if (fd != null) { fd.Show(); } } } }
private void OpenActual_Click(object sender, EventArgs e) { FileDisplay fl = new FileDisplay(TestCompare.script_Actual, Properties.Settings.Default.pathPHA + @"\scripts\"); fl.ShowDialog(); }