Просмотр исходного кода

将System.Windows.Point修改成System.Drawing.Point

sunyi 5 лет назад
Родитель
Сommit
7d2fa7586f

+ 6 - 6
OTS/OTSModelSharp/Measure/GetBSEPic/FieldMgr.cs

@@ -605,14 +605,14 @@ namespace OTSModelSharp
         }
         }
 
 
   
   
-        public bool FindNeighborFieldCentre(List<System.Windows.Point> a_listFieldCentres, double a_dScanFieldSizeX,
-         double a_dScanFieldSizeY, System.Windows.Point a_poiCurrent, SORTING_DIRECTION a_nDirection, System.Windows.Point a_poiNeighbor)
+        public bool FindNeighborFieldCentre(List<System.Drawing.Point> a_listFieldCentres, double a_dScanFieldSizeX,
+         double a_dScanFieldSizeY, System.Drawing.Point a_poiCurrent, SORTING_DIRECTION a_nDirection, System.Drawing.Point a_poiNeighbor)
         {
         {
             // assume no neighbor
             // assume no neighbor
             bool bFind = false;
             bool bFind = false;
 
 
             // go through the field centres list
             // go through the field centres list
-            foreach (System.Windows.Point poiFieldCentre in a_listFieldCentres)
+            foreach (System.Drawing.Point poiFieldCentre in a_listFieldCentres)
             {
             {
                 // test if this is a neighbor field centre
                 // test if this is a neighbor field centre
                 SORTING_DIRECTION nDirection = new SORTING_DIRECTION();
                 SORTING_DIRECTION nDirection = new SORTING_DIRECTION();
@@ -686,7 +686,7 @@ namespace OTSModelSharp
             }
             }
 
 
 
 
-            foreach (System.Windows.Point poiFieldCentre in a_listFieldCentres)
+            foreach (System.Drawing.Point poiFieldCentre in a_listFieldCentres)
             {
             {
                 // test if this is a neighbor field centre
                 // test if this is a neighbor field centre
                 SORTING_DIRECTION nDirection = new SORTING_DIRECTION();
                 SORTING_DIRECTION nDirection = new SORTING_DIRECTION();
@@ -759,8 +759,8 @@ namespace OTSModelSharp
         }
         }
 
 
         // check if this is a neighbor field centre
         // check if this is a neighbor field centre
-        public bool IsNeighborFieldCentre(System.Windows.Point a_poiFieldCentre,
-             System.Windows.Point a_poiCurrent,
+        public bool IsNeighborFieldCentre(System.Drawing.Point a_poiFieldCentre,
+             System.Drawing.Point a_poiCurrent,
              double a_dScanFieldSizeX,
              double a_dScanFieldSizeX,
              double a_dScanFieldSizeY,
              double a_dScanFieldSizeY,
              SORTING_DIRECTION a_nDirection)
              SORTING_DIRECTION a_nDirection)

+ 3 - 3
OTS/OTSModelSharp/Measure/GetBSEPic/MsrThread.cs

@@ -69,7 +69,7 @@ namespace OTSModelSharp
                 //    pos = new Point();
                 //    pos = new Point();
 
 
                 //}
                 //}
-                public System.Windows.Point pos;
+                public System.Drawing.Point pos;
                 public int iBSEDataHeight;
                 public int iBSEDataHeight;
                 public int iBSEDataWidth;
                 public int iBSEDataWidth;
                 public byte[] lpBSEData;
                 public byte[] lpBSEData;
@@ -77,7 +77,7 @@ namespace OTSModelSharp
 
 
           public   struct SAMPLEFIELDDATA
           public   struct SAMPLEFIELDDATA
             {
             {
-                public System.Windows.Point Fieldpos;
+                public System.Drawing.Point Fieldpos;
                 public int iMeasureFieldCount;
                 public int iMeasureFieldCount;
                 public int iCompleteFieldCount;
                 public int iCompleteFieldCount;
                 public int iSParticleCount;     // Field particle count
                 public int iSParticleCount;     // Field particle count
@@ -85,7 +85,7 @@ namespace OTSModelSharp
 
 
           public   struct StartToMsrField
           public   struct StartToMsrField
             {
             {
-                public System.Windows.Point Fieldpos;
+                public System.Drawing.Point Fieldpos;
             };       
             };       
 
 
            public  RBSEDATA BSEData;
            public  RBSEDATA BSEData;

+ 9 - 9
OTS/OTSModelSharp/Measure/GetBSEPic/SmplMeasure.cs

@@ -285,7 +285,7 @@ namespace OTSModelSharp
 
 
             m_strWorkingFolder = a_strWorkingFolder + m_pSample.GetName() + "\\";
             m_strWorkingFolder = a_strWorkingFolder + m_pSample.GetName() + "\\";
         }
         }
-        bool CalculateUnMeasuredFieldsCenters(out List<System.Windows.Point> a_listFieldCenter)
+        bool CalculateUnMeasuredFieldsCenters(out List<System.Drawing.Point> a_listFieldCenter)
         {
         {
             Debug.Assert(m_pSample == null);
             Debug.Assert(m_pSample == null);
 
 
@@ -296,7 +296,7 @@ namespace OTSModelSharp
             CMsrSampleStatus pStatus = m_pSample.GetMsrStatus();
             CMsrSampleStatus pStatus = m_pSample.GetMsrStatus();
 
 
             // measured field centers list
             // measured field centers list
-            List<System.Windows.Point> listCompletedCenter = pStatus.GetCompletedFieldsCenter();
+            List<System.Drawing.Point> listCompletedCenter = pStatus.GetCompletedFieldsCenter();
 
 
             // field centers list manager
             // field centers list manager
             CFieldMgr pFieldMgr = new CFieldMgr();
             CFieldMgr pFieldMgr = new CFieldMgr();
@@ -305,7 +305,7 @@ namespace OTSModelSharp
             if (!pFieldMgr.Init(m_pSample.GetMsrArea(), poImageScanParam, poSEMDataMsr, listCompletedCenter))
             if (!pFieldMgr.Init(m_pSample.GetMsrArea(), poImageScanParam, poSEMDataMsr, listCompletedCenter))
             {
             {
                 loger.Error("CalculateFieldsCenters: failed to init field centres list manager.");
                 loger.Error("CalculateFieldsCenters: failed to init field centres list manager.");
-                a_listFieldCenter = new List<System.Windows.Point>();
+                a_listFieldCenter = new List<System.Drawing.Point>();
                 return false;
                 return false;
             }
             }
 
 
@@ -395,7 +395,7 @@ namespace OTSModelSharp
             return bRet;
             return bRet;
         }
         }
         // move SEM to the point
         // move SEM to the point
-        bool MoveSEMToPoint(System.Windows.Point a_poi)
+        bool MoveSEMToPoint(System.Drawing.Point a_poi)
         {
         {
             // get SEM controller 
             // get SEM controller 
             var pSEMController = m_HardwareMgr.GetSEMController();
             var pSEMController = m_HardwareMgr.GetSEMController();
@@ -556,7 +556,7 @@ namespace OTSModelSharp
             }
             }
             //------
             //------
             // calculate field centers
             // calculate field centers
-            List<System.Windows.Point> umMeasuredlistFieldCenter;
+            List<System.Drawing.Point> umMeasuredlistFieldCenter;
             //umMeasuredlistFieldCenter.Clear();
             //umMeasuredlistFieldCenter.Clear();
             if (!CalculateUnMeasuredFieldsCenters(out umMeasuredlistFieldCenter))
             if (!CalculateUnMeasuredFieldsCenters(out umMeasuredlistFieldCenter))
             {// failed to calculate field centers
             {// failed to calculate field centers
@@ -597,7 +597,7 @@ namespace OTSModelSharp
                 }
                 }
 
 
                 // get a field center 
                 // get a field center 
-                System.Windows.Point poiFieldCentre = umMeasuredlistFieldCenter[i];
+                System.Drawing.Point poiFieldCentre = umMeasuredlistFieldCenter[i];
 
 
                 // update thread measure status class, let the main thread know that starts a new field
                 // update thread measure status class, let the main thread know that starts a new field
                 pStatus.ComputeTime(OTS_MSR_TIME_TYPE.STOPPED);
                 pStatus.ComputeTime(OTS_MSR_TIME_TYPE.STOPPED);
@@ -660,7 +660,7 @@ namespace OTSModelSharp
                 pStatus.SetCompletedFields(pStatus.GetCompletedFields() + 1);
                 pStatus.SetCompletedFields(pStatus.GetCompletedFields() + 1);
 
 
                 // completed fieldCenter
                 // completed fieldCenter
-               List<System.Windows.Point>  listCpltedCenter = pStatus.GetCompletedFieldsCenter();
+               List<System.Drawing.Point>  listCpltedCenter = pStatus.GetCompletedFieldsCenter();
                 listCpltedCenter.Add(poiFieldCentre);
                 listCpltedCenter.Add(poiFieldCentre);
 
 
                 //Field Data
                 //Field Data
@@ -764,7 +764,7 @@ namespace OTSModelSharp
             }
             }
 
 
             // calculate field centers
             // calculate field centers
