private void btnSaveVPP_Click(object sender, EventArgs e) { string strFName; strFName = ASDef._INI_PATH + "\\Img\\" + AVisionProBuild.ToolName(m_nType, m_nPoint, m_aCalibCheckerboard.Name) + ".bmp"; FileInfo fileDel = new FileInfo(strFName); if (fileDel.Exists) { fileDel.Delete(); } // 2017.06.08 //m_aCalibCheckerboard.Name = AVisionProBuild.MakeName("CalibCheckerboard", DateTime.Now); AVisionProBuild.SaveVpp(m_nType); strFName = ASDef._INI_PATH + "\\Img\\" + AVisionProBuild.ToolName(m_nType, m_nPoint, m_aCalibCheckerboard.Name) + ".bmp"; // 2012.01.17 //AVisionProBuild.SaveImg(strFName, cogDisplay); AVisionProBuild.SaveImg(strFName, m_cogImage); // 2012.04.24 #if (!_USE_BASLER_PYLON && !_USE_IMAGING_CONTROL) /* 2015.10.18 * if (m_aAcqFifo.AcqFifoTool.Operator != null) * { * // 2013.05.15 * if (m_aAcqFifo.GetFrameGrabberName().Contains("acA2500")) * { * AIniExposure aIniExposure = new AIniExposure(m_nType, m_nPoint); * aIniExposure.m_nExposure = Convert.ToInt64(txtExposure.Text); * aIniExposure.Write(); * } * } */ #elif _USE_BASLER_PYLON AIniExposure aIniExposure = new AIniExposure(m_nType, m_nPoint); // 2015.12.09 aIniExposure.m_dExposure = Convert.ToDouble(txtExposure.Text); if (aIniExposure.m_dExposure > 0) { aIniExposure.Write(); } #endif // 2014.10.30 #if _USE_1Camera CogSerializer.SaveObjectToFile(m_aAcqFifo.GetTool(), ASDef._INI_PATH + "\\1Camera.vpp", typeof(System.Runtime.Serialization.Formatters.Binary.BinaryFormatter), CogSerializationOptionsConstants.Minimum); #endif //MessageBox.Show("Tool is Saved!"); // 2013.12.02 MessageBox.Show(AUtil.GetXmlLanguage("Tool_is_Saved")); btnSaveVPP.Enabled = false; }
private void btnLoadInit_Click(object sender, EventArgs e) { string strFName; strFName = ASDef._INI_PATH + "\\Img\\" + AVisionProBuild.ToolName(m_nType, m_nPoint, m_aFixtureNPointToNPoint.Name) + ".bmp"; //if (AVisionProBuild.LoadImg(strFName, cogDisplay) == true) if (AVisionProBuild.LoadImg(strFName, ref m_cogImage) == true) { m_aFixtureNPointToNPoint.InputImage = m_cogImage; m_aPoint.m_strLoadFileName = strFName; } }
// 2014.03.27 private void btnLoadInit_Click(object sender, EventArgs e) { string strFName; strFName = ASDef._INI_PATH + "\\Img\\" + "Init_" + AVisionProBuild.ToolName(m_nType, m_nPoint, "FindLine") + ".bmp"; if (AVisionProBuild.LoadImg(strFName, ref m_cogImage) == true) { m_aFindEllipse.InputImage = RunCalibImage(); m_aPoint.m_strLoadFileName = strFName; lblFileName.Text = strFName; } }
private void btnSaveVPP_Click(object sender, EventArgs e) { string strFName; strFName = ASDef._INI_PATH + "\\Img\\" + AVisionProBuild.ToolName(m_nType, m_nPoint, m_aFindEllipse.Name) + ".bmp"; FileInfo fileDel = new FileInfo(strFName); if (fileDel.Exists) { fileDel.Delete(); } m_aFindEllipse.Name = AVisionProBuild.MakeName("FindEllipse", DateTime.Now); AVisionProBuild.SaveVpp(m_nType); strFName = ASDef._INI_PATH + "\\Img\\" + AVisionProBuild.ToolName(m_nType, m_nPoint, m_aFindEllipse.Name) + ".bmp"; AVisionProBuild.SaveImg(strFName, m_cogImage); // 2014.03.31 m_aIni.Write(); // 2012.04.24 #if (!_USE_BASLER_PYLON && !_USE_IMAGING_CONTROL) /* 2015.10.18 * if (m_aAcqFifo.AcqFifoTool.Operator != null) * { * // 2013.05.15 * if (m_aAcqFifo.GetFrameGrabberName().Contains("acA2500")) * { * AIniExposure aIniExposure = new AIniExposure(m_nType, m_nPoint); * aIniExposure.m_nExposure = Convert.ToInt64(txtExposure.Text); * // 2013.07.22 * if (aIniExposure.m_nExposure > 0) * aIniExposure.Write(); * } * } */ #elif _USE_BASLER_PYLON AIniExposure aIniExposure = new AIniExposure(m_nType, m_nPoint); // 2015.12.09 aIniExposure.m_dExposure = Convert.ToDouble(txtExposure.Text); if (aIniExposure.m_dExposure > 0) { aIniExposure.Write(); } #endif MessageBox.Show("Vpp is Saved!"); }
private void btnLoadInit_Click(object sender, EventArgs e) { m_aDisplay.ClearAll(); string strFName; strFName = ASDef._INI_PATH + "\\Img\\" + AVisionProBuild.ToolName(m_nType, m_nPoint, m_aCalibCheckerboard.Name) + ".bmp"; // 2011.05.07 m_aDisplay.ClearAll(); // 2012.01.17 //if (AVisionProBuild.LoadImg(strFName, cogDisplay) == true) if (AVisionProBuild.LoadImg(strFName, ref m_cogImage) == true) { // 2012.01.17 m_aDisplay.Image = m_cogImage; m_aDisplay.Display.Fit(true); m_aCalibCheckerboard.InputImage = m_aDisplay.GetImage8Grey(); m_aPoint.m_strLoadFileName = strFName; } }