private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1) { TestDetailsForm testDetailsForm = new TestDetailsForm(); DataRow row = ((DataRowView)dataGridView1.Rows[e.RowIndex].DataBoundItem).Row; TestInformation testInformation = (TestInformation)row["TestInformation"]; testDetailsForm.SetTestInformation(testInformation); testDetailsForm.ShowDialog(); } }
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (dataGridView1.Columns[e.ColumnIndex].Name == "Debug") { if (currentTest == null) { statusButton.Image = emptyIcon; statusLabel.Text = ""; DataRow dataRow = ((DataRowView)dataGridView1.CurrentRow.DataBoundItem).Row; currentTest = (TestInformation)dataRow["TestInformation"]; currentTest.TestState = TestState.None; currentTest.FailureMessage = ""; currentTest.FailureStackTrace = ""; currentTest.Time = TimeSpan.Zero; dataRow["Success"] = currentTest.TestState; dataRow["Time"] = ""; dataRow["Message"] = currentTest.FailureMessage; currentTest.Debug = true; testsToRunStartCount = 1; runTestsButton.Text = "Stop"; runTestsButton.Image = stopIcon; NunitManager.PreRunTestCase(currentTest); testRunWorker.RunWorkerAsync(); } } if (dataGridView1.Columns[e.ColumnIndex].Name == "Stacktrace") { TestDetailsForm testDetailsForm = new TestDetailsForm(); DataRow row = ((DataRowView)dataGridView1.CurrentRow.DataBoundItem).Row; TestInformation testInformation = (TestInformation)row["TestInformation"]; testDetailsForm.SetTestInformation(testInformation); testDetailsForm.ShowDialog(); } }