/// <summary> /// Called when the user has finished dragging out the new connection. /// </summary> public void ConnectionDragCompleted(ConnectionViewModel newConnection, ConnectorViewModel connectorDraggedOut, ConnectorViewModel connectorDraggedOver) { if (connectorDraggedOver == null || connectorDraggedOut.IsChoice == connectorDraggedOver.IsChoice || connectorDraggedOut.ParentNode == connectorDraggedOver.ParentNode) { // // The connection was unsuccessful. // Maybe the user dragged it out and dropped it in empty space. // DlgModel.Network.Connections.Remove(newConnection); return; } // // Finalize the connection by attaching it to the connector // that the user dropped the connection on. // newConnection.DestConnector = connectorDraggedOver; }
public SetChoiceDestUndoableCommand(ConnectorViewModel destConnector, ConnectionViewModel connection, DialogueChoice choice) { _destConnector = destConnector; _connection = connection; _choice = choice; }
public void Undo() { _dialogue.RemoveChoice(_connector.DialogueChoice); _outgoingConnectors.Remove(_connector); _connector = null; }
public SetConnectorContentUndoableCommand(string newContent, ConnectorViewModel connector) { _newContent = newContent; _connector = connector; _oldContent = _connector.Content; }
public void Execute() { _connector = new ConnectorViewModel(_cmdExec, _dialogue.AddChoice(_dialogueEntry, _content), _node); _outgoingConnectors.Add(_connector); }