Exemplo n.º 1
0
        public virtual bool NodeMoveNextCondition(NodeSeekConditions cs)
        {
            while (NodeMoveNext())
            {
                bool IsSelected = true;
                foreach (NodeSeekCondition c in cs)
                {
                    switch (c.ConditionAttribute)
                    {
                    case NodeSeekConditonType.TagName:
                        IsSelected = IsSelected && !((c.ConditionValue == NodeTagName) ^ c.IsIncluding);
                        break;

                    case NodeSeekConditonType.ClassName:
                        IsSelected = IsSelected && !((c.ConditionValue == NodeClassName) ^ c.IsIncluding);
                        break;

                    case NodeSeekConditonType.Id:
                        IsSelected = IsSelected && !((c.ConditionValue == NodeId) ^ c.IsIncluding);
                        break;

                    case NodeSeekConditonType.InnerTextExactMatch:
                        IsSelected = IsSelected && !((NodeInnerText != null && c.ConditionValue == NodeInnerText) ^ c.IsIncluding);
                        break;

                    case NodeSeekConditonType.InnerTextPartialMatch:
                        IsSelected = IsSelected && !((NodeInnerText != null && NodeInnerText.IndexOf(c.ConditionValue) > -1) ^ c.IsIncluding);
                        break;

                    case NodeSeekConditonType.InnerHTMLExactMatch:
                        IsSelected = IsSelected && !((NodeInnerHtml != null && c.ConditionValue == NodeInnerHtml) ^ c.IsIncluding);
                        break;

                    case NodeSeekConditonType.InnerHTMLPartialMatch:
                        IsSelected = IsSelected && !((NodeInnerHtml != null && NodeInnerHtml.IndexOf(c.ConditionValue) > -1) ^ c.IsIncluding);
                        break;

                    default: break;
                    }
                }
                if (IsSelected)
                {
                    balancer.InvokeBalancePoint();
                    return(true);
                }
                Application.DoEvents();
            }
            balancer.InvokeBalancePoint();
            return(false);
        }
 public override bool NodeMoveNextCondition(NodeSeekConditions cs)
 {
     while (NodeMoveNext())
     {
         bool IsSelected = true;
         foreach (NodeSeekCondition c in cs)
         {
             switch (c.ConditionAttribute)
             {
                 case NodeSeekConditonType.TagName:
                     IsSelected = IsSelected && !((c.ConditionValue == NodeTagName) ^ c.IsIncluding);
                     break;
                 case NodeSeekConditonType.ClassName:
                     IsSelected = IsSelected && !((c.ConditionValue == NodeClassName) ^ c.IsIncluding);
                     break;
                 case NodeSeekConditonType.Id:
                     IsSelected = IsSelected && !((c.ConditionValue == NodeId) ^ c.IsIncluding);
                     break;
                 case NodeSeekConditonType.InnerTextExactMatch:
                     IsSelected = IsSelected && !((c.ConditionValue == NodeInnerText) ^ c.IsIncluding);
                     break;
                 case NodeSeekConditonType.InnerTextPartialMatch:
                     IsSelected = IsSelected && !((NodeInnerText.IndexOf(c.ConditionValue) > 0) ^ c.IsIncluding);
                     break;
                 case NodeSeekConditonType.InnerHTMLExactMatch:
                     IsSelected = IsSelected && !((c.ConditionValue == NodeInnerHtml) ^ c.IsIncluding);
                     break;
                 case NodeSeekConditonType.InnerHTMLPartialMatch:
                     IsSelected = IsSelected && !((NodeInnerHtml.IndexOf(c.ConditionValue) > 0) ^ c.IsIncluding);
                     break;
                 default: break;
             }
         }
         if (IsSelected)
         {
             return true;
         }
         Application.DoEvents();
     }
     return false;
 }
Exemplo n.º 3
0
 public override bool NodeMoveNextCondition(NodeSeekConditions cs)
 {
     throw new Exception("VBAEngine Stopping Exception!");
 }
Exemplo n.º 4
0
 public bool NodeMoveNextCondition(NodeSeekConditions cs)
 {
     return(m_vbaobject.NodeMoveNextCondition(cs));
 }
 public bool NodeMoveNextCondition(NodeSeekConditions cs)
 {
     return m_vbaobject.NodeMoveNextCondition(cs);
 }
 public override bool NodeMoveNextCondition(NodeSeekConditions cs)
 {
     throw new Exception("VBAEngine Stopping Exception!");
 }