private void scriptingCommand_SessionAbortedEvent(object sender, SessionAbortEventArgs e) { this.panel1.Text = e.ErrorMessage; this.panel.Enabled = true; this.btnRun.Enabled = true; this.btnClose.Enabled = true; this.btnNextRequest.Enabled = false; }
/// <summary> /// Display the session aborted message. /// </summary> private void ShowSessionAborted(object sender, SessionAbortEventArgs e) { string message = e.ErrorMessage; // start progress bar this.StopProgressBarEvent(this,new ProgressBarControlEventArgs("")); MessageBox.Show("Session Run Aborted", AppLocation.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Information); }
/// <summary> /// Aborts the session. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void unitTestCommand_SessionAbortedEvent(object sender, SessionAbortEventArgs e) { this.Invoke(new SessionAbortEventHandler(ShowSessionAborted),new object[] {sender, e}); }
private void OnSessionAborted(object sender, SessionAbortEventArgs e) { string message = e.ErrorMessage; ListViewItem item = new ListViewItem(); item.ImageIndex = 6; item.Text = "Session aborted"; item.SubItems.Add("Error: "+ message); item.ForeColor = Color.Red; lvRequests.Items.Add(item); // stop progress bar progress.Value = 0; }
/// <summary> /// Aborts the session and updates the pending reports. /// </summary> /// <param name="message"> The message to show.</param> private void AbortSessionRun(string message) { _isRunning = false; _currentIndex = 0; SessionAbortEventArgs sargs = new SessionAbortEventArgs(); sargs.ErrorMessage = message; if ( SessionAbortedEvent != null ) SessionAbortedEvent(this, sargs); }
/// <summary> /// Stops the session. /// </summary> public void Stop() { _isRunning = false; SessionAbortEventArgs sargs = new SessionAbortEventArgs(); sargs.ErrorMessage = "Scripting Application aborted by user."; SessionAbortedEvent(this, sargs); }
/// <summary> /// Aborts the session and updates the pending reports. /// </summary> /// <param name="message"> The message to show.</param> private void AbortSessionRun(string message) { this._isRunning = false; if ( reports.Count > 0 ) { // show report UnitTestSessionReportEventArgs args = new UnitTestSessionReportEventArgs(); args.Report = reports; this.CreateReportEvent(this, args); } SessionAbortEventArgs sargs = new SessionAbortEventArgs(); sargs.ErrorMessage = message; this.SessionAbortedEvent(this, sargs); }
/// <summary> /// Stops the session. /// </summary> public override void Stop() { base.Stop(); this._isRunning = false; SessionAbortEventArgs sargs = new SessionAbortEventArgs(); sargs.ErrorMessage = "Session Run aborted by user."; this.SessionAbortedEvent(this, sargs); }