コード例 #1
0
 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();
     }
 }
コード例 #2
0
        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();
            }
        }
コード例 #3
0
ファイル: NunitView.cs プロジェクト: jimgraham/visual-nunit
        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();
            }
        }