public EditMoveAbsXyForm1(MoveAbsXyCmdLine moveAbsXyCmdLine) : base(new PointD(0, 0)) { InitializeComponent(); this.ReadLanguageResources(); if (moveAbsXyCmdLine == null) { isCreating = true; this.moveAbsXyCmdLine = new MoveAbsXyCmdLine(); this.moveAbsXyCmdLine.Position.X = Properties.Settings.Default.absX; this.moveAbsXyCmdLine.Position.Y = Properties.Settings.Default.absY; } else { isCreating = false; this.moveAbsXyCmdLine = moveAbsXyCmdLine; } switch (this.moveAbsXyCmdLine.MoveType) { case MoveType.CAMERA: rbCamera.Checked = true; break; case MoveType.LASER: rbLaser.Checked = true; break; case MoveType.NEEDLE1: rbNeedle1.Checked = true; break; case MoveType.NEEDLE2: rbNeedle2.Checked = true; break; } tbX.Text = this.moveAbsXyCmdLine.Position.X.ToString("0.000"); tbY.Text = this.moveAbsXyCmdLine.Position.Y.ToString("0.000"); if (Machine.Instance.Setting.ValveSelect == ValveSelection.单阀) { rbNeedle2.Enabled = false; } if (this.moveAbsXyCmdLine != null) { this.moveAbsXyCmdLineBackUp = (MoveAbsXyCmdLine)this.moveAbsXyCmdLine.Clone(); } }
public MoveAbsXyCmd(RunnableModule runnableModule, MoveAbsXyCmdLine moveAbsXyCmdLine) : base(runnableModule, moveAbsXyCmdLine) { MoveType = moveAbsXyCmdLine.MoveType; position = new PointD(moveAbsXyCmdLine.Position.X, moveAbsXyCmdLine.Position.Y); }