Selaa lähdekoodia

change the save logic of particle data

GSP 1 viikko sitten
vanhempi
commit
475079e337

+ 4 - 1
OTSIncAMeasureApp/1-OTSMeasure/Measure/DBDataTransition/IncADataDB.cs

@@ -267,7 +267,10 @@ namespace OTSModelSharp
                     fldSEMPos.Y = Convert.ToInt32(allRecords.Rows[i][(int)CIncADataTable.ColumnID.N_SEMPOS_Y]);
                     COTSParticleClr p = new COTSParticleClr();
                     p.SetFieldId(fld.GetId());
-                    p.SetFieldOTSPos(fld.GetOTSPosition());
+                    var otsfieldPos = new System.Drawing.Point();   
+                    otsfieldPos.X = Convert.ToInt32(allRecords.Rows[i][(int)CIncADataTable.ColumnID.N_FieldPosX]);
+                    otsfieldPos.Y = Convert.ToInt32(allRecords.Rows[i][(int)CIncADataTable.ColumnID.N_FieldPosY]);
+                    p.SetFieldOTSPos( otsfieldPos);
                     p.SetParticleId(Convert.ToInt32(allRecords.Rows[i][(int)CIncADataTable.ColumnID.N_PARTICLE_ID]));
                     p.SetSEMPos(fldSEMPos);
                     p.SetFieldOTSPos(fldPos);