Beispiel #1
0
    public override void Traverse(EditorCtrlVisitor v)
    {
        //Debug.Log("IN?????????????");
        //若在预访问阶段判断不通过,则不访问此子树
        if (!v.PreVisit(this))
        {
            return;
        }

        v.Visit(this);
        v.AfterVisit(this);

        if (!v.PreVisitChildren(this))
        {
            return;
        }

        int i = 0;

        foreach (var child in children)
        {
            //Debug.Log("循环遍历控件树的外部for?" + i);
            if (v.PreVisitChild(this, i))
            {
                child.Traverse(v);
                v.AfterVisitChild(this, i);
            }
            i++;
        }
        v.AfterVisitChildren(this);
    }
Beispiel #2
0
 public virtual void Traverse(EditorCtrlVisitor v)
 {
     //Debug.Log("遍历控件树:" + this.Caption);
     //Debug.Log("遍历控件树入参:" + v.GetType.ToString());
     if (v.PreVisit(this))
     {
         v.Visit(this);
         v.AfterVisit(this);
     }
 }
Beispiel #3
0
    public override void Traverse(EditorCtrlVisitor v)
    {
        v.PreVisit(this);

        if (children.Count >= 1)
        {
            v.PreVisitChild(this, 0);
            children[0].Traverse(v);
            v.AfterVisitChild(this, 0);
        }

        v.Visit(this);

        if (children.Count > 1)
        {
            v.PreVisitChild(this, 1);
            children[1].Traverse(v);
            v.AfterVisitChild(this, 1);
        }

        v.AfterVisit(this);
    }