コード例 #1
0
ファイル: EngineCallback.cs プロジェクト: kelltrick/MIEngine
 public void OnOutputMessage(string outputMessage, enum_MESSAGETYPE messageType)
 {
     try
     {
         var eventObject = new AD7MessageEvent(outputMessage, messageType, isAsync: false, severity: AD7MessageEvent.Severity.Warning);
         Send(eventObject, AD7MessageEvent.IID, null);
     }
     catch
     {
         // Since we are often trying to report an exception, if something goes wrong we don't want to take down the process,
         // so ignore the failure.
     }
 }
コード例 #2
0
ファイル: EngineCallback.cs プロジェクト: aonorin/MIEngine
        private void SendMessage(string message, OutputMessage.Severity severity, bool isAsync)
        {
            try
            {
                // IDebugErrorEvent2 is used to report error messages to the user when something goes wrong in the debug engine.
                // The sample engine doesn't take advantage of this.

                AD7MessageEvent eventObject = new AD7MessageEvent(new OutputMessage(message, enum_MESSAGETYPE.MT_MESSAGEBOX, severity), isAsync);
                Send(eventObject, AD7MessageEvent.IID, null);
            }
            catch
            {
                // Since we are often trying to report an exception, if something goes wrong we don't want to take down the process,
                // so ignore the failure.
            }
        }
コード例 #3
0
ファイル: EngineCallback.cs プロジェクト: aonorin/MIEngine
 public void OnOutputMessage(OutputMessage outputMessage)
 {
     try
     {
         if (outputMessage.ErrorCode == 0)
         {
             var eventObject = new AD7MessageEvent(outputMessage, isAsync: true);
             Send(eventObject, AD7MessageEvent.IID, null);
         }
         else
         {
             var eventObject = new AD7ErrorEvent(outputMessage, isAsync: true);
             Send(eventObject, AD7ErrorEvent.IID, null);
         }
     }
     catch
     {
         // Since we are often trying to report an exception, if something goes wrong we don't want to take down the process,
         // so ignore the failure.
     }
 }
コード例 #4
0
 int IDebugErrorEvent2.GetErrorMessage(enum_MESSAGETYPE[] pMessageType, out string errorFormat, out int hrErrorReason, out uint pdwType, out string helpFilename, out uint pdwHelpId)
 {
     hrErrorReason = unchecked ((int)_outputMessage.ErrorCode);
     return(AD7MessageEvent.ConvertMessageToAD7(_outputMessage, pMessageType, out errorFormat, out pdwType, out helpFilename, out pdwHelpId));
 }
コード例 #5
0
ファイル: EngineCallback.cs プロジェクト: wesrupert/MIEngine
        private void SendMessage(string message, OutputMessage.Severity severity, bool isAsync)
        {
            try
            {
                // IDebugErrorEvent2 is used to report error messages to the user when something goes wrong in the debug engine.
                // The sample engine doesn't take advantage of this.

                AD7MessageEvent eventObject = new AD7MessageEvent(new OutputMessage(message, enum_MESSAGETYPE.MT_MESSAGEBOX, severity), isAsync);
                Send(eventObject, AD7MessageEvent.IID, null);
            }
            catch
            {
                // Since we are often trying to report an exception, if something goes wrong we don't want to take down the process,
                // so ignore the failure.
            }
        }
コード例 #6
0
ファイル: EngineCallback.cs プロジェクト: wesrupert/MIEngine
 public void OnOutputMessage(OutputMessage outputMessage)
 {
     try
     {
         if (outputMessage.ErrorCode == 0)
         {
             var eventObject = new AD7MessageEvent(outputMessage, isAsync: true);
             Send(eventObject, AD7MessageEvent.IID, null);
         }
         else
         {
             var eventObject = new AD7ErrorEvent(outputMessage, isAsync: true);
             Send(eventObject, AD7ErrorEvent.IID, null);
         }
     }
     catch
     {
         // Since we are often trying to report an exception, if something goes wrong we don't want to take down the process,
         // so ignore the failure.
     }
 }
コード例 #7
0
ファイル: EngineCallback.cs プロジェクト: enginekit/MIEngine
 public void OnOutputMessage(string outputMessage, enum_MESSAGETYPE messageType)
 {
     try
     {
         var eventObject = new AD7MessageEvent(outputMessage, messageType, isAsync: false, severity: AD7MessageEvent.Severity.Warning);
         Send(eventObject, AD7MessageEvent.IID, null);
     }
     catch
     {
         // Since we are often trying to report an exception, if something goes wrong we don't want to take down the process,
         // so ignore the failure.
     }
 }