Beispiel #1
0
        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();//停止移动
                        }
                    }
                }
            }
        }
Beispiel #2
0
        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();//停止移动
                    }
                }
            }
        }
Beispiel #3
0
        private void ProcessAxisBtClick(ButtonEx bt, bool dirMode)
        {
            IAmpCProvider ampC = bt.Tag as IAmpCProvider;

            if (ampC != null)
            {
                if (dirMode)
                {
                    ampC.JogStop();
                }
                else
                {
                    if (ampC.IsInPosition)
                    {
                        Common.AxisJogStep(ampC, bt.Flag);
                    }
                }
            }
        }
Beispiel #4
0
        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
            {

            }
        }