Ejemplo n.º 1
0
        public static ComConnectNode SetCommand(Graph curgraph, Node node1, Node node2)
        {
            var tmp = new ComConnectNode();

            tmp._graph = curgraph;
            tmp._node1 = node1;
            tmp._node2 = node2;
            return(tmp);
        }
Ejemplo n.º 2
0
        public void ConnectNodes(Node node1, Node node2)
        {
            if (node1.Path.ContainsKey(node2.ID))
            {
                UnconnectNodes(node1, node2);
                return;
            }
            NewOperation();
            var com = ComConnectNode.SetCommand(this, node1, node2);

            com.Execute();
            history.Add(com);
        }