示例#1
0
 public SetTrajectoryInitialNodeTool(Trajectory trajectory, TrajectoryDataControl trajectoryDataControl, NodeDataControl nodeDataControl)
 {
     this.trajectory                = trajectory;
     this.trajectoryDataControl     = trajectoryDataControl;
     this.nodeDataControl           = nodeDataControl;
     this.oldInitialNodeDataControl = trajectoryDataControl.getInitialNode();
 }
示例#2
0
 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);
 }
示例#3
0
    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);
    }