コード例 #1
0
        private void btGoClick(object sender, EventArgs e)
        {
            //Button Bt = sender as Button;
            //uint uPstnNo = (uint)Bt.Tag;
            if (!ML.MT_GetStop(m_uMotrId))
            {
                ML.MT_Stop(m_uMotrId);
            }

            int  iBtnTag = Convert.ToInt32(((Button)sender).Tag);
            uint uPstnNo = (uint)iBtnTag;

            bool bRet = true;

            if (Log.ShowMessageModal("Confirm", "Do you want to Part Move?") != DialogResult.Yes)
            {
                return;
            }
            //if (MessageBox.Show(new Form{TopMost = true},"Part를 이동하시겠습니까?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) return;

            if (CheckSafe != null)
            {
                if (!CheckSafe((mi)m_uMotrId, (pv)uPstnNo))
                {
                    bRet = false;
                }
            }
            //if(m_uMotrId == (int)mi.IDX_X) bRet = SEQ.IDX.CheckSafe((mi)m_uMotrId, uPstnNo);

            if (!bRet)
            {
                return;
            }
            ML.MT_GoAbsRun(m_uMotrId, PM.GetValue(m_uMotrId, uPstnNo), PM.GetValueSpdPer(m_uMotrId, uPstnNo));
        }