GitHubDashboard/FDG/Diagram.cs
/// <summary>
/// Adds the specified Node to this Diagram.
/// </summary>
/// <param name="node">The Node to add to the diagram.</param>
/// <returns>True if the node was added, false if the node is already on this Diagram.</returns>
Adds the specified Node to this Diagram.
Adds the specified Node to this Diagram .
public bool AddNode(Node node)
		{
			bool ret = false;
			if (node == null) throw new ArgumentNullException("node");
			if (!nodes.Contains(node))
			{
				nodes.Add(node);
				node.Diagram = this;
				layout.Add(new NodeLayoutInfo(node, new Vector(), node.Location));
				foreach (Node child in node.Connections)
				{
					AddNode(child);
				}
				ret = true;
			}
			return ret;
		}
public bool AddNode ( Node node ) { bool ret = false ; if ( node == null ) throw new ArgumentNullException ( " " ) ; if ( ! nodes . Contains ( node ) ) { nodes . Add ( node ) ; node . Diagram = this ; layout . Add ( new NodeLayoutInfo ( node , new Vector ( ) , node . Location ) ) ; foreach ( Node child in node . Connections ) { AddNode ( child ) ; } ret = true ; } return ret ; }
Adds the specified Node to this Diagram.
Adds the specified Node to this Diagram .
// add node, associate with diagram, then add all connected nodes
True if the node was added, false if the node is already on this Diagram.
True if the node was added false if the node is already on this Diagram .
node
Node
The Node to add to the diagram.
The Node to add to the diagram .