Exemplo n.º 1
0
        public virtual void doActions(List <WebAction> actions)
        {
            completedEventHandler         = new WebBrowserDocumentCompletedEventHandler(this.pageLoaded);
            WebBrowser.DocumentCompleted += completedEventHandler;
            Queue <WebAction> activeActions = new Queue <WebAction>(actions);

            while (0 < activeActions.Count)
            {
                activeAction = activeActions.Dequeue();
                if (activeAction.canDoAction(this))
                {
                    if (activeAction.shouldWaitAction(this))
                    {
                        trigger.Reset();
                        WaitHandle.WaitAny(waitHandles);
                    }
                    activeAction.doAction(this);
                    if (activeAction.isWaitForEvent())
                    {
                        trigger.Reset();
                        WaitHandle.WaitAny(waitHandles);
                    }
                }
            }
            completedActions();
        }
Exemplo n.º 2
0
 public virtual void doNextAction()
 {
     if (0 < activeActions.Count)
     {
         activeAction = activeActions.Dequeue();
         if (activeAction.canDoAction(this))
         {
             if (activeAction.shouldWaitAction(this))
             {
                 //Wait
             }
             else
             {
                 doAction();
             }
         }
     }
     else
     {
         completedActions();
     }
 }
Exemplo n.º 3
0
        public virtual void doNextAction()
        {
            if (0 < activeActions.Count)
            {
                activeAction = activeActions.Dequeue();
                if (activeAction.canDoAction(this))
                {
                    if (activeAction.shouldWaitAction(this))
                    {
                        //Wait
                    }
                    else
                    {
                        doAction();
                    }
                }
            } else
            {
                completedActions();
            }

        }
Exemplo n.º 4
0
 public virtual void doActions(List<WebAction> actions)
 {
     completedEventHandler = new WebBrowserDocumentCompletedEventHandler(this.pageLoaded);
     WebBrowser.DocumentCompleted += completedEventHandler;
     Queue<WebAction> activeActions = new Queue<WebAction>(actions);
     while (0 < activeActions.Count)
     {
         activeAction = activeActions.Dequeue();
         if (activeAction.canDoAction(this))
         {
             if (activeAction.shouldWaitAction(this))
             {
                 trigger.Reset();
                 WaitHandle.WaitAny(waitHandles);
             }
             activeAction.doAction(this);
             if (activeAction.isWaitForEvent())
             {
                 trigger.Reset();
                 WaitHandle.WaitAny(waitHandles);
             }
         }
     }
     completedActions();
 }