Beispiel #1
0
 public TransactionEventInfo(PaoTransaction trans
                             , bool screenshot = false
                             , bool snapshot   = false) : base(null, trans.ToString(), screenshot, snapshot)
 {
     Transaction = (PaoTransaction)IOPublic.ObjectClone(trans);
     if (trans.Status is TransStatus_Running)
     {
         Type = EventType_TransactionRunning;
     }
     else if (trans.Status is TransStatus_Committed)
     {
         Type = EventType_TransactionCommitted;
     }
     else if (trans.Status is TransStatus_Excepted)
     {
         Type = EventType_TransactionExcepted;
         InnerExceptionInfo = new ExceptionEventInfo(trans.Status.As <TransStatus_Excepted>().Exception);
     }
     else if (trans.Status is TransStatus_Failed)
     {
         Type = EventType_TransactionFailed;
     }
     else if (trans.Status is TransStatus_Rollbacked)
     {
         Type = EventType_TransactionRollbacked;
     }
     else if (trans.Status is TransStatus_RollbackExcepted)
     {
         Type = EventType_TransactionRollbackExcepted;
         InnerExceptionInfo = new ExceptionEventInfo(trans.Status.As <TransStatus_RollbackExcepted>().Exception);
     }
 }
Beispiel #2
0
        /// <summary>
        /// 显示异常对话框
        /// </summary>
        /// <param name="exception">异常对话框</param>
        protected virtual void ShowExceptionDialog(Exception exception)
        {
            UIPublic.ShowWaitingForm();
            var eventInfo = new ExceptionEventInfo(exception, true, true);

            UIPublic.CloseWaitingForm();
            UIPublic.ShowEventDialog(eventInfo);
        }
        private bool HandleRuntimeErrorMessage(RuntimeErrorMessage message)
        {
            ExceptionEventInfo exceptionEventInfo = new ExceptionEventInfo(message);

            _globalInfo.EventQueue.Enqueue(exceptionEventInfo);
            _testsMaintainer.FreeHost(message.Id);
            return(true);
        }
Beispiel #4
0
        private void ButtonTestException_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            UIPublic.ShowWaitingForm();
            var eventInfo = new ExceptionEventInfo(new Exception("这是测试消息")
                                                   , true
                                                   , true).AddEventData("测试", "测试");
            var eventControl = new EventControl();

            eventControl.Initialize(eventInfo);
            UIPublic.CloseWaitingForm();
            WinFormPublic.ShowDialog(eventControl);
        }
 public void ExceptionEventProcess(ExceptionEventInfo eventInfo)
 {
     // TODO
 }