Browse Source

Merge branch 'dev' of http://172.16.3.77:10080/gaoshipeng/OTS2_0 into dev

gsp 4 years ago
parent
commit
bb618871bb

+ 14 - 14
OTSIncAMeasureApp/0-OTSModel/OTSDataType/COTSSample.cs

@@ -2236,7 +2236,7 @@ namespace OTSDataType
             {
                 case OTS_SAMPLE_PROP_GRID_ITEMS.STEEL_TECHNOLOGY:
                     {
-                        if (STEEL_TECHNOLOGY.MIN > (STEEL_TECHNOLOGY)a_nValue || (STEEL_TECHNOLOGY)a_nValue > STEEL_TECHNOLOGY.MAX)
+                        if (STEEL_TECHNOLOGY.GeneralProcessMode > (STEEL_TECHNOLOGY)a_nValue || (STEEL_TECHNOLOGY)a_nValue > STEEL_TECHNOLOGY.RareEarthMode)
                         {
                             return false;
                         }
@@ -2246,7 +2246,7 @@ namespace OTSDataType
                     break;
                 case OTS_SAMPLE_PROP_GRID_ITEMS.START_MODE:
                     {
-                        if (OTS_GET_IMAGE_MODE.MIN > (OTS_GET_IMAGE_MODE)a_nValue || (OTS_GET_IMAGE_MODE)a_nValue > OTS_GET_IMAGE_MODE.MAX)
+                        if (OTS_GET_IMAGE_MODE.FROM_CENTER > (OTS_GET_IMAGE_MODE)a_nValue || (OTS_GET_IMAGE_MODE)a_nValue > OTS_GET_IMAGE_MODE.RANDOM)
                         {
                             return false;
                         }
@@ -2257,7 +2257,7 @@ namespace OTSDataType
 
                 case OTS_SAMPLE_PROP_GRID_ITEMS.STOP_MODE:
                     {
-                        if (OTS_MEASURE_STOP_MODE.MIN > (OTS_MEASURE_STOP_MODE)a_nValue || (OTS_MEASURE_STOP_MODE)a_nValue > OTS_MEASURE_STOP_MODE.MAX)
+                        if (OTS_MEASURE_STOP_MODE.CoverMode > (OTS_MEASURE_STOP_MODE)a_nValue || (OTS_MEASURE_STOP_MODE)a_nValue > OTS_MEASURE_STOP_MODE.TimeMode)
                         {
                             return false;
                         }
@@ -2271,7 +2271,7 @@ namespace OTSDataType
 
                 case OTS_SAMPLE_PROP_GRID_ITEMS.SCAN_SPEED:
                     {
-                        if (OTS_THREE_TIES_OPTIONS.MIN > (OTS_THREE_TIES_OPTIONS)a_nValue || (OTS_THREE_TIES_OPTIONS)a_nValue > OTS_THREE_TIES_OPTIONS.MAX)
+                        if (OTS_THREE_TIES_OPTIONS.TIE1 > (OTS_THREE_TIES_OPTIONS)a_nValue || (OTS_THREE_TIES_OPTIONS)a_nValue > OTS_THREE_TIES_OPTIONS.TIE3)
                         {
                             return false;
                         }
@@ -2281,7 +2281,7 @@ namespace OTSDataType
 
                 case OTS_SAMPLE_PROP_GRID_ITEMS.IMAGE_RESOLUTION:
                     {
-                        if (OTS_FIVE_TIES_OPTIONS.MIN > (OTS_FIVE_TIES_OPTIONS)a_nValue || (OTS_FIVE_TIES_OPTIONS)a_nValue > OTS_FIVE_TIES_OPTIONS.MAX)
+                        if (OTS_FIVE_TIES_OPTIONS.TIE1 > (OTS_FIVE_TIES_OPTIONS)a_nValue || (OTS_FIVE_TIES_OPTIONS)a_nValue > OTS_FIVE_TIES_OPTIONS.TIE7)
                         {
                             return false;
                         }
@@ -2291,7 +2291,7 @@ namespace OTSDataType
 
                 case OTS_SAMPLE_PROP_GRID_ITEMS.SEARCH_RESOLUTION:
                     {
-                        if (OTS_THREE_TIES_OPTIONS.MIN > (OTS_THREE_TIES_OPTIONS)a_nValue || (OTS_THREE_TIES_OPTIONS)a_nValue > OTS_THREE_TIES_OPTIONS.MAX)
+                        if (OTS_THREE_TIES_OPTIONS.TIE1 > (OTS_THREE_TIES_OPTIONS)a_nValue || (OTS_THREE_TIES_OPTIONS)a_nValue > OTS_THREE_TIES_OPTIONS.TIE3)
                         {
                             return false;
                         }
@@ -2301,7 +2301,7 @@ namespace OTSDataType
 
                 case OTS_SAMPLE_PROP_GRID_ITEMS.ANALYSIS_RESOLUTION:
                     {
-                        if (OTS_THREE_TIES_OPTIONS.MIN > (OTS_THREE_TIES_OPTIONS)a_nValue || (OTS_THREE_TIES_OPTIONS)a_nValue > OTS_THREE_TIES_OPTIONS.MAX)
+                        if (OTS_THREE_TIES_OPTIONS.TIE1 > (OTS_THREE_TIES_OPTIONS)a_nValue || (OTS_THREE_TIES_OPTIONS)a_nValue > OTS_THREE_TIES_OPTIONS.TIE3)
                         {
                             return false;
                         }
@@ -2311,7 +2311,7 @@ namespace OTSDataType
 
                 case OTS_SAMPLE_PROP_GRID_ITEMS.SCAN_MODE:
                     {
-                        if (OTS_X_RAY_SCAN_MODE.MIN > (OTS_X_RAY_SCAN_MODE)a_nValue || (OTS_X_RAY_SCAN_MODE)a_nValue > OTS_X_RAY_SCAN_MODE.MAX)
+                        if (OTS_X_RAY_SCAN_MODE.PointMode > (OTS_X_RAY_SCAN_MODE)a_nValue || (OTS_X_RAY_SCAN_MODE)a_nValue > OTS_X_RAY_SCAN_MODE.FeatureMode)
                         {
                             return false;
                         }
@@ -2380,7 +2380,7 @@ namespace OTSDataType
             {
                 case OTS_SAMPLE_PROP_GRID_ITEMS.START_MODE:
                     {
-                        for (int i = (int)OTS_GET_IMAGE_MODE.MIN; i <= (int)OTS_GET_IMAGE_MODE.MAX; ++i)
+                        for (int i = (int)OTS_GET_IMAGE_MODE.FROM_CENTER; i <= (int)OTS_GET_IMAGE_MODE.RANDOM; ++i)
                         {
                             //ResourceID;
                             strItem = XmlResourceData.GetInstance().GetStringByKey(GrpImageScan, IDS_IMAGE_MODE_FIRST + i);
@@ -2391,7 +2391,7 @@ namespace OTSDataType
 
                 case OTS_SAMPLE_PROP_GRID_ITEMS.STOP_MODE:
                     {
-                        for (int i = (int)OTS_MEASURE_STOP_MODE.MIN; i <= (int)OTS_MEASURE_STOP_MODE.MAX; ++i)
+                        for (int i = (int)OTS_MEASURE_STOP_MODE.CoverMode; i <= (int)OTS_MEASURE_STOP_MODE.TimeMode; ++i)
                         {
                             strItem = XmlResourceData.GetInstance().GetStringByKey(GrpImageScan, IDS_MEASURE_STOP_MODE_FIRST + i);
                             a_listComboStrings.Add(strItem);
@@ -2403,7 +2403,7 @@ namespace OTSDataType
                 case OTS_SAMPLE_PROP_GRID_ITEMS.SEARCH_RESOLUTION:
                     //case OTS_SAMPLE_PROP_GRID_ITEMS.ANALYSIS_RESOLUTION:
                     {
-                        for (int i = (int)OTS_THREE_TIES_OPTIONS.MIN; i <= (int)OTS_THREE_TIES_OPTIONS.MAX; ++i)
+                        for (int i = (int)OTS_THREE_TIES_OPTIONS.TIE1; i <= (int)OTS_THREE_TIES_OPTIONS.TIE3; ++i)
                         {
                             strItem = XmlResourceData.GetInstance().GetStringByKey(GrpImageScan, IDS_THREE_TIES_OPTIONS_FIRST + i);
                             a_listComboStrings.Add(strItem);
@@ -2413,7 +2413,7 @@ namespace OTSDataType
 
                 case OTS_SAMPLE_PROP_GRID_ITEMS.IMAGE_RESOLUTION:
                     {
-                        for (int i = (int)OTS_FIVE_TIES_OPTIONS.MIN; i <= (int)OTS_FIVE_TIES_OPTIONS.MAX; ++i)
+                        for (int i = (int)OTS_FIVE_TIES_OPTIONS.TIE1; i <= (int)OTS_FIVE_TIES_OPTIONS.TIE7; ++i)
                         {
                             strItem = RESOLUTION_STRINGS[RESOLUTION_ID_FIRST_TIE + i];
                             a_listComboStrings.Add(strItem);
@@ -2423,7 +2423,7 @@ namespace OTSDataType
 
                 case OTS_SAMPLE_PROP_GRID_ITEMS.SCAN_MODE:
                     {
-                        for (int i = (int)OTS_X_RAY_SCAN_MODE.MIN; i <= (int)OTS_X_RAY_SCAN_MODE.MAX; ++i)
+                        for (int i = (int)OTS_X_RAY_SCAN_MODE.PointMode; i <= (int)OTS_X_RAY_SCAN_MODE.FeatureMode; ++i)
                         {
                             strItem = XmlResourceData.GetInstance().GetStringByKey(GrpXray, IDS_X_RAY_SCAN_MODE_FIRST + i);
                             a_listComboStrings.Add(strItem);
@@ -2432,7 +2432,7 @@ namespace OTSDataType
                     break;
                 case OTS_SAMPLE_PROP_GRID_ITEMS.STEEL_TECHNOLOGY:
                     {
-                        for (int i = (int)STEEL_TECHNOLOGY.MIN; i <= (int)STEEL_TECHNOLOGY.MAX; ++i)
+                        for (int i = (int)STEEL_TECHNOLOGY.GeneralProcessMode; i <= (int)STEEL_TECHNOLOGY.RareEarthMode; ++i)
                         {
                             strItem = XmlResourceData.GetInstance().GetStringByKey(GrpGeneral, IDS_STEEL_TECHNOLOGY + i);
                             a_listComboStrings.Add(strItem);

+ 14 - 46
OTSIncAMeasureApp/0-OTSModel/OTSDataType/otsdataconst.cs

@@ -118,11 +118,8 @@ namespace OTSDataType
 
         public enum OTS_X_AXIS_DIRECTION
         {
-          MIN=0,
             LEFT_TOWARD = 0,
-            RIGHT_TOWARD = 1,    
-            MAX=1
-          
+            RIGHT_TOWARD = 1
         }
 
         public enum  RunMode
@@ -134,35 +131,30 @@ namespace OTSDataType
        public enum  FrameEndMode
         {
             FieldParticlePercentage = 0,    //颗粒百分比
-		    ParticleNumber = 1,            //颗粒数量
+		    ParticleNumber = 1            //颗粒数量
 	    }
         public enum  OTS_AUTOBGREMOVETYPE
         {
             AUTO = 0,
-		    MANUAL = 1,
+		    MANUAL = 1
 	    }
 
         public enum  OTS_IMAGE_MODE
         {
             MIDDLE = 0,
 		    DOWNWARD = 1,
-		    UPWARD = 2,
+		    UPWARD = 2
 	    }
 
         public enum  OTS_SysType_ID
         {
-            INVALID = -1,
-		    MIN = 0,
 		    IncA = 0,
-		    CleanlinessA = 1,
-		    MAX = 1
+		    CleanlinessA = 1
 	    }
         public enum OTS_Y_AXIS_DIRECTION
         {
-          MIN=0,
             UP_TOWARD = 0,
             DOWN_TOWARD = 1,
-           MAX=1
         }
 
 
@@ -173,13 +165,10 @@ namespace OTSDataType
 
         public enum OTS_MEASURE_STOP_MODE
         {
-            INVALID = -1,
-            MIN = 0,
             CoverMode = 0,
             FieldMode = 1,
             ParticleMode = 2,
-            TimeMode = 3,
-            MAX = 3
+            TimeMode = 3
         }
         public enum DOMAIN_SHAPE
         {
@@ -224,49 +213,37 @@ namespace OTSDataType
 
         public enum OTS_GET_IMAGE_MODE
         {
-            INVALID = -1,
-            MIN = 0,
             FROM_CENTER = 0,
             UP_TO_DOWN = 1,
             DOWN_TO_UP = 2,
-            RANDOM = 3,
-            MAX = 3
+            RANDOM = 3
         }
 
 
         public enum OTS_THREE_TIES_OPTIONS
         {
-            INVALID = -1,
-            MIN = 0,
             TIE1 = 0,
             TIE2 = 1,
-            TIE3 = 2,
-            MAX = 2
+            TIE3 = 2
         }
 
 
         public enum OTS_FIVE_TIES_OPTIONS
         {
-            INVALID = -1,
-            MIN = 0,
             TIE1 = 0,
             TIE2 = 1,
             TIE3 = 2,
             TIE4 = 3,
             TIE5 = 4,
             TIE6 = 5,
-            TIE7=6,
-            MAX = 6
+            TIE7=6
         }
 
 
         public enum OTS_X_RAY_SCAN_MODE
         {
-            INVALID = -1,
-            MIN = 0,
             PointMode = 0,
-            FeatureMode = 1,
-            MAX = 1
+            FeatureMode = 1
         }
 
 
@@ -294,13 +271,10 @@ namespace OTSDataType
 
         public enum STEEL_TECHNOLOGY
         {
-            INVALID = -1,
-            MIN = 0,
             GeneralProcessMode = 0,
             CaProcessMode = 1,
             MgProcessMode = 2,
-            RareEarthMode = 3,
-            MAX = 3
+            RareEarthMode = 3
         }
 
         public enum MEMBRANE_TYPE
@@ -318,11 +292,8 @@ namespace OTSDataType
 
         public enum MEASURE_SHAPE
         {
-            INVALID = -1,
-            MIN = 0,
             CIRCLE = 0,
-            RECT = 1,
-            MAX = 1
+            RECT = 1
         }
 
 
@@ -354,12 +325,9 @@ namespace OTSDataType
         }
 
         public enum OTS_USING_X_RAY
-        {
-            INVALID = -1,
-		    MIN = 0,		   
+        {	   
 		    No = 0,
-            Yes = 1,
-            MAX = 1
+            Yes = 1
 	    }
     }
 }

+ 30 - 38
OTSIncAMeasureApp/0-OTSModel/ResourceManage/ResourceData.cs

@@ -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;
         }
     }

+ 1 - 1
OTSPartA_STDEditor/Form_STDConstantsEditor.cs

@@ -3725,7 +3725,7 @@ namespace OTSPartA_STDEditor
             bool bDisConnResult = false;
             if (m_bConnectionState)
             {
-                bDisConnResult = m_cfun.DisConnectSem();
+                //bDisConnResult = m_cfun.DisConnectSem();
             }
             if (bDisConnResult)
             {

+ 12 - 80
XMLData/AppResource_ZH.xml

@@ -760,7 +760,7 @@
 	  <Control name="str5" text="撤销" />
 	  <Control name="str6" text="选择颗粒" />
 	  <Control name="str7" text="视域位置:" />
-	  <Control name="str8" text="复制图像" />
+	  <Control name="str8" text="灰度#" />
 	  <Control name="str9" text="移动SEM到当前位置" />
 	  <Control name="str10" text="移动SEM到颗粒视域位置" />
 	 
@@ -796,6 +796,7 @@
 	  <Control name="rbOpenFile" text="打开" />
 	  <Control name="rbSaveFile" text="保存" />
 	  <Control name="rvSaveAsFile" text="另存为" />
+	  <Control name="rbSTDEditor" text="标准库编辑器" />
 	  <Control name="rbExitApp" text="退出" />
 	  <Control name="rbSelectDlg" text="程序管理" />
 	  <Control name="rbTabHome" text="基本功能" />
@@ -892,6 +893,8 @@
 	  <Control name="lbArea" text="测量区域面积/mm2" />
 	  <Control name="btnok" text="确  定" />
 	  <Control name="btncancel" text="取  消" />
+	  <Control name="groupBox9" text="标准库选择" />
+	  <Control name="label43" text="标准库选择:" />
 	  <Control name="label44" text="是否使用X-ray" />
 	  <Control name="ProgMgrInfoForm" text="程序管理" />
 	  <Control name="message1" text="样品台信息不能为空" />
@@ -948,7 +951,12 @@
 	  <Control name="message52" text="输入的数值过小" />
 	  <Control name="message53" text="请输入正确的数值范围" />
 	  <Control name="message54" text="保存样品台时失败!" />
-	  <Control name="message55" text="所选为空库,无法编辑!" />
+	  <Control name="message55" text="请输入正确的数值格式!" />
+	  <Control name="message56" text="输入的数值过大!" />
+	  <Control name="message57" text="输入的数值过大!" />
+	  <Control name="message58" text="输入的数值过大!" />
+	  <Control name="message59" text="请输入正确的数值格式!" />
+	  <Control name="message60" text="请输入正确的数值格式!" />
 	  <Control name="message61" text="是否使用X-ray项不能为空" />
     </Controls>
  </Form>
@@ -1364,6 +1372,8 @@
  <Form>
     <Name>OTSMeasureOutputNlog</Name>
     <Controls>
+      <Control name="OTSMeasureOutputNlog" text="log输出" />
+	  <Control name="label1" text="log输出类型:" />
 	  <Control name="button_clear" text="清屏" />
 	  <Control name="button_stop" text="停止" />
     </Controls>
@@ -1394,82 +1404,4 @@
 	  <Control name="button1" text="确  定" />
     </Controls>
  </Form>
- <Form>
-    <Name>Triangulation_List</Name>
-    <Controls>
-      <Control name="Triangulation_List" text="三元相图模板列表" />
-	  <Control name="button1" text="添  加" />
-	  <Control name="button3" text="保  存" />
-	  <Control name="button2" text="返  回" />
-	  <Control name="str1" text="序号" />
-	  <Control name="str2" text="模板名称" />
-	  <Control name="str3" text="修改" />
-	  <Control name="str4" text="删除" />
-    </Controls>
- </Form>
- <Form>
-    <Name>OTSReport_TemplateDesignerRM</Name>
-    <Controls>
-      <Control name="OTSReport_TemplateDesignerRM" text="报告预览信息设置" />
-	  <Control name="label39" text="模板设置" />
-	  <Control name="button6" text="保存" />
-	  <Control name="button1" text="另存" />
-	  <Control name="groupBox9" text="首页设置信息" />
-	  <Control name="groupBox1" text="页眉页脚设置" />
-	  <Control name="groupBox4" text="颗粒尺寸分析结果" />
-	  <Control name="groupBox3" text="夹杂物分类图" />
-	  <Control name="groupBox6" text="元素分析表" />
-	  <Control name="groupBox5" text="元素成分图" />
-	  <Control name="groupBox7" text="三元相图" />
-	  <Control name="groupBox8" text="颗粒列表" />
-	  
-	  <Control name="label3" text="主标题" />
-	  <Control name="label5" text="副标题" />
-	  <Control name="label1" text="样品编号" />
-	  <Control name="label4" text="参考标准" />
-	  <Control name="label7" text="显示结果概况" />
-	  
-	  <Control name="label8" text="页眉文本" />
-	  <Control name="label10" text="页脚文本" />
-	  <Control name="label2" text="客户号" />
-	  
-	  <Control name="label17" text="显示该模块" />
-	  <Control name="label14" text="计算方式" />
-	  <Control name="label15" text="粒级表信息" />
-	  <Control name="label16" text="颗粒范围" />
-	  
-	  <Control name="label18" text="显示该模块" />
-	  <Control name="label19" text="显示图形" />
-	  <Control name="label11" text="计算方式" />
-	  <Control name="label12" text="粒级表信息" />
-	  <Control name="label13" text="颗粒范围" />
-	  
-	  <Control name="label25" text="显示该模块" />
-	  <Control name="label28" text="计算方式" />
-	  <Control name="label26" text="颗粒范围" />
-	  <Control name="label27" text="显示元素" />
-	  
-	  <Control name="label20" text="显示该模块" />
-	  <Control name="label22" text="显示图形" />
-	  <Control name="label23" text="计算方式" />
-	  <Control name="label21" text="颗粒范围" />
-	  <Control name="label24" text="元素信息" />
-	  
-	   <Control name="label40" text="显示该模块" />
-	  <Control name="label44" text="计算方式" />
-	  <Control name="label41" text="颗粒范围" />
-	  <Control name="label38" text="粒级表信息" />
-	  <Control name="label42" text="每行显示数量" />
-	  <Control name="label33" text="三元相图模板列表" />
-	  
-	  <Control name="label34" text="显示该模块" />
-	  <Control name="label37" text="计算方式" />
-	  <Control name="label35" text="颗粒范围" />
-	  <Control name="label29" text="数量上限" />
-	  <Control name="label36" text="显示元素" />
-	  <Control name="label30" text="原始图像" />
-	  <Control name="label31" text="放大图像" />
-	  <Control name="label32" text="能谱信息" />
-    </Controls>
- </Form>
 </Resource>

+ 3 - 3
XMLData/ResourceForCpp/ResourceForCpp-EN.xml

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <XMLData FileMark="1037" Switch="false" Version="1.1.1">
     <collection RegName="keyvaluepair">
          <collection RegName="ResGrp" grpKey="0" text="Common" description="">
@@ -677,8 +677,8 @@
 		<member itemKey="12540" itemName="" itemText="Circle"/>
 		<member itemKey="12541" itemName="" itemText="Rectangle"/>	
 
-        <member itemKey="12542" itemName="" itemText="ProfessionalMode"/>
-		<member itemKey="12543" itemName="" itemText="NormalMode"/>
+        <member itemKey="12542" itemName="" itemText="Professional"/> 
+        <member itemKey="12543" itemName="" itemText="Plain"/> 
         <member itemKey="12544" itemName="" itemText="space"/> 
         <member itemKey="12545" itemName="" itemText="space"/> 
         <member itemKey="12546" itemName="" itemText="space"/> 

+ 1 - 1
XMLData/ResourceForCpp/ResourceForCpp-ZH.xml

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <XMLData FileMark="1037" Switch="false" Version="1.1.1">
     <collection RegName="keyvaluepair">
 	  <collection RegName="ResGrp" grpKey="0" text="常规参数" description="">