-            List<System.Windows.Point> listFieldCenter=new List<System.Windows.Point>();
+            List<System.Drawing.Point> listFieldCenter=new List<System.Drawing.Point>();
            // listFieldCenter.clear();
            // listFieldCenter.clear();
             if (!CalculateUnMeasuredFieldsCenters(out listFieldCenter))
             if (!CalculateUnMeasuredFieldsCenters(out listFieldCenter))
             {// failed to calculate field centers
             {// failed to calculate field centers
@@ -802,7 +802,7 @@ namespace OTSModelSharp
                 }
                 }
 
 
                 // get a field center 
                 // get a field center 
-                System.Windows.Point poiFieldCentre = listFieldCenter[i];
+                System.Drawing.Point poiFieldCentre = listFieldCenter[i];
 
 
                // LogInfoTrace(__FILE__, __LINE__, _T("C++ Position Message 1: field %d begin."), i);
                // LogInfoTrace(__FILE__, __LINE__, _T("C++ Position Message 1: field %d begin."), i);
 
 

+ 1 - 1
OTS/OTSModelSharp/Measure/GetBSEPic/SmplMsrResultFileMgr.cs

@@ -734,7 +734,7 @@ namespace OTSModelSharp
                     return false;
                     return false;
                 }
                 }
             }
             }
