コード例 #1
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;
            }
        }