/// <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.AddNode(m_NodeVM); m_FlowGraphVM.AddConnections(connList); }
/// <summary> /// /// </summary> public void Redo() { m_FlowGraphVM.AddNode(m_NodeVM); }