/// <summary> /// Show the dialog box which allows the user to configure which self tests are to be run. /// </summary> public void ConfigureSelfTests() { MainWindow.CloseChildForms(); MainWindow.Cursor = Cursors.WaitCursor; try { FormViewTestResults formViewTestResults = new FormViewTestResults(MainWindow.CommunicationInterface, MainWindow); MainWindow.ShowMdiChild(formViewTestResults); } catch (Exception exception) { MessageBox.Show(exception.Message, Resources.MBCaptionError, MessageBoxButtons.OK, MessageBoxIcon.Error); return; } finally { MainWindow.Cursor = Cursors.Default; } }
/// <summary> /// Event handler associated with the 'Execute' button <c>Click</c> event. Execute the selected self tests. /// </summary> /// <param name="sender">Reference to the object that raised the event.</param> /// <param name="e">Parameter passed from the object that raised the event.</param> protected override void m_ButtonOK_Click(object sender, EventArgs e) { // Skip, if the Dispose() method has been called. if (IsDisposed) { return; } Cursor = Cursors.WaitCursor; m_CalledFromAsFormViewTestResults = CalledFrom as FormViewTestResults; Debug.Assert(m_CalledFromAsFormViewTestResults != null, "FormTestListDefine.m_ButtonOK_Click() - [m_CalledFromAsFormViewTestResults != null]"); // Update the SelfTestRecord property of the calling form with the currently defined test list record. m_CalledFromAsFormViewTestResults.TestListRecord = m_TestListRecord; Cursor = Cursors.Default; }