Ejemplo n.º 1
0
 public void Start()
 {
     if (_app != null)
     {
         _dispatcher = _app.GetEventDispatcher();
         if (_dispatcher != null)
         {
             _dispatcher.OnClick += new TestObjectEventHandler(_dispatcher_OnClick);
         }
     }
 }
Ejemplo n.º 2
0
 public void Start()
 {
     if (_app != null)
     {
         _dispatcher = _app.GetEventDispatcher();
         if (_dispatcher != null)
         {
             _dispatcher.OnClick += new TestObjectEventHandler(_dispatcher_OnClick);
         }
     }
 }
Ejemplo n.º 3
0
        /* void Close()
         * Close a desktop application, kill the process.
         */
        public virtual void Close()
        {
            if (_appProcess != null)
            {
                try
                {
                    ITestEventDispatcher dispatcher = this.GetEventDispatcher();
                    if (dispatcher != null)
                    {
                        dispatcher.Stop();
                        dispatcher = null;
                    }

                    _appProcess.Close();
                    _appProcess = null;
                }
                catch (Exception ex)
                {
                    throw new CannotStopAppException("Can not stop test application: " + ex.ToString());
                }
            }
        }