Example #1
0
 /// <summary>
 /// This method waits and does not return until the Console Window is messaged to close by windows
 /// </summary>
 /// <returns></returns>
 public AdkConsoleEvent WaitForExit()
 {
     fLifeCycle = new ManualResetEvent(false);
     using (AdkConsoleEventWatcher watcher = new AdkConsoleEventWatcher()) {
         watcher.ControlEvent += new AdkControlEventHandler(watcher_ControlEvent);
         fLifeCycle.WaitOne();
         return(fReceivedEvent);
     }
 }
 /// <summary>
 /// This method waits and does not return until the Console Window is messaged to close by windows
 /// </summary>
 /// <returns></returns>
 public AdkConsoleEvent WaitForExit()
 {
     fLifeCycle = new ManualResetEvent( false );
     using ( AdkConsoleEventWatcher watcher = new AdkConsoleEventWatcher() ) {
         watcher.ControlEvent += new AdkControlEventHandler( watcher_ControlEvent );
         fLifeCycle.WaitOne();
         return fReceivedEvent;
     }
 }