-            List<System.Windows.Point> completedfld = new List<System.Windows.Point>();
+            List<System.Drawing.Point> completedfld = new List<System.Drawing.Point>();
             var IncADataDB = m_IncAFileMgr.GetIncADB();
             var IncADataDB = m_IncAFileMgr.GetIncADB();
 
 
             m_IncADataDB.GetAllFieldsRecord(ref allFlds);
             m_IncADataDB.GetAllFieldsRecord(ref allFlds);

+ 1 - 1
OTS/OTSModelSharp/Measure/GetParam/COTSProjMgrFile.cs

@@ -318,7 +318,7 @@ namespace OTSModelSharp
                     return false;
                     return false;
                 }
                 }
             }
             }
-            List<System.Windows.Point> completedflds = new List<System.Windows.Point>();
+            List<System.Drawing.Point> completedflds = new List<System.Drawing.Point>();
 
 
             CIncAFileMgr IncADataDBs = m_IncAFileMgr.GetIncADB();
             CIncAFileMgr IncADataDBs = m_IncAFileMgr.GetIncADB();
             m_IncADataDB.GetAllFieldsRecord(ref allFlds);
             m_IncADataDB.GetAllFieldsRecord(ref allFlds);

+ 2 - 2
OTS/OTSModelSharp/Measure/GetParticle/IncADataDB.cs

@@ -53,7 +53,7 @@ namespace OTSModelSharp
             return true;
             return true;
         }
         }
 
 
