示例#1
0
        public ATbCalibNPointToNPoint(int nType, int nPoint, int nToolIndex)
        {
            InitializeComponent();
            cogDisplayStatusBar.Display = cogDisplay;
            m_aPoint     = AVisionProBuild.GetPoint(nType, nPoint);
            m_nType      = nType;
            m_nPoint     = nPoint;
            m_nToolIndex = nToolIndex;

            // 2014.10.30
#if (!_USE_BASLER_PYLON && !_USE_IMAGING_CONTROL && !_USE_1Camera)
            if (m_aPoint.GetToolCount("AcqFifo") > 0)
#endif
            {
                // 2014.10.30
#if (!_USE_BASLER_PYLON && !_USE_IMAGING_CONTROL && !_USE_1Camera)
                m_aAcqFifo = m_aPoint.GetTool("AcqFifo", 0) as AAcqFifo;
#elif _USE_1Camera
                m_aAcqFifo = AVisionProBuild.GetAcq();
#endif
            }

            // 2016.07.29
            if (m_aPoint.GetToolCount("CalibNPointToNPoint") > m_nToolIndex)
            {
                m_aCalibNPointToNPoint = m_aPoint.GetTool("CalibNPointToNPoint", m_nToolIndex) as ACalibNPointToNPoint;
            }
            else
            {
                m_aCalibNPointToNPoint = new ACalibNPointToNPoint();

                m_aCalibNPointToNPoint.Name = AVisionProBuild.MakeName("CalibNPointToNPoint", DateTime.Now);
                m_aPoint.Add("CalibNPointToNPoint", m_aCalibNPointToNPoint);
            }

            m_aDisplay    = new ADisplay(cogDisplay, "");
            lblTitle.Text = AVisionProBuild.GetTypeName(m_nType) + " [" + m_aPoint.Name + "]";

            //m_aDisplay.Display.Image = m_aCalibNPointToNPoint.InputImage;
            //m_aDisplay.Display.Fit(true);
            InitLanguage();
            // 2011.10.07 위치이동
            InitializeCalibration();
        }
示例#2
0
        private void btnSaveVpp_Click(object sender, EventArgs e)
        {
            if (lstvwType.FocusedItem == null)
            {
                //MessageBox.Show("Type이 선택되지 않았습니다. Type을 선택 하세요!");
                // 2013.12.02
                MessageBox.Show(AUtil.GetXmlLanguage("Type_Not_Select"));
                return;
            }

            int nType = lstvwType.FocusedItem.Index;

            if (AVisionProBuild.SaveVpp(nType) == true)
            {
                AVisionProBuild.SaveType();

                MessageBox.Show(AVisionProBuild.GetTypeName(nType) + ".Vpp is Saved!");
            }
        }