public MoveToLocationCmd(RunnableModule runnableModule, MoveToLocationCmdLine moveToLocationCmdLine) : base(runnableModule, moveToLocationCmdLine) { FluidProgram program = runnableModule.CommandsModule.program; UserPosition up = program.UserPositions.Find(x => x.Name == moveToLocationCmdLine.PositionName); if (up == null) { throw new Exception(moveToLocationCmdLine.PositionName + " is not defined in system."); } position = new PointD(up.Position); this.PosZ = up.PosZ; MoveType = moveToLocationCmdLine.MoveType; }
public EditMoveLocMetro(FluidProgram program, MoveToLocationCmdLine moveToLocationCmdLine) { InitializeComponent(); this.program = program; if (moveToLocationCmdLine == null) { isCreating = true; this.moveToLocationCmdLine = new MoveToLocationCmdLine(); } else { isCreating = false; this.moveToLocationCmdLine = moveToLocationCmdLine; } //this.ReadLanguageResources(); refreshList(); if (this.moveToLocationCmdLine != null) { this.moveToLocationCmdLineBackUp = (MoveToLocationCmdLine)this.moveToLocationCmdLine.Clone(); } }