public SetTrajectoryInitialNodeTool(Trajectory trajectory, TrajectoryDataControl trajectoryDataControl, NodeDataControl nodeDataControl) { this.trajectory = trajectory; this.trajectoryDataControl = trajectoryDataControl; this.nodeDataControl = nodeDataControl; this.oldInitialNodeDataControl = trajectoryDataControl.getInitialNode(); }
public DeleteTrajectoryNodeTool(DataControl dataControl, Trajectory trajectory, TrajectoryDataControl trajectoryDataControl) { this.oldNodeDataControl = (NodeDataControl)dataControl; this.trajectory = trajectory; this.trajectoryDataControl = trajectoryDataControl; this.oldSides = new List <SideDataControl>(); this.wasInitial = (trajectoryDataControl.getInitialNode() == oldNodeDataControl); }
public override bool undoTool() { nodeDataControl.setInitial(false); trajectoryDataControl.initialNode = oldInitialNodeDataControl; if (trajectoryDataControl.initialNode != null) { trajectory.setInitial(trajectoryDataControl.getInitialNode().getID()); trajectoryDataControl.initialNode.setInitial(true); } else { trajectory.setInitial(""); } Controller.getInstance().updatePanel(); return(true); }