示例#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();//停止移动
                        }
                    }
                }
            }
        }
示例#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();//停止移动
                    }
                }
            }
        }
示例#3
0
        private void AxisBt_MouseUp(object sender, MouseEventArgs e)
        {
            if (e.Button != MouseButtons.Left)
            {
                return;
            }
            ButtonEx bt = sender as ButtonEx;

            if (bt != null)
            {
                ProcessAxisBtClick(bt, !modeBt.Pressed);
            }
        }
示例#4
0
        private void AxisSlowJogDone(object sender, MouseEventArgs e)
        {
            if (e.Button != MouseButtons.Left)
            {
                return;
            }
            ButtonEx bt = sender as ButtonEx;

            if (bt != null)
            {
                provider = bt.Tag as IAmpCProvider;
                dir      = bt.Flag;
                wait     = true;
                waitTick = 0;
            }
        }
示例#5
0
        private void BT_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button != MouseButtons.Left)
            {
                return;
            }
            ButtonEx bt = sender as ButtonEx;

            if (bt != null && bt.Tag != null)
            {
                if (!BT5.Pressed)//低倍步进值
                {
                    provider = bt.Tag as IAmpCProvider;
                    dir      = bt.Flag;
                    wait     = true;
                    waitTick = 0;
                }
            }
        }
示例#6
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);
                    }
                }
            }
        }
示例#7
0
        private void AxisBt_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button != MouseButtons.Left)
            {
                return;
            }
            if (modeBt.Pressed)
            {
                return;
            }
            ButtonEx bt = sender as ButtonEx;

            if (bt != null)
            {
                provider = bt.Tag as IAmpCProvider;
                if (provider != null)
                {
                    provider.AxisJogDir(bt.Flag);
                }
            }
        }