Browse Source

save sempos of a field into the field table.

gsp 3 years ago
parent
commit
b48d557509

+ 2 - 2
OTSCPP/OTSClrInterface/ControlClr/OTSControlFunExport.cpp

@@ -267,7 +267,7 @@ namespace OTSCLRINTERFACE
 			{
 				a_XrayData[i][j] = xrd[j];
 			}
-			delete listFeatures[i].pSegment;// using the pure pointer increase the understandability but bring another problem: you mast not forget to free the pointer or you involve into memory leak!
+			delete listFeatures[i].pSegment;// here using the pure pointer increase the understandability but bring another problem: you must not forget to free the pointer or you involve into memory leak!
 		}
 
 		if (bQuant)
@@ -348,7 +348,7 @@ namespace OTSCLRINTERFACE
 			auto part = parts[i]->GetOTSParticlePtr();
 			part->SetXrayInfo(listXRayPoints[i]);
 
-			delete listFeatures[i].pSegment;// using the pure pointer increase the understandability but bring another problem: you mast not forget to free the pointer or you involve into memory leak!
+			delete listFeatures[i].pSegment;// using the pure pointer increase the understandability but bring another problem: you must not forget to free the pointer or you involve into memory leak!
 		}
 
 		

+ 4 - 4
OTSIncAMeasureApp/0-OTSModel/Measure/DBDataTransition/CFieldDB.cs

@@ -13,7 +13,7 @@ namespace OTSModelSharp
         {
 
         }
-        public void SaveAField(int fieldId,System.Drawing.Point fldPos)
+        public void SaveAField(int fieldId,System.Drawing.Point fldPos,System.Drawing.Point OTSPos)
         {
             var tableInfoPtr = GetTableInfo();
 
@@ -28,7 +28,7 @@ namespace OTSModelSharp
             string sSQLCommand;
 
 
-            sSQLCommand = string.Format(sInsertFormat, fieldId, fldPos.X, fldPos.Y);
+            sSQLCommand = string.Format(sInsertFormat, fieldId, fldPos.X, fldPos.Y,OTSPos.X,OTSPos.Y);
             if (!datastorePtr.RunCommand(sSQLCommand))
             {
 
@@ -38,7 +38,7 @@ namespace OTSModelSharp
 
             return ;
         }
-        public string GetSavingAFieldcmd(int fieldId, System.Drawing.Point fldPos)
+        public string GetSavingAFieldcmd(int fieldId, System.Drawing.Point OTSPos,System.Drawing.Point SemPos)
         {
            
             var tableInfoPtr = GetTableInfo();
@@ -54,7 +54,7 @@ namespace OTSModelSharp
             string sSQLCommand;
 
 
-            sSQLCommand = string.Format(sInsertFormat, fieldId, fldPos.X, fldPos.Y);
+            sSQLCommand = string.Format(sInsertFormat, fieldId, OTSPos.X, OTSPos.Y,SemPos.X,SemPos.Y);
          
            
 

+ 5 - 2
OTSIncAMeasureApp/0-OTSModel/Measure/DBDataTransition/CFieldTable.cs

@@ -16,7 +16,9 @@ namespace OTSModelSharp
             N_FIELD_ID = 0,
             N_FIELDPOS_X = 1,
             N_FIELDPOS_Y = 2,
-            MAX = 2
+            N_SEMPOS_X=3,
+            N_SEMPOS_Y=4,
+            MAX = 4
         };
 
         public CFieldTable()
@@ -25,7 +27,8 @@ namespace OTSModelSharp
             AddColumn(new ColumnDefine() { ColumName = "FieldId", ColumType = new ColumnType(ColumnType.ID.INTEGER, false, false), IsPrimarykey = true });
             AddColumn(new ColumnDefine() { ColumName = "FIELDPOSX", ColumType = new ColumnType(ColumnType.ID.INTEGER, false, false), IsPrimarykey = false });
             AddColumn(new ColumnDefine() { ColumName = "FIELDPOSY", ColumType = new ColumnType(ColumnType.ID.INTEGER, false, false), IsPrimarykey = false });
-
+            AddColumn(new ColumnDefine() { ColumName = "SEMPOSX", ColumType = new ColumnType(ColumnType.ID.INTEGER, false, false), IsPrimarykey = false });
+            AddColumn(new ColumnDefine() { ColumName = "SEMPOSY", ColumType = new ColumnType(ColumnType.ID.INTEGER, false, false), IsPrimarykey = false });
             SetTableName("Field");
         }
     }

+ 1 - 1
OTSIncAReportApp/1-UI/Control_Graph/Controls/Control_DrawDistrbutionImageAndBSE.cs

@@ -429,7 +429,7 @@ namespace OTSIncAReportGraph.Controls
             string str34 = "field...";
 
 
-            var otsLeftBottomPoint = ReportFun.GetPhysicalCoordLeftBottomPoint(list_point);
+            var otsLeftBottomPoint = ReportFun.GetOTSCoordLeftBottomPoint(list_point);
     
             for (int i = 0; i < fieldlist.Count(); i++)
             {

+ 1 - 1
OTSIncAReportApp/1-UI/Control_Graph/OTSIncAReportGraphFuncation/OTSImageDisHelp.cs

@@ -102,7 +102,7 @@ namespace OTSIncAReportGraph.OTSIncAReportGraphFuncation
         #endregion
 
         #region 封装自定义方法
-        public Point GetPhysicalCoordLeftBottomPoint(List<Point> allFldPos)
+        public Point GetOTSCoordLeftBottomPoint(List<Point> allFldPos)
         {
             //the ots coordinate system is always positive on the right and up direction.So the leftbottom point would be the smallest point.
             //找出最小的x,y用来做偏移运算