コード例 #1
0
        private void BtnInspectionPosition_Click(object sender, EventArgs e)
        {
            var pDocument = CDocument.GetDocument;

            do
            {
                if (false == pDocument.m_objConfig.GetSystemParameter().bVidiTeachMode)
                {
                    break;
                }

                CConfig.CRecipeParameter objRecipeParameter = pDocument.m_objConfig.GetRecipeParameter(( int )CDefine.enumCamera.CAMERA_1);

                string[] strButtonList = new string[objRecipeParameter.iCountInspectionPosition];
                for (int iLoopCount = 0; iLoopCount < objRecipeParameter.iCountInspectionPosition; iLoopCount++)
                {
                    strButtonList[iLoopCount] = "INSPECTION POSITION " + (iLoopCount + 1).ToString();
                }
                CDialogEnumerate objDialog = new CDialogEnumerate(objRecipeParameter.iCountInspectionPosition, strButtonList, pDocument.GetInspectionIndex());
                if (DialogResult.OK == objDialog.ShowDialog())
                {
                    pDocument.SetInspectionIndex(objDialog.GetResult());
                    //pDocument.m_objProcessMain.m_objPLC.HLWriteWordFromPLC( CDefine.enumPLCInputIndex.PLC_INSPECTION_INDEX.ToString(), ( short )( objDialog.GetResult() + 1 ) );
                }
            } while(false);
        }
コード例 #2
0
ファイル: CDialogResult.cs プロジェクト: zaros3/DeepSight
        private void BtnInspectionPosition_Click(object sender, EventArgs e)
        {
            var pDocument = CDocument.GetDocument;

            do
            {
                CConfig.CRecipeParameter objRecipeParameter = pDocument.m_objConfig.GetRecipeParameter(( int )CDefine.enumCamera.CAMERA_1);

                string[] strButtonList = new string[objRecipeParameter.iCountInspectionPosition];
                for (int iLoopCount = 0; iLoopCount < objRecipeParameter.iCountInspectionPosition; iLoopCount++)
                {
                    strButtonList[iLoopCount] = "INSPECTION POSITION " + (iLoopCount + 1).ToString();
                }
                CDialogEnumerate objDialog = new CDialogEnumerate(objRecipeParameter.iCountInspectionPosition, strButtonList, m_iPositionInspection);
                if (DialogResult.OK == objDialog.ShowDialog())
                {
                    m_iPositionInspection = objDialog.GetResult();
                }

                if (CDefine.enumResult.RESULT_OK == pDocument.GetInspectionResultAlign(m_iPositionInspection).objResultCommon.eResult)
                {
                    m_bResult = true;
                }
                else
                {
                    m_bResult = false;
                }

                SetInsepctionPosition(m_iPositionInspection, m_bResult);
            } while(false);
        }
コード例 #3
0
        private void BtnPositionCrop_Click(object sender, EventArgs e)
        {
            var pDocument = CDocument.GetDocument;

            do
            {
                CConfig.CRecipeParameter objRecipeParameter = pDocument.m_objConfig.GetRecipeParameter(( int )CDefine.enumCamera.CAMERA_1);

                if (0 >= m_objResult.objResultCommon.obj3DResultHeightData.Count)
                {
                    break;
                }
                string[] strButtonList = new string[m_objResult.objResultCommon.obj3DResultHeightData.Count];
                for (int iLoopCount = 0; iLoopCount < m_objResult.objResultCommon.obj3DResultHeightData.Count; iLoopCount++)
                {
                    strButtonList[iLoopCount] = "CROP POSITION " + (iLoopCount + 1).ToString();
                }
                CDialogEnumerate objDialog = new CDialogEnumerate(m_objResult.objResultCommon.obj3DResultHeightData.Count, strButtonList, m_iPositionCrop);
                if (DialogResult.OK == objDialog.ShowDialog())
                {
                    m_iPositionCrop = objDialog.GetResult();
                    ReloadChart();
                }
            } while(false);
        }
コード例 #4
0
        private void BtnCropPosition_Click(object sender, EventArgs e)
        {
            var pDocument = CDocument.GetDocument;

            do
            {
                CConfig.CRecipeParameter objRecipeParameter = pDocument.m_objConfig.GetRecipeParameter(( int )CDefine.enumCamera.CAMERA_1);

                string[] strButtonList = new string[objRecipeParameter.objInspectionParameter[m_iPositionInspection].iCountSerchRegion];
                for (int iLoopCount = 0; iLoopCount < objRecipeParameter.objInspectionParameter[m_iPositionInspection].iCountSerchRegion; iLoopCount++)
                {
                    strButtonList[iLoopCount] = "CROP POSITION " + (iLoopCount + 1).ToString();
                }
                CDialogEnumerate objDialog = new CDialogEnumerate(objRecipeParameter.objInspectionParameter[m_iPositionInspection].iCountSerchRegion, strButtonList, m_iPositionCrop);
                if (DialogResult.OK == objDialog.ShowDialog())
                {
                    m_iPositionCrop = objDialog.GetResult();
                    Reload();
                }
            } while(false);
        }