Exemplo n.º 1
0
        /// <summary>
        /// 工站归零
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void toolStripMenuItemReset_Click(object sender, EventArgs e)
        {
            if (null == _station)
            {
                MessageBox.Show("无效操作,工站未设置");
                return;
            }
            JFWorkStatus ws = _station.CurrWorkStatus;

            if (ws == JFWorkStatus.Running || ws == JFWorkStatus.Pausing || ws == JFWorkStatus.Interactiving)
            {
                JFTipsDelayClose.Show("无效操作,工站当前正在运行:" + ws, 1);
                return;
            }


            JFWorkCmdResult ret = _station.Reset();

            if (ret != JFWorkCmdResult.Success)
            {
                MessageBox.Show("启动复位失败,错误代码:" + ret);
            }
            else
            {
                ShowTips("操作信息:复位已启动");
                JFTipsDelayClose.Show("复位已启动", 1);
            }
        }