-        public bool SaveAIncA(COTSParticle a_pParticle, CPosXray a_pXray, System.Windows.Point fldPos)
+        public bool SaveAIncA(COTSParticle a_pParticle, CPosXray a_pXray, System.Drawing.Point fldPos)
         {
         {
             if (!Init())
             if (!Init())
             {
             {
@@ -120,7 +120,7 @@ namespace OTSModelSharp
                     COTSFieldData fld = new COTSFieldData();
                     COTSFieldData fld = new COTSFieldData();
 
 
                     fld.SetId((int)allRecords.Rows[(int)CIncADataTable.ColumnID.N_PARTICLE_ID][0]);
                     fld.SetId((int)allRecords.Rows[(int)CIncADataTable.ColumnID.N_PARTICLE_ID][0]);
-                    System.Windows.Point fldPos =new System.Windows.Point();
+                    System.Drawing.Point fldPos =new System.Drawing.Point();
                     fldPos.X = (int)allRecords.Rows[(int)CIncADataTable.ColumnID.N_FldPosX][0];
                     fldPos.X = (int)allRecords.Rows[(int)CIncADataTable.ColumnID.N_FldPosX][0];
                     fldPos.Y = (int)allRecords.Rows[(int)CIncADataTable.ColumnID.N_FldPosY][0];
                     fldPos.Y = (int)allRecords.Rows[(int)CIncADataTable.ColumnID.N_FldPosY][0];
                     fld.SetPosition(fldPos);
                     fld.SetPosition(fldPos);

+ 2 - 2
OTS/OTSModelSharp/Measure/GetParticle/IncAFileMgr.cs

@@ -33,7 +33,7 @@ namespace OTSModelSharp
 
 
         IDBBase myDB;
         IDBBase myDB;
 
 
-        System.Windows.Point m_FieldPos;
+        System.Drawing.Point m_FieldPos;
 
 
         CGenInfoDB m_generalInfoTable;
         CGenInfoDB m_generalInfoTable;
 
 
@@ -264,7 +264,7 @@ namespace OTSModelSharp
             }
             }
         }
         }
 
 
-       public  void SetFieldPos(System.Windows.Point p) { m_FieldPos = p; }
+       public  void SetFieldPos(System.Drawing.Point p) { m_FieldPos = p; }
 
 
        public  void SetMsrStatus(CMsrSampleStatus s) { msrStatus = s; }
        public  void SetMsrStatus(CMsrSampleStatus s) { msrStatus = s; }
 
 

+ 1 - 1
OTS/OTSModelSharp/Measure/GetParticle/MergedParticles/MergeParticleDB.cs

@@ -121,7 +121,7 @@ namespace OTSModelSharp
 
 
                    
                    
                     fld.SetId((int)allRecords.Rows[(int)CMergeParticleTable.ColumnID.N_FIELD_ID][0]);
                     fld.SetId((int)allRecords.Rows[(int)CMergeParticleTable.ColumnID.N_FIELD_ID][0]);
-                    System.Windows.Point fldPos = new System.Windows.Point();
+                    System.Drawing.Point fldPos = new System.Drawing.Point();
                     
                     
                     fldPos.X = (int)allRecords.Rows[(int)CMergeParticleTable.ColumnID.N_FldPosX][0];
                     fldPos.X = (int)allRecords.Rows[(int)CMergeParticleTable.ColumnID.N_FldPosX][0];
                     fldPos.Y = (int)allRecords.Rows[(int)CMergeParticleTable.ColumnID.N_FldPosY][0];
                     fldPos.Y = (int)allRecords.Rows[(int)CMergeParticleTable.ColumnID.N_FldPosY][0];

+ 1 - 1
OTS/OTSModelSharp/Measure/GetStageInfo/StageFile.cs

@@ -1288,7 +1288,7 @@ namespace OTSModelSharp
             m_nWorkingStageId = a_nWorkingStageId;
             m_nWorkingStageId = a_nWorkingStageId;
         }
         }
 
 
