|  | @@ -1,10 +1,4 @@
 | 
	
		
			
				|  |  |  using OTSDataType;
 | 
	
		
			
				|  |  | -using OTSModelSharp;
 | 
	
		
			
				|  |  | -using System;
 | 
	
		
			
				|  |  | -using System.Collections.Generic;
 | 
	
		
			
				|  |  | -using System.Linq;
 | 
	
		
			
				|  |  | -using System.Text;
 | 
	
		
			
				|  |  | -using System.Threading.Tasks;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  namespace OTSModelSharp.ResourceManage
 | 
	
		
			
				|  |  |  {
 | 
	
	
		
			
				|  | @@ -103,19 +97,19 @@ namespace OTSModelSharp.ResourceManage
 | 
	
		
			
				|  |  |          MEASURE_RESULTS = 7,
 | 
	
		
			
				|  |  |          MAX = 7
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | -   public  class ResourceData
 | 
	
		
			
				|  |  | +    public class ResourceData
 | 
	
		
			
				|  |  |      {
 | 
	
		
			
				|  |  | -        public void  LoadXmlData()
 | 
	
		
			
				|  |  | +        public void LoadXmlData()
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  |              XmlResourceData.GetInstance().LoadStringFromXml();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          public static string GetStopModeIdString(otsdataconst.OTS_MEASURE_STOP_MODE a_nStopMode)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -           
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              string strStopModeId = "";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            if (a_nStopMode >= otsdataconst.OTS_MEASURE_STOP_MODE.MIN && a_nStopMode <= otsdataconst.OTS_MEASURE_STOP_MODE.MAX)
 | 
	
		
			
				|  |  | +            if (a_nStopMode >= otsdataconst.OTS_MEASURE_STOP_MODE.CoverMode && a_nStopMode <= otsdataconst.OTS_MEASURE_STOP_MODE.TimeMode)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  strStopModeId = XmlResourceData.GetInstance().GetStringByKey(ResourceID.GrpOtherParam, ResourceID.IDS_SCANSTOPMODE + (int)a_nStopMode);
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -126,10 +120,10 @@ namespace OTSModelSharp.ResourceManage
 | 
	
		
			
				|  |  |          // get scan speed
 | 
	
		
			
				|  |  |          public static string GetScanSpeedString(otsdataconst.OTS_THREE_TIES_OPTIONS a_nScanSpeed)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -           
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              string strScanSpeedId = "";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            if (a_nScanSpeed >= otsdataconst.OTS_THREE_TIES_OPTIONS.MIN && a_nScanSpeed <= otsdataconst.OTS_THREE_TIES_OPTIONS.MAX)
 | 
	
		
			
				|  |  | +            if (a_nScanSpeed >= otsdataconst.OTS_THREE_TIES_OPTIONS.TIE1 && a_nScanSpeed <= otsdataconst.OTS_THREE_TIES_OPTIONS.TIE3)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  strScanSpeedId = XmlResourceData.GetInstance().GetStringByKey(ResourceID.GrpOtherParam, ResourceID.IDS_SCANSPEED + (int)a_nScanSpeed);
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -140,10 +134,10 @@ namespace OTSModelSharp.ResourceManage
 | 
	
		
			
				|  |  |          // get image size id
 | 
	
		
			
				|  |  |          public static string GetImageSizeIdString(otsdataconst.OTS_FIVE_TIES_OPTIONS a_nImageSize)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -           
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              string strImageSizeId = "";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            if (a_nImageSize >= otsdataconst.OTS_FIVE_TIES_OPTIONS.MIN && a_nImageSize <= otsdataconst.OTS_FIVE_TIES_OPTIONS.MAX)
 | 
	
		
			
				|  |  | +            if (a_nImageSize >= otsdataconst.OTS_FIVE_TIES_OPTIONS.TIE1 && a_nImageSize <= otsdataconst.OTS_FIVE_TIES_OPTIONS.TIE7)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  strImageSizeId = XmlResourceData.GetInstance().GetStringByKey(ResourceID.GrpOtherParam, ResourceID.IDS_SCANSIZE + (int)a_nImageSize);
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -153,10 +147,8 @@ namespace OTSModelSharp.ResourceManage
 | 
	
		
			
				|  |  |          // get image mode id
 | 
	
		
			
				|  |  |          public static string GetGetImageIdString(otsdataconst.OTS_GET_IMAGE_MODE a_nGetImageMode)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -           
 | 
	
		
			
				|  |  |              string strGetImageId = "";
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -            if (a_nGetImageMode >= otsdataconst.OTS_GET_IMAGE_MODE.MIN && a_nGetImageMode <= otsdataconst.OTS_GET_IMAGE_MODE.MAX)
 | 
	
		
			
				|  |  | +            if (a_nGetImageMode >= otsdataconst.OTS_GET_IMAGE_MODE.FROM_CENTER && a_nGetImageMode <= otsdataconst.OTS_GET_IMAGE_MODE.RANDOM)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  strGetImageId = XmlResourceData.GetInstance().GetStringByKey(ResourceID.GrpOtherParam, ResourceID.IDS_FETCHIMAGEMODE + (int)a_nGetImageMode);
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -167,10 +159,10 @@ namespace OTSModelSharp.ResourceManage
 | 
	
		
			
				|  |  |          // get XRay analysis speed id
 | 
	
		
			
				|  |  |          public static string GetXRayAnalySpeedIdString(otsdataconst.OTS_THREE_TIES_OPTIONS a_nXRayAnalySpeed)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -           
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              string strXRayAnalySpeedId = "";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            if (a_nXRayAnalySpeed >= otsdataconst.OTS_THREE_TIES_OPTIONS.MIN && a_nXRayAnalySpeed <= otsdataconst.OTS_THREE_TIES_OPTIONS.MAX)
 | 
	
		
			
				|  |  | +            if (a_nXRayAnalySpeed >= otsdataconst.OTS_THREE_TIES_OPTIONS.TIE1 && a_nXRayAnalySpeed <= otsdataconst.OTS_THREE_TIES_OPTIONS.TIE3)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  strXRayAnalySpeedId = XmlResourceData.GetInstance().GetStringByKey(ResourceID.GrpOtherParam, ResourceID.IDS_ANALYSPEED + (int)a_nXRayAnalySpeed);
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -181,10 +173,10 @@ namespace OTSModelSharp.ResourceManage
 | 
	
		
			
				|  |  |          // get XRay scan mode id
 | 
	
		
			
				|  |  |          public static string GetXRayScanModeIdString(otsdataconst.OTS_X_RAY_SCAN_MODE a_nXRayScanMode)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              string strXRayScanModeId = "";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            if (a_nXRayScanMode >= otsdataconst.OTS_X_RAY_SCAN_MODE.MIN && a_nXRayScanMode <= otsdataconst.OTS_X_RAY_SCAN_MODE.MAX)
 | 
	
		
			
				|  |  | +            if (a_nXRayScanMode >= otsdataconst.OTS_X_RAY_SCAN_MODE.PointMode && a_nXRayScanMode <= otsdataconst.OTS_X_RAY_SCAN_MODE.FeatureMode)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  strXRayScanModeId = XmlResourceData.GetInstance().GetStringByKey(ResourceID.GrpOtherParam, ResourceID.IDS_XRAYSCANMODE + (int)a_nXRayScanMode);
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -195,10 +187,10 @@ namespace OTSModelSharp.ResourceManage
 | 
	
		
			
				|  |  |          // get XRay search speed id
 | 
	
		
			
				|  |  |          public static string GetXRaySearchSpeedIdString(otsdataconst.OTS_THREE_TIES_OPTIONS a_nXRaySearchSpeed)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              string strXRaySearchSpeedId = "";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            if (a_nXRaySearchSpeed >= otsdataconst.OTS_THREE_TIES_OPTIONS.MIN && a_nXRaySearchSpeed <= otsdataconst.OTS_THREE_TIES_OPTIONS.MAX)
 | 
	
		
			
				|  |  | +            if (a_nXRaySearchSpeed >= otsdataconst.OTS_THREE_TIES_OPTIONS.TIE1 && a_nXRaySearchSpeed <= otsdataconst.OTS_THREE_TIES_OPTIONS.TIE3)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  strXRaySearchSpeedId = XmlResourceData.GetInstance().GetStringByKey(ResourceID.GrpOtherParam, ResourceID.IDS_SEARCHSPEED + (int)a_nXRaySearchSpeed);
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -209,10 +201,10 @@ namespace OTSModelSharp.ResourceManage
 | 
	
		
			
				|  |  |          // get XAxis direction id
 | 
	
		
			
				|  |  |          public static string GetXAxisDirectionIdString(otsdataconst.OTS_X_AXIS_DIRECTION a_nXAxisDirection)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -           
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              string strXAxisDirectionId = "";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            if (a_nXAxisDirection >= otsdataconst.OTS_X_AXIS_DIRECTION.MIN && a_nXAxisDirection <= otsdataconst.OTS_X_AXIS_DIRECTION.MAX)
 | 
	
		
			
				|  |  | +            if (a_nXAxisDirection >= otsdataconst.OTS_X_AXIS_DIRECTION.LEFT_TOWARD && a_nXAxisDirection <= otsdataconst.OTS_X_AXIS_DIRECTION.RIGHT_TOWARD)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  strXAxisDirectionId = XmlResourceData.GetInstance().GetStringByKey(ResourceID.GrpOtherParam, ResourceID.IDS_XAXISDIRECTION + (int)a_nXAxisDirection);
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -227,7 +219,7 @@ namespace OTSModelSharp.ResourceManage
 | 
	
		
			
				|  |  |              string strYAxisDirectionId = "";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            if (a_nYAxisDirection >= otsdataconst.OTS_Y_AXIS_DIRECTION.MIN && a_nYAxisDirection <= otsdataconst.OTS_Y_AXIS_DIRECTION.MAX)
 | 
	
		
			
				|  |  | +            if (a_nYAxisDirection >= otsdataconst.OTS_Y_AXIS_DIRECTION.UP_TOWARD && a_nYAxisDirection <= otsdataconst.OTS_Y_AXIS_DIRECTION.DOWN_TOWARD)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  strYAxisDirectionId = XmlResourceData.GetInstance().GetStringByKey(ResourceID.GrpOtherParam, ResourceID.IDS_YAXISDIRECTION + (int)a_nYAxisDirection);
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -240,7 +232,7 @@ namespace OTSModelSharp.ResourceManage
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              string strId = "";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            if (a_nSteelTech >= otsdataconst.STEEL_TECHNOLOGY.MIN && a_nSteelTech <= otsdataconst.STEEL_TECHNOLOGY.MAX)
 | 
	
		
			
				|  |  | +            if (a_nSteelTech >= otsdataconst.STEEL_TECHNOLOGY.GeneralProcessMode && a_nSteelTech <= otsdataconst.STEEL_TECHNOLOGY.RareEarthMode)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  strId = XmlResourceData.GetInstance().GetStringByKey(ResourceID.GrpGeneral, ResourceID.IDS_MEMBRANE_TYPE + (int)a_nSteelTech);
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -252,10 +244,10 @@ namespace OTSModelSharp.ResourceManage
 | 
	
		
			
				|  |  |          // get measure area shape
 | 
	
		
			
				|  |  |          public static string GetAreaShapeString(otsdataconst.MEASURE_SHAPE a_nShape)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -           
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              string strShape = "";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            if (a_nShape >= otsdataconst.MEASURE_SHAPE.MIN && a_nShape <= otsdataconst.MEASURE_SHAPE.MAX)
 | 
	
		
			
				|  |  | +            if (a_nShape >= otsdataconst.MEASURE_SHAPE.CIRCLE && a_nShape <= otsdataconst.MEASURE_SHAPE.RECT)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  strShape = XmlResourceData.GetInstance().GetStringByKey(ResourceID.GrpOtherParam, ResourceID.IDS_MEASURE_SHAPE + (int)a_nShape);
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -266,7 +258,7 @@ namespace OTSModelSharp.ResourceManage
 | 
	
		
			
				|  |  |          //get model
 | 
	
		
			
				|  |  |          public static string GetRunModeString(otsdataconst.RunMode a_nMode)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              string strMode = "";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              if (a_nMode >= otsdataconst.RunMode.ProfessionalMode && a_nMode <= otsdataconst.RunMode.PlainMode)
 | 
	
	
		
			
				|  | @@ -280,7 +272,7 @@ namespace OTSModelSharp.ResourceManage
 | 
	
		
			
				|  |  |          //get FrameEndMode
 | 
	
		
			
				|  |  |          public static string GetFrameEndModeString(otsdataconst.FrameEndMode a_nModel)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -          
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              string strFrameEndMode = "";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              if (a_nModel >= otsdataconst.FrameEndMode.FieldParticlePercentage && a_nModel <= otsdataconst.FrameEndMode.ParticleNumber)
 | 
	
	
		
			
				|  | @@ -294,7 +286,7 @@ namespace OTSModelSharp.ResourceManage
 | 
	
		
			
				|  |  |          //get AUTOBGREMOVETYPE
 | 
	
		
			
				|  |  |          public static string GetBGREMOVETYPEString(otsdataconst.OTS_AUTOBGREMOVETYPE a_nAUTOBGREMOVETYPE)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              string strAUTOBGREMOVETYPES = "";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              if (a_nAUTOBGREMOVETYPE >= otsdataconst.OTS_AUTOBGREMOVETYPE.AUTO && a_nAUTOBGREMOVETYPE <= otsdataconst.OTS_AUTOBGREMOVETYPE.MANUAL)
 | 
	
	
		
			
				|  | @@ -308,7 +300,7 @@ namespace OTSModelSharp.ResourceManage
 | 
	
		
			
				|  |  |          //get IMAGEMODE
 | 
	
		
			
				|  |  |          public static string GetAUTOBGREMOVETYPEString(otsdataconst.OTS_IMAGE_MODE a_nIMAGEMODE)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -          
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              string strIMAGEMODE = "";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              if (a_nIMAGEMODE >= otsdataconst.OTS_IMAGE_MODE.MIDDLE && a_nIMAGEMODE <= otsdataconst.OTS_IMAGE_MODE.UPWARD)
 | 
	
	
		
			
				|  | @@ -322,10 +314,10 @@ namespace OTSModelSharp.ResourceManage
 | 
	
		
			
				|  |  |          //get USINGXRAY
 | 
	
		
			
				|  |  |          public static string GetUSINGXRAYSIdString(otsdataconst.OTS_USING_X_RAY a_nUSINGXRAY)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              string strUSINGXRAY = "";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            if (a_nUSINGXRAY >= otsdataconst.OTS_USING_X_RAY.MIN && a_nUSINGXRAY <= otsdataconst.OTS_USING_X_RAY.MAX)
 | 
	
		
			
				|  |  | +            if (a_nUSINGXRAY >= otsdataconst.OTS_USING_X_RAY.No && a_nUSINGXRAY <= otsdataconst.OTS_USING_X_RAY.Yes)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  strUSINGXRAY = XmlResourceData.GetInstance().GetStringByKey(ResourceID.GrpMeasureResult, ResourceID.IDS_USINGXRAYS + (int)a_nUSINGXRAY);
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -335,7 +327,7 @@ namespace OTSModelSharp.ResourceManage
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          public static string GetSourceTitleString(OTS_SAMPLE_PROP_GRID_ITEM_GROUPS rowIndex)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              string strSourceName = "";
 | 
	
		
			
				|  |  |              if (rowIndex >= OTS_SAMPLE_PROP_GRID_ITEM_GROUPS.MIN && rowIndex <= OTS_SAMPLE_PROP_GRID_ITEM_GROUPS.MAX)
 | 
	
		
			
				|  |  |              {
 | 
	
	
		
			
				|  | @@ -351,8 +343,8 @@ namespace OTSModelSharp.ResourceManage
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          public static string GetResourceByKey(int resourceGrp, int Index)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -           
 | 
	
		
			
				|  |  | -           string strSource = XmlResourceData.GetInstance().GetStringByKey(resourceGrp, Index);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            string strSource = XmlResourceData.GetInstance().GetStringByKey(resourceGrp, Index);
 | 
	
		
			
				|  |  |              return strSource;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 |