///<summary> ///写入xml文件参数 ///</summary> private bool WriteParams() { try { XmlRW.Update("Parameters/Standards/standard_in_AC_min", TextBox_ACInMin.Text); XmlRW.Update("Parameters/Standards/standard_in_AC_max", TextBox_ACInMax.Text); XmlRW.Update("Parameters/Standards/standard_in_CS_min", TextBox_CSInMin.Text); XmlRW.Update("Parameters/Standards/standard_in_CS_max", TextBox_CSInMax.Text); XmlRW.Update("Parameters/Standards/standard_in_AS_min", TextBox_ASInMin.Text); XmlRW.Update("Parameters/Standards/standard_in_AS_max", TextBox_ASInMax.Text); XmlRW.Update("Parameters/Standards/standard_in_SS_min", TextBox_SSInMin.Text); XmlRW.Update("Parameters/Standards/standard_in_SS_max", TextBox_SSInMax.Text); XmlRW.Update("Parameters/Standards/standard_out_AC_min", TextBox_ACOutMin.Text); XmlRW.Update("Parameters/Standards/standard_out_AC_max", TextBox_ACOutMax.Text); XmlRW.Update("Parameters/Standards/standard_out_CS_min", TextBox_CSOutMin.Text); XmlRW.Update("Parameters/Standards/standard_out_CS_max", TextBox_CSOutMax.Text); XmlRW.Update("Parameters/Standards/standard_out_AS_min", TextBox_ASOutMin.Text); XmlRW.Update("Parameters/Standards/standard_out_AS_max", TextBox_ASOutMax.Text); XmlRW.Update("Parameters/Standards/standard_out_SS_min", TextBox_SSOutMin.Text); XmlRW.Update("Parameters/Standards/standard_out_SS_max", TextBox_SSOutMax.Text); return(true); } catch (Exception) { return(false); } }
///<summary> ///写入xml文件参数 ///</summary> public bool WriteParams(String xmlNode) { try { string shv_MeasureRow1 = "Parameters/" + xmlNode + "/hv_MeasureRow1"; string shv_MeasureColumn1 = "Parameters/" + xmlNode + "/hv_MeasureColumn1"; string shv_MeasureRow2 = "Parameters/" + xmlNode + "/hv_MeasureRow2"; string shv_MeasureColumn2 = "Parameters/" + xmlNode + "/hv_MeasureColumn2"; string shv_MeasureLength1 = "Parameters/" + xmlNode + "/hv_MeasureLength1"; string shv_MeasureSigma = "Parameters/" + xmlNode + "/hv_MeasureSigma"; string shv_MeasureThreshold = "Parameters/" + xmlNode + "/hv_MeasureThreshold"; string shv_MeasureInterpolation = "Parameters/" + xmlNode + "/hv_MeasureInterpolation"; string shv_MeasureTransition = "Parameters/" + xmlNode + "/hv_MeasureTransition"; string shv_MeasureSelect = "Parameters/" + xmlNode + "/hv_MeasureSelect"; string shv_MeasurePointsNum = "Parameters/" + xmlNode + "/hv_MeasurePointsNum"; string shv_MeasureMinScore = "Parameters/" + xmlNode + "/hv_MeasureMinScore"; string shv_MeasureNumInstances = "Parameters/" + xmlNode + "/hv_MeasureNumInstances"; string shv_MeasureDistThreshold = "Parameters/" + xmlNode + "/hv_MeasureDistThreshold"; string shv_MaxNumIterations = "Parameters/" + xmlNode + "/hv_MaxNumIterations"; string shv_MeasureIORegions = "Parameters/" + xmlNode + "/hv_MeasureIORegions"; string shv_ImageProcessing = "Parameters/" + xmlNode + "/hv_ImageProcessing"; string shv_MaskWidth = "Parameters/" + xmlNode + "/hv_MaskWidth"; string shv_MaskHeight = "Parameters/" + xmlNode + "/hv_MaskHeight"; string shv_MaskType = "Parameters/" + xmlNode + "/hv_MaskType"; string shv_Radius = "Parameters/" + xmlNode + "/hv_Radius"; string shv_MaskSize = "Parameters/" + xmlNode + "/hv_MaskSize"; string shv_FilterMask = "Parameters/" + xmlNode + "/hv_FilterMask"; string shv_MultImage_Mult = "Parameters/" + xmlNode + "/hv_MultImage_Mult"; string shv_AddImage_Mult = "Parameters/" + xmlNode + "/hv_AddImage_Mult"; string shv_ScaleImage_Add = "Parameters/" + xmlNode + "/hv_ScaleImage_Add"; string shv_ScaleImage_Mult = "Parameters/" + xmlNode + "/hv_ScaleImage_Mult"; xmlRW.Update(shv_MeasureRow1, hv_MeasureRow1.ToString()); xmlRW.Update(shv_MeasureColumn1, hv_MeasureColumn1.ToString()); xmlRW.Update(shv_MeasureRow2, hv_MeasureRow2.ToString()); xmlRW.Update(shv_MeasureColumn2, hv_MeasureColumn2.ToString()); xmlRW.Update(shv_MeasureLength1, hv_MeasureLength1.ToString()); xmlRW.Update(shv_MeasureSigma, hv_MeasureSigma.ToString()); xmlRW.Update(shv_MeasureThreshold, hv_MeasureThreshold.ToString()); xmlRW.Update(shv_MeasureInterpolation, hv_MeasureInterpolation); xmlRW.Update(shv_MeasureTransition, hv_MeasureTransition); xmlRW.Update(shv_MeasureSelect, hv_MeasureSelect); xmlRW.Update(shv_MeasurePointsNum, hv_MeasurePointsNum.ToString()); xmlRW.Update(shv_MeasureMinScore, hv_MeasureMinScore.ToString()); xmlRW.Update(shv_MeasureNumInstances, hv_MeasureNumInstances.ToString()); xmlRW.Update(shv_MeasureDistThreshold, hv_MeasureDistThreshold.ToString()); xmlRW.Update(shv_MaxNumIterations, hv_MaxNumIterations.ToString()); xmlRW.Update(shv_MeasureIORegions, hv_MeasureIORegions); xmlRW.Update(shv_ImageProcessing, hv_ImageProcessing); xmlRW.Update(shv_MaskWidth, hv_MaskWidth.ToString()); xmlRW.Update(shv_MaskHeight, hv_MaskHeight.ToString()); xmlRW.Update(shv_MaskType, hv_MaskType); xmlRW.Update(shv_Radius, hv_Radius.ToString()); xmlRW.Update(shv_MaskSize, hv_MaskSize.ToString()); xmlRW.Update(shv_FilterMask, hv_FilterMask); xmlRW.Update(shv_MultImage_Mult, hv_MultImage_Mult.ToString()); xmlRW.Update(shv_AddImage_Mult, hv_AddImage_Mult.ToString()); xmlRW.Update(shv_ScaleImage_Add, hv_ScaleImage_Add.ToString()); xmlRW.Update(shv_ScaleImage_Mult, hv_ScaleImage_Mult.ToString()); return(true); } catch (Exception) { return(false); } }