Exemplo n.º 1
0
 public TreeGraphNode(TreeGraph tree, object value, TreeGraphNode parent)
     : base(tree, value)
 {
     this.Parent = parent;
     this.Children = new List<ITreeNode>();
     //parent.AddChild( this );
 }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
        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();
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        public override object Clone()
        {
            TreeGraph t = new TreeGraph();

            this.CopyTo(t);

            return t;
        }
Exemplo n.º 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);
        }
Exemplo n.º 7
0
 public MarkingTreeNode(TreeGraph tree, string markingName, MarkingTreeNode parent, uint[] marking)
     : base(tree, markingName, parent)
 {
     this.Marking = marking;
     this.Status = MarkingNodeStatus.Boundary;
 }