public TreeGraphNode(TreeGraph tree, object value, TreeGraphNode parent)
     : base(tree, value)
 {
     this.Parent = parent;
     this.Children = new List<ITreeNode>();
     //parent.AddChild( this );
 }
Exemple #2
0
        public TreeEnum(TreeGraph treeGraph)
        {
            this.treeGraph = treeGraph;
            passed = new List<ITreeNode>();
            this.TraversalMethod = TraversalMethods.PreOrderWalk;

            this.Current = this.treeGraph.Root;
            passed.Add(this.Current);
        }
        public TreeGraphView(Control control, TreeGraph tree = null)
            : base(control)
        {
            Controllers.Clear();
            Controllers.Add(new TreeGraphViewController(this, "MainController"));

            if (tree != null)
                this.Tree = tree;

            this.Control.MouseWheel += new MouseEventHandler(Control_MouseWheel);

            MainController.ViewLoad();
        }
        public TreeGraphWrapper(TreeGraph tree = null)
            : base()
        {
            if (tree == null)
                this.Graph = new TreeGraph();
            else
            {
                this.Graph = tree;

                this.Tree.GetVertices().ForEach(v => this.VertexWrappers.Add(new TreeNodeWrapper(this, v as TreeGraphNode)));
                this.Tree.GetEdges().ForEach(e => this.ArcWrappers.Add(new WFArcWrapper(this, e as Arc)));
            }
            this.RootPosition = new PointF();

            TreeGraphWrapper.SetDefaultEventHandlers(this);
        }
Exemple #5
0
        public override object Clone()
        {
            TreeGraph t = new TreeGraph();

            this.CopyTo(t);

            return t;
        }
Exemple #6
0
        public static void SetDefaultEventHandlers( TreeGraph tree )
        {
            DirectedGraph.SetDefaultEventHandlers( tree );

            tree.OnAddEdge += new EventHandler<EdgesModifiedEventArgs>(tree.tree_OnAddEdge);
            tree.OnRemoveVertex += new EventHandler<VerticesModifiedEventArgs>(tree.tree_OnRemoveVertex);
            tree.OnRemoveEdge += new EventHandler<EdgesModifiedEventArgs>(tree.tree_OnRemoveEdge);
            tree.OnVertexAdded += new EventHandler<VerticesModifiedEventArgs>(tree.tree_OnVertexAdded);
        }
 public MarkingTreeNode(TreeGraph tree, string markingName, MarkingTreeNode parent, uint[] marking)
     : base(tree, markingName, parent)
 {
     this.Marking = marking;
     this.Status = MarkingNodeStatus.Boundary;
 }