-      public  bool ConverOTSToSEMPoint(System.Windows.Point a_OTSpt, System.Drawing.Point a_SEMpt)
+      public  bool ConverOTSToSEMPoint(System.Drawing.Point a_OTSpt, System.Drawing.Point a_SEMpt)
         {
         {
             //SEM check
             //SEM check
             if (m_pStageData == null)//if (*m_pStageData.get() == CSEMStageData())
             if (m_pStageData == null)//if (*m_pStageData.get() == CSEMStageData())

+ 5 - 5
OTS/OTSModelSharp/OTSDataType/CHoleBSEImg.cs

@@ -16,14 +16,14 @@ namespace OTSDataType
         //hole name
         //hole name
         protected int m_nHoleID;
         protected int m_nHoleID;
         //image position
         //image position
-        protected System.Windows.Point m_poiPosition = new System.Windows.Point();
+        protected System.Drawing.Point m_poiPosition = new System.Drawing.Point();
 
 
         public CHoleBSEImg()
         public CHoleBSEImg()
         {
         {
             Init();
             Init();
         }
         }
 
 
-        public CHoleBSEImg(Rectangle a_rectImage, int a_nHoleID, System.Windows.Point a_poiPosition)										// constructor
+        public CHoleBSEImg(Rectangle a_rectImage, int a_nHoleID, System.Drawing.Point a_poiPosition)										// constructor
 	   {
 	   {
 		   Init();
 		   Init();
            // set image rectangle and create memory for image data
            // set image rectangle and create memory for image data
@@ -76,11 +76,11 @@ namespace OTSDataType
         }
         }
 
 
         // position
         // position
-        public System.Windows.Point GetPosition()
+        public System.Drawing.Point GetPosition()
         {
         {
             return m_poiPosition;
             return m_poiPosition;
         }
         }
-        public void SetPosition(System.Windows.Point a_poiPosition)
+        public void SetPosition(System.Drawing.Point a_poiPosition)
         {
         {
             m_poiPosition = a_poiPosition;
             m_poiPosition = a_poiPosition;
         }
         }
@@ -98,7 +98,7 @@ namespace OTSDataType
             base.Init();
             base.Init();
             // initialization
             // initialization
             m_nHoleID = 0;
             m_nHoleID = 0;
-            m_poiPosition = new System.Windows.Point(0, 0);
+            m_poiPosition = new System.Drawing.Point(0, 0);
         }
         }
 
 
         // duplication 
         // duplication 

+ 3 - 3
OTS/OTSModelSharp/OTSDataType/CMsrSampleStatus.cs

@@ -41,7 +41,7 @@ namespace OTSDataType
         TimeSpan m_timeUsed = new TimeSpan();
         TimeSpan m_timeUsed = new TimeSpan();
         TimeSpan m_timeUsedLast = new TimeSpan();
         TimeSpan m_timeUsedLast = new TimeSpan();
 
 
-        List<System.Windows.Point> m_listCpltedCenter = new List<System.Windows.Point>();
+        List<System.Drawing.Point> m_listCpltedCenter = new List<System.Drawing.Point>();
 
 
 
 
         int m_nCompletedFields;
         int m_nCompletedFields;
@@ -168,12 +168,12 @@ namespace OTSDataType
 
 
         // completed fieldCenter
         // completed fieldCenter
 
 
-        public List<System.Windows.Point> GetCompletedFieldsCenter()
+        public List<System.Drawing.Point> GetCompletedFieldsCenter()
         {
         {
             return m_listCpltedCenter;
             return m_listCpltedCenter;
         }
         }
 
 
-        public void SetCompletedFieldsCenter(List<System.Windows.Point> a_listCpltedCenter)
+        public void SetCompletedFieldsCenter(List<System.Drawing.Point> a_listCpltedCenter)
         {
         {
 
 
             //  m_listCpltedCenter = a_listCpltedCenter;
             //  m_listCpltedCenter = a_listCpltedCenter;

+ 4 - 4
OTS/OTSModelSharp/OTSDataType/COTSFieldData.cs

@@ -14,7 +14,7 @@ namespace OTSDataType
         int m_nID;
         int m_nID;
 
 
         // position (from field center manager) 
         // position (from field center manager) 
-        System.Windows.Point m_poiPos = new System.Windows.Point();
+        System.Drawing.Point m_poiPos = new System.Drawing.Point();
 
 
         // field file folder
         // field file folder
         String m_strFieldFileFolder;
         String m_strFieldFileFolder;
@@ -38,7 +38,7 @@ namespace OTSDataType
         {
         {
             // initialization
             // initialization
             m_nID = -1;
             m_nID = -1;
-            m_poiPos =new  System.Windows.Point(0, 0);
+            m_poiPos =new  System.Drawing.Point(0, 0);
             m_strFieldFileFolder = "";
             m_strFieldFileFolder = "";
             m_listParticles.Clear();
             m_listParticles.Clear();
         }
         }
@@ -100,12 +100,12 @@ namespace OTSDataType
         }
         }
 
 
         // position (from field center manager) 
         // position (from field center manager) 
-       public  System.Windows.Point GetPosition()
+       public  System.Drawing.Point GetPosition()
         {
         {
             return m_poiPos;
             return m_poiPos;
         }
         }
 
 
-       public  void SetPosition(System.Windows.Point a_poiPos)
+       public  void SetPosition(System.Drawing.Point a_poiPos)
         {
         {
             m_poiPos = a_poiPos;
             m_poiPos = a_poiPos;
         }
         }