private void AxisSlowJogStop(object sender, MouseEventArgs e) { if (e.Button != MouseButtons.Left) { return; } ButtonEx bt = sender as ButtonEx; if (bt != null && bt.Tag != null) { IAmpCProvider provider = bt.Tag as IAmpCProvider; if (provider != null) { if (wait) { provider.JogInc(provider.Param.JogVelSlow, provider.Param.JogAccSlow, 0.001f * bt.Flag); wait = false; } else { provider.JogStop();//停止移动 } } } }
private void BT_MouseUp(object sender, MouseEventArgs e) { ButtonEx bt = sender as ButtonEx; if (bt != null && bt.Tag != null) { IAmpCProvider provider = bt.Tag as IAmpCProvider; if (provider != null) { if (BT5.Pressed) { Common.AxisJogStep(provider, bt.Flag); } else { if (wait) { provider.JogInc(provider.Param.JogVelSlow, provider.Param.JogAccSlow, 0.001f * bt.Flag); wait = false; } else { provider.JogStop();//停止移动 } } } } }
private void AxisButton_MouseUp(object sender, MouseEventArgs e) { ButtonEx bt = sender as ButtonEx; IAmpCProvider ampc = bt.Tag as IAmpCProvider; if (ampc == Common.X_Axis) { if (!xStepMode) { ampc.JogStop(); } else { if (ampc.IsInPosition) { ampc.JogInc(xSpeed.Value, xAcc.Value, xStep.Value); } else { Common.ReportCmdKeyProgress(CmdKey.S0014); } } } else if (ampc == Common.Y_Axis) { if (!yStepMode) { ampc.JogStop(); } else { if (ampc.IsInPosition) { ampc.JogInc(ySpeed.Value, yAcc.Value, yStep.Value); } else { Common.ReportCmdKeyProgress(CmdKey.S0014); } } } else if (ampc == Common.Z_Axis) { if (!zStepMode) { ampc.JogStop(); } else { if (ampc.IsInPosition) { ampc.JogInc(zSpeed.Value, zAcc.Value, zStep.Value); } else { Common.ReportCmdKeyProgress(CmdKey.S0014); } } } else if (ampc == Common.T_Axis) { if (!tStepMode) { ampc.JogStop(); } else { if (ampc.IsInPosition) { ampc.JogInc(tSpeed.Value, tAcc.Value, tStep.Value); } else { Common.ReportCmdKeyProgress(CmdKey.S0014); } } } else { } }