コード例 #1
0
        //---------------------------------------------------------------------------
        private void fn_tmOnShot(object sender, EventArgs e)
        {
            //
            if (SEQ._bRun)
            {
                m_nOneShotTag           = -1;
                m_OnShotTimer.IsEnabled = false;
                return;
            }

            //
            switch ((EN_SEQ_ID)m_nOneShotTag)
            {
            case EN_SEQ_ID.SPINDLE:
                if (!FM.m_stMasterOpt.bAutoOff[(int)EN_SEQ_ID.SPINDLE])
                {
                    SEQ_SPIND.fn_AutoRun();
                }
                break;

            case EN_SEQ_ID.POLISH:
                if (!FM.m_stMasterOpt.bAutoOff[(int)EN_SEQ_ID.POLISH])
                {
                    SEQ_POLIS.fn_AutoRun();
                }
                break;

            case EN_SEQ_ID.CLEAN:
                if (!FM.m_stMasterOpt.bAutoOff[(int)EN_SEQ_ID.CLEAN])
                {
                    SEQ_CLEAN.fn_AutoRun();
                }
                break;

            case EN_SEQ_ID.STORAGE:
                if (!FM.m_stMasterOpt.bAutoOff[(int)EN_SEQ_ID.STORAGE])
                {
                    SEQ_STORG.fn_AutoRun();
                }
                break;

            case EN_SEQ_ID.TRANSFER:
                if (!FM.m_stMasterOpt.bAutoOff[(int)EN_SEQ_ID.TRANSFER])
                {
                    SEQ_TRANS.fn_AutoRun();
                }
                break;

            case EN_SEQ_ID.SYSTEM:
                break;

            case EN_SEQ_ID.ALL:
                if (!FM.m_stMasterOpt.bAutoOff[(int)EN_SEQ_ID.SPINDLE])
                {
                    SEQ_SPIND.fn_AutoRun();
                }
                if (!FM.m_stMasterOpt.bAutoOff[(int)EN_SEQ_ID.POLISH])
                {
                    SEQ_POLIS.fn_AutoRun();
                }
                if (!FM.m_stMasterOpt.bAutoOff[(int)EN_SEQ_ID.CLEAN])
                {
                    SEQ_CLEAN.fn_AutoRun();
                }
                if (!FM.m_stMasterOpt.bAutoOff[(int)EN_SEQ_ID.STORAGE])
                {
                    SEQ_STORG.fn_AutoRun();
                }
                if (!FM.m_stMasterOpt.bAutoOff[(int)EN_SEQ_ID.TRANSFER])
                {
                    SEQ_TRANS.fn_AutoRun();
                }

                break;

            default:
                break;
            }

            m_nOneShotTag           = -1;
            m_OnShotTimer.IsEnabled = false;
        }
コード例 #2
0
        //---------------------------------------------------------------------------
        private void btOnShot1_Click(object sender, MouseButtonEventArgs e)
        {
            //
            if (SEQ._bRun)
            {
                MessageBox.Show("Can not use during run.", "WARNING", MessageBoxButton.OK, MessageBoxImage.Warning);
            }

            //One Shot
            Button selbtn = sender as Button;
            int    nTag   = Convert.ToInt32(selbtn.Tag);

            if (nTag < 0)
            {
                return;
            }

            //m_nOneShotTag = nTag;
            //m_OnShotTimer.IsEnabled = true;

            //
            switch ((EN_SEQ_ID)nTag)
            {
            case EN_SEQ_ID.SPINDLE:
                if (!FM.m_stMasterOpt.bAutoOff[(int)EN_SEQ_ID.SPINDLE])
                {
                    SEQ_SPIND.fn_AutoRun();
                }
                break;

            case EN_SEQ_ID.POLISH:
                if (!FM.m_stMasterOpt.bAutoOff[(int)EN_SEQ_ID.POLISH])
                {
                    SEQ_POLIS.fn_AutoRun();
                }
                break;

            case EN_SEQ_ID.CLEAN:
                if (!FM.m_stMasterOpt.bAutoOff[(int)EN_SEQ_ID.CLEAN])
                {
                    SEQ_CLEAN.fn_AutoRun();
                }
                break;

            case EN_SEQ_ID.STORAGE:
                if (!FM.m_stMasterOpt.bAutoOff[(int)EN_SEQ_ID.STORAGE])
                {
                    SEQ_STORG.fn_AutoRun();
                }
                break;

            case EN_SEQ_ID.TRANSFER:
                if (!FM.m_stMasterOpt.bAutoOff[(int)EN_SEQ_ID.TRANSFER])
                {
                    SEQ_TRANS.fn_AutoRun();
                }
                break;

            case EN_SEQ_ID.SYSTEM:
                SEQ.fn_CheckRunCon();
                break;

            case EN_SEQ_ID.ALL:
                if (!FM.m_stMasterOpt.bAutoOff[(int)EN_SEQ_ID.SPINDLE])
                {
                    SEQ_SPIND.fn_AutoRun();
                }
                if (!FM.m_stMasterOpt.bAutoOff[(int)EN_SEQ_ID.POLISH])
                {
                    SEQ_POLIS.fn_AutoRun();
                }
                if (!FM.m_stMasterOpt.bAutoOff[(int)EN_SEQ_ID.CLEAN])
                {
                    SEQ_CLEAN.fn_AutoRun();
                }
                if (!FM.m_stMasterOpt.bAutoOff[(int)EN_SEQ_ID.STORAGE])
                {
                    SEQ_STORG.fn_AutoRun();
                }
                if (!FM.m_stMasterOpt.bAutoOff[(int)EN_SEQ_ID.TRANSFER])
                {
                    SEQ_TRANS.fn_AutoRun();
                }
                break;

            default:
                break;
            }
        }