11-25-2008 09:47 AM
How can I receive the UIMessageEvent_Terminate or Abort in my .Net Step? I don't want to run a loop in the TerminationMonitor.
I have passed the SequenceContext to my step an registred my eventhandler but no event is rised.
public static int Startup(SequenceContext seqCtx)
{
seqCtx.Engine.UIMessageEvent +=new _TEEngineEvents_UIMessageEventEventHandler(Engine_UIMessageEvent);
}
static void Engine_UIMessageEvent(UIMessage msg) // <--- never called
{
System.Diagnostics.Debug.WriteLine("UIMessage: " + msg.Event.ToString());
switch (msg.Event)
{
case UIMessageCodes.UIMsg_AbortingExecution:
case UIMessageCodes.UIMsg_TerminatingExecution:
dl.Abort = true;
break;
case UIMessageCodes.UIMsg_BreakOnUserRequest:
break;
}
msg.Acknowledge();
}
what is wrong???
11-28-2008 02:59 AM
See here some informations:
http://forums.ni.com/ni/board/message?board.id=232&message.id=7258&requireLogin=False
Regards
Ken