/// <summary> /// /// </summary> public void Redo() { m_FlowGraphVM.Network.Nodes.AddRange(m_NodesVM); List <ConnectionViewModel> connList = new List <ConnectionViewModel>(); for (int i = 0; i < m_ConnectionInfoList.Count; i++) { connList.Add(m_ConnectionInfoList[i].ConnectionVM); } m_FlowGraphVM.AddConnections(connList); }
/// <summary> /// /// </summary> public void Undo() { List <ConnectionViewModel> connList = new List <ConnectionViewModel>(); for (int i = 0; i < m_ConnectionInfoList.Count; i++) { ConnectionViewModel copy = new ConnectionViewModel(); copy.DestConnector = m_ConnectionInfoList[i].DestConnector; copy.DestConnectorHotspot = m_ConnectionInfoList[i].DestConnectorHotspot; copy.Points = m_ConnectionInfoList[i].Points; copy.SourceConnector = m_ConnectionInfoList[i].SourceConnector; copy.SourceConnectorHotspot = m_ConnectionInfoList[i].SourceConnectorHotspot; connList.Add(copy); ConnectionInfo inf = m_ConnectionInfoList[i]; inf.ConnectionVM = copy; m_ConnectionInfoList[i] = inf; } m_FlowGraphVM.AddConnections(connList); }
/// <summary> /// /// </summary> public void Redo() { m_FlowGraphVM.AddConnections(m_ConnectionsVM); }