Bladeren bron

improve the format of the result file.

gsp 3 jaren geleden
bovenliggende
commit
dea69fe59a

+ 3 - 3
OTSIncAMeasureApp/0-OTSModel/OTSDataType/CDomain.cs

@@ -142,7 +142,7 @@ namespace OTSDataType
         public override void Serialize(bool isStoring, XmlDocument classDoc, XmlNode rootNode)
         {
             Slo slo = new Slo();
-            xInt xnShape = new xInt();
+            xString xnShape = new xString();
             xRect xRecDomain = new xRect();
             xString xPolygonPoint = new xString();
             slo.Register("shape", xnShape);
@@ -151,7 +151,7 @@ namespace OTSDataType
 
             if (isStoring)
             {
-                xnShape.AssignValue((int)m_nShape);
+                xnShape.AssignValue((int)m_nShape+":"+ m_nShape.ToString());
                 //we have to save the rectangle parameter according to the previouse rule.(left,top,width,height or centerX centerY,diamiter,0)
                 System.Drawing.Rectangle rect = new System.Drawing.Rectangle();
                 rect.X = m_rectangle.X;
@@ -171,7 +171,7 @@ namespace OTSDataType
             {
                 slo.Serialize(false, classDoc, rootNode);
 
-                m_nShape = (otsdataconst.DOMAIN_SHAPE)xnShape.value();
+                m_nShape = (otsdataconst.DOMAIN_SHAPE)Convert.ToInt32( xnShape.value().Split(':')[0]);
                 List<string> rectDomain = xRecDomain.toString().Split(',').ToList();
                 m_rectangle = new Rectangle(Convert.ToInt32(rectDomain[0]), Convert.ToInt32(rectDomain[1]), 0, 0);
 

+ 4 - 21
OTSIncAMeasureApp/0-OTSModel/OTSDataType/COTSImageScanParam.cs

@@ -183,12 +183,7 @@ namespace OTSDataType
             xString xnScanImageSpeed = new xString();
             xString xnImageSize = new xString();
 
-            xString xnFieldStopMode = new xString();
-            xInt xnFieldAreaPercentage = new xInt();
-            xInt xnFieldLargeParticles = new xInt();
-            xInt xnFieldLargeParticlePercentage = new xInt();
-            xInt xnFieldSmallParticles = new xInt();
-            xInt xnFieldSmallParticlePercentage = new xInt();
+        
 
            
 
@@ -203,12 +198,7 @@ namespace OTSDataType
             slo.Register("ScanImageSpeed", xnScanImageSpeed);
             slo.Register("ImageResolution", xnImageSize);
 
-            slo.Register("FieldStopMode", xnFieldStopMode);
-            slo.Register("FieldAreaPercentage", xnFieldAreaPercentage);
-            slo.Register("FieldLargeParticles", xnFieldLargeParticles);
-            slo.Register("FieldLargeParticlePercentage", xnFieldLargeParticlePercentage);
-            slo.Register("FieldSmallParticles", xnFieldSmallParticles);
-            slo.Register("FieldSmallParticlePercentage", xnFieldSmallParticlePercentage);
+      
 
            
 
@@ -230,9 +220,7 @@ namespace OTSDataType
                 xnScanImageSpeed.AssignValue((int)m_nScanImageSpeed+":"+ m_nScanImageSpeed.ToString());
                 xnImageSize.AssignValue( (int)m_nImageResulotion+":"+m_nImageResulotion.ToString());
 
-                xnFieldStopMode.AssignValue((int)m_nFieldStopMode+":"+m_nFieldStopMode.ToString());
-                xnFieldSmallParticles.AssignValue(m_nFieldSmallParticles);
-                xnFieldSmallParticlePercentage .AssignValue(m_nFieldSmallParticlesPercentage);
+      
 
               
 
@@ -257,12 +245,7 @@ namespace OTSDataType
                 m_nScanImageSpeed = (OTS_IMAGE_SCANSPEED_OPTIONS)Convert.ToInt32(xnScanImageSpeed.value().Split(':')[0]);
                 m_nImageResulotion = (OTS_IMAGE_RESULOTION_OPTIONS)Convert.ToInt32(xnImageSize.value().Split(':')[0]);
 
-                m_nFieldStopMode = (OTS_MEASURE_FIELD_STOP_MODE)Convert.ToInt32(xnFieldStopMode.value().Split(':')[0]);
-                m_nFieldAreaPercentage = xnFieldAreaPercentage.value();
-                m_nFieldLargeParticles = xnFieldLargeParticles.value();
-                m_nFieldLargeParticlesPercentage = xnFieldLargeParticlePercentage.value();
-                m_nFieldSmallParticles = xnFieldSmallParticles.value();
-                m_nFieldSmallParticlesPercentage = xnFieldSmallParticlePercentage.value();
+       
 
 
             }

+ 2 - 1
OTSIncAMeasureApp/4-OTSSamplespaceGraphicsPanel/OTSSamplespaceGraphicsPanelFun.cs

@@ -25,7 +25,8 @@ namespace OTSMeasureApp
                                        item.Region.Left + e.X - item.DraggingPoint.X,
                                        item.Region.Top + e.Y - item.DraggingPoint.Y,
                                        item.Region.Width,
-                                       item.Region.Height);
+                                       item.Region.Height
+                                       );
             item.DraggingPoint = e.Location;
             return item;
         }

+ 1 - 1
OTSIncAMeasureApp/4-OTSSamplespaceGraphicsPanel/OTSSamplespaceWindow.cs

@@ -332,7 +332,7 @@ namespace OTSMeasureApp
                     if (itemMeasure.IsWorkSample && sNewWSampleName == itemMeasure.SampleName)
                     {
                         //当前工作样品的测量区域 获取帧图信息
-                        if (m_MeasureFieldGDIObjects.Count == 0)
+                        if (m_MeasureFieldGDIObjects.Count> 0)
                         {
                            
                         

+ 3 - 6
OTSIncAMeasureApp/4-OTSSamplespaceGraphicsPanel/VisualStage.cs

@@ -33,7 +33,6 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
 
      
 
-        //public ShapeType m_Shape = 0;
 
         //记录绘制样品台时的中心位置
         Point m_RegionStartCenterPoint = new Point(0, 0);
@@ -210,7 +209,7 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
 
             m_totalCtrlWidth = ctrlWidth;
             m_totalCtrlHeight = ctrlHeight;
-            //m_Shape = GetOTSSampleStageData().bStageShape;
+         
 
 
             return;
@@ -318,9 +317,7 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
                         {
                             CreateHole = new CreateRectangle(RecF, CreateRectangleType.Circle);
                         }
-                        //获取样品孔默认尺寸
-                        //m_DefaultStageHoleWidth = CreateHole.Region.Width;
-                        //m_DefaultStageHoleHeight = CreateHole.Region.Height;
+                
                         //绘制样品孔路径
                         GraphicsPath HolePath = new GraphicsPath();
                         if (ChloeClrList[i].iSHoleShape == (int)CreateRectangleType.Circle)
@@ -380,7 +377,7 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
             catch (Exception ex)
             {
 
-                NLog.LogManager.GetCurrentClassLogger().Error("OTSSamplespaceWindow_DrawSampleInfo():--" + ex.ToString() + "");
+                NLog.LogManager.GetCurrentClassLogger().Error( ex.ToString() );
             }
         }
         public CreateRectangle GetCtrlCoordRect(Point OTSLeftTop, Point OTSRightBottom, CreateRectangleType type, string content, string name)