Przeglądaj źródła

更新部分代码

zty 3 lat temu
rodzic
commit
bea5a60ab0

+ 63 - 60
OTSIncAMeasureApp/0-OTSModel/Measure/4-ReMeasure/SmplMeasureReMeasure.cs

@@ -1,5 +1,6 @@
 using OTSCLRINTERFACE;
 using OTSCommon;
+using OTSCommon.Model;
 using OTSModelSharp;
 using OTSModelSharp.ServiceInterface;
 using System;
@@ -18,81 +19,83 @@ namespace OTSMeasureApp._0_OTSModel.Measure._4_ReMeasure
         ScanController scan = ScanController.GetScanController();
         EDSController eds = EDSController.GetEDSController();
 
-        public bool ReMeasure(string samplePath, int width, int height, List<int> FieldIDList, List<int> XrayIDList, List<Point> FieldPoxList, List<Point> XrayPoxList, List<Rectangle> RectList, List<List<int>> SegmentStart, List<List<int>> SegmentHeight, List<List<int>> SegmentLength, int IMGSCANSPEED_INDEX, int XRAYSCANMODE_INDEX, int NUD_SCANTIME_COUNT)
+        public bool ReMeasure(string samplePath, int width, int height, Dictionary<int, List<Particle>> keyValues, int IMGSCANSPEED_INDEX, int XRAYSCANMODE_INDEX, int NUD_SCANTIME_COUNT)
         {
-            sem.Connect();
-            //上一个颗粒所在帧图位置
-            int lastFieldPosX = -1;
-            int lastFieldPosY = -1;
-            bool isCreate = false;
-            for (int i = 0; i < FieldIDList.Count; i++)
+            try
             {
-                //判断是否在同一帧图
-                if (FieldPoxList[i].X != lastFieldPosX && FieldPoxList[i].Y != lastFieldPosY)
-                {
-                    //移动到当前帧
-                    sem.MoveSEMToPoint(FieldPoxList[i].X, FieldPoxList[i].Y);
-                    lastFieldPosX = FieldPoxList[i].X;
-                    lastFieldPosY = FieldPoxList[i].Y;
-                    isCreate = true;
-                }
+                sem.Connect();
+                //参数定义
                 int nBrukerDwellTimeId = 3;
                 long nBrukerDwellTime = 0;
-                if (isCreate)
+                switch (IMGSCANSPEED_INDEX)
+                {
+                    case (int)OTS_IMAGE_SCANSPEED_OPTIONS.low:
+                        nBrukerDwellTimeId = 3;
+                        break;
+                    case (int)OTS_IMAGE_SCANSPEED_OPTIONS.meddium:
+                        nBrukerDwellTimeId = 4;
+                        break;
+                    case (int)OTS_IMAGE_SCANSPEED_OPTIONS.high:
+                        nBrukerDwellTimeId = 5;
+                        break;
+                    default:
+                        nBrukerDwellTimeId = 3;
+                        break;
+                }
+                nBrukerDwellTime = DWELLTIME_BRUKER_VALUES[nBrukerDwellTimeId];
+                //按帧图分析
+                for (int i = 0; i < keyValues.Count; i++)
                 {
+                    List<COTSParticleClr> cOTSParticleClrs = new List<COTSParticleClr>();
+                    //移动到当前帧
+                    sem.MoveSEMToPoint(keyValues[i][0].FieldPosX, keyValues[i][0].FieldPosY);
                     //采集图像
-                    switch (IMGSCANSPEED_INDEX)
-                    {
-                        case (int)OTS_IMAGE_SCANSPEED_OPTIONS.low:
-                            nBrukerDwellTimeId = 3;
-                            break;
-                        case (int)OTS_IMAGE_SCANSPEED_OPTIONS.meddium:
-                            nBrukerDwellTimeId = 4;
-                            break;
-                        case (int)OTS_IMAGE_SCANSPEED_OPTIONS.high:
-                            nBrukerDwellTimeId = 5;
-                            break;
-                        default:
-                            nBrukerDwellTimeId = 3;
-                            break;
-                    }
-                    nBrukerDwellTime = DWELLTIME_BRUKER_VALUES[nBrukerDwellTimeId];
                     scan.SetDwellTime(nBrukerDwellTimeId);
                     scan.SetImageSize(width, height);
                     CBSEImgClr imgClr = scan.AcquireBSEImage(0, 0, (int)nBrukerDwellTime);
                     Bitmap bitmap = Imagepro.ToGrayBitmap(imgClr.GetImageDataPtr(), width, height);
-                    bitmap.Save(samplePath + FieldIDList, System.Drawing.Imaging.ImageFormat.Bmp);
-                    isCreate = false;
-                }
+                    bitmap.Save(samplePath + keyValues[i][0].FieldId, System.Drawing.Imaging.ImageFormat.Bmp);
 
-                //打能谱
-                List<COTSParticleClr> cOTSParticleClrs = new List<COTSParticleClr>();
-                if (XRAYSCANMODE_INDEX == (int)OTS_X_RAY_SCAN_MODE.PointMode)
-                {
-                    for (int j = 0; j < XrayPoxList.Count; j++)
+                    //打能谱
+                    if (XRAYSCANMODE_INDEX == (int)OTS_X_RAY_SCAN_MODE.PointMode)
                     {
-                        COTSParticleClr cOTSParticle = new COTSParticleClr();
-                        CPosXrayClr cPosXray = new CPosXrayClr();
-                        cOTSParticle.SetXray(cPosXray);
-                        cOTSParticle.SetXRayPos(new Point(XrayPoxList[j].X, XrayPoxList[j].Y));
-                        cOTSParticle.SetParticleRect(RectList[j]);
-                        cOTSParticleClrs.Add(cOTSParticle);
+                        for (int j = 0; j < keyValues[i].Count; j++)
+                        {
+                            COTSParticleClr cOTSParticle = new COTSParticleClr();
+                            CPosXrayClr cPosXray = new CPosXrayClr();
+                            cOTSParticle.SetXray(cPosXray);
+                            cOTSParticle.SetXRayPos(new Point(keyValues[i][j].PosX, keyValues[i][j].PosY));
+                            cOTSParticleClrs.Add(cOTSParticle);
+                        }
+                        eds.GetXRayByPoints(cOTSParticleClrs, (uint)nBrukerDwellTime, true);
+                    }
+                    else
+                    {
+                        for (int j = 0; j < keyValues[i].Count; j++)
+                        {
+                            COTSParticleClr cOTSParticle = new COTSParticleClr();
+                            CPosXrayClr cPosXray = new CPosXrayClr();
+                            cOTSParticle.SetXray(cPosXray);
+                            cOTSParticle.SetParticleRect(new Rectangle(keyValues[i][j].RectLeft, keyValues[i][j].RectTop, keyValues[i][j].RectWidth, keyValues[i][j].RectHeight));
+                            COTSFeatureClr fea = new COTSFeatureClr();
+                            List<COTSSegmentClr> segs = new List<COTSSegmentClr>();
+                            for (int k = 0; k < keyValues[i][j].SegmentNum; k++)
+                            {
+                                segs.Add(new COTSSegmentClr(keyValues[i][j].SegmentList[k].Height, keyValues[i][j].SegmentList[k].Start, keyValues[i][j].SegmentList[k].Length));
+                            }
+                            fea.SetSegmentsList(segs, false);
+                            cOTSParticle.SetFeature(fea);
+                            cOTSParticleClrs.Add(cOTSParticle);
+                        }
+                        eds.GetXRayByFeatures(cOTSParticleClrs, (uint)nBrukerDwellTime, true);
                     }
-                    eds.GetXRayByPoints(cOTSParticleClrs, (uint)nBrukerDwellTime, true);
-                }
-                else
-                {
-                    //采集XRay数据
-                    COTSFeatureClr fea = new COTSFeatureClr();
-                    List<COTSSegmentClr> segs = new List<COTSSegmentClr>();
-                    segs.Add(new COTSSegmentClr(5, 10, 12));
-                    segs.Add(new COTSSegmentClr(6, 10, 12));
-                    segs.Add(new COTSSegmentClr(7, 10, 12));
-                    fea.SetSegmentsList(segs, false);
-                    eds.GetXRayByFeatures(cOTSParticleClrs, (uint)nBrukerDwellTime, true);
                 }
+                return true;
+            }
+            catch (Exception)
+            {
+                return false;
             }
-            return true;
         }
     }
 }

+ 3 - 2
OTSIncAMeasureApp/ServiceCenter/IpcSEMController.cs

@@ -1,4 +1,5 @@
 using OTSCLRINTERFACE;
+using OTSCommon.Model;
 using OTSDataType;
 using OTSMeasureApp._0_OTSModel.Measure._4_ReMeasure;
 using OTSModelSharp;
@@ -34,10 +35,10 @@ namespace OTSMeasureApp.ServiceCenter
             return sem.GetSemPositionXY(ref a_dPositionX, ref a_dPositionY, ref a_dPositionR);
         }
 
-        public bool ReMeasure(string samplePath, int width, int height, List<int> FieldIDList, List<int> XrayIDList, List<Point> FieldPoxList, List<Point> XrayPoxList, List<Rectangle> RectList, List<List<int>> SegmentStart, List<List<int>> SegmentHeight, List<List<int>> SegmentLength, int IMGSCANSPEED_INDEX, int XRAYSCANMODE_INDEX, int NUD_SCANTIME_COUNT)
+        public bool ReMeasure(string samplePath, int width, int height, Dictionary<int, List<Particle>> keyValues, int IMGSCANSPEED_INDEX, int XRAYSCANMODE_INDEX, int NUD_SCANTIME_COUNT)
         {
             SmplMeasureReMeasure smplMeasure = new SmplMeasureReMeasure();
-            bool isSuccess = smplMeasure.ReMeasure(samplePath, width, height, FieldIDList, XrayIDList, FieldPoxList, XrayPoxList, RectList, SegmentStart, SegmentHeight, SegmentLength, IMGSCANSPEED_INDEX, XRAYSCANMODE_INDEX, NUD_SCANTIME_COUNT);
+            bool isSuccess = smplMeasure.ReMeasure(samplePath, width, height, keyValues, IMGSCANSPEED_INDEX, XRAYSCANMODE_INDEX, NUD_SCANTIME_COUNT);
 
             return isSuccess;
         }

+ 2 - 2
OTSIncAReportApp/1-UI/Control_Grids/OTSIncAReportGridsFuncation/OTSReportGridsFun.cs

@@ -200,11 +200,11 @@ namespace OTSIncAReportGrids.OTSIncAReportGridsFuncation
         /// <param name="imgscanspeed_index">图像质量索引</param>
         /// <param name="xrayscanmode_index">扫描模式索引</param>
         /// <param name="scantime_count">扫描时间(毫秒)</param>
-        public void ReMeasure(string samplePath, int width, int height, List<int> FieldIDList, List<int> XrayIDList, List<Point> FieldPoxList, List<Point> XrayPoxList, List<Rectangle> RectList, List<List<int>> SegmentStart, List<List<int>> SegmentHeight, List<List<int>> SegmentLength, int IMGSCANSPEED_INDEX, int XRAYSCANMODE_INDEX, int NUD_SCANTIME_COUNT)
+        public void ReMeasure(string samplePath, int width, int height, Dictionary<int, List<Particle>> keyValues, int IMGSCANSPEED_INDEX, int XRAYSCANMODE_INDEX, int NUD_SCANTIME_COUNT)
         {
             if (m_SEMConnectionState)
             {
-                m_cfun.ReMeasure(samplePath, width, height, FieldIDList, XrayIDList, FieldPoxList, XrayPoxList, RectList, SegmentStart, SegmentHeight, SegmentLength, IMGSCANSPEED_INDEX, XRAYSCANMODE_INDEX, NUD_SCANTIME_COUNT);
+                m_cfun.ReMeasure(samplePath, width, height, keyValues, IMGSCANSPEED_INDEX, XRAYSCANMODE_INDEX, NUD_SCANTIME_COUNT);
             }
 
         }

+ 2 - 136
OTSIncAReportApp/1-UI/Control_Grids/ParticlesGridDevidePage.Designer.cs

@@ -72,9 +72,6 @@
             this.ToolStripMenuItem_selectparticle = new System.Windows.Forms.ToolStripMenuItem();
             this.ToolStripMenuItem_exportimagefile = new System.Windows.Forms.ToolStripMenuItem();
             this.EXCELToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.ToolStripMenuItemDelete_Particle = new System.Windows.Forms.ToolStripMenuItem();
-            this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
-            this.dgV_ParticlesDevidePage = new System.Windows.Forms.DataGridView();
             this.panel2.SuspendLayout();
             this.panel1.SuspendLayout();
             this.contextMenuStrip1.SuspendLayout();
@@ -389,16 +386,11 @@
             this.ToolStripMenuItem_selectparticle,
             this.ToolStripMenuItem_exportimagefile,
             this.testToolStripMenuItem,
-            this.EXCELToolStripMenuItem,
-            this.ToolStripMenuItemDelete_Particle});
+            this.EXCELToolStripMenuItem});
             this.contextMenuStrip1.Name = "contextMenuStrip1";
-<<<<<<< .mine
-            this.contextMenuStrip1.Size = new System.Drawing.Size(219, 310);
-=======
             this.contextMenuStrip1.Size = new System.Drawing.Size(219, 280);
->>>>>>> .theirs
             // 
-            // ToolStripMenuItem1
+            // toolStripSeparator1
             // 
             this.toolStripSeparator1.Name = "toolStripSeparator1";
             this.toolStripSeparator1.Size = new System.Drawing.Size(215, 6);
@@ -479,21 +471,8 @@
             this.toolStripMenuItem4.Text = "复制图像";
             this.toolStripMenuItem4.Click += new System.EventHandler(this.toolStripMenuItem4_Click);
             // 
-            // toolStripSeparator1
-            // 
-<<<<<<< .mine
-            this.toolStripSeparator1.Name = "toolStripSeparator1";
-            this.toolStripSeparator1.Size = new System.Drawing.Size(215, 6);
-            // 
             // ToolStripMenuItem3
             // 
-=======
-
-
-
-
-
->>>>>>> .theirs
             this.ToolStripMenuItem3.Image = global::OTSIncAReportApp.Properties.Resources.恢复;
             this.ToolStripMenuItem3.Name = "ToolStripMenuItem3";
             this.ToolStripMenuItem3.Size = new System.Drawing.Size(218, 30);
@@ -524,126 +503,17 @@
             this.ToolStripMenuItem_exportimagefile.Text = "导出图像文件";
             this.ToolStripMenuItem_exportimagefile.Click += new System.EventHandler(this.ToolStripMenuItem_exportimagefile_Click);
             // 
-            // testToolStripMenuItem
-            // 
-<<<<<<< .mine
-            this.testToolStripMenuItem.Name = "testToolStripMenuItem";
-            this.testToolStripMenuItem.Size = new System.Drawing.Size(218, 30);
-            this.testToolStripMenuItem.Text = "显示能谱数据";
-            this.testToolStripMenuItem.Visible = false;
-            this.testToolStripMenuItem.Click += new System.EventHandler(this.testToolStripMenuItem_Click);
-            // 
             // EXCELToolStripMenuItem
             // 
-=======
-
-
-
-
-
-
-
-
->>>>>>> .theirs
             this.EXCELToolStripMenuItem.Image = global::OTSIncAReportApp.Properties.Resources.导出所有数据到EXCEL321;
             this.EXCELToolStripMenuItem.Name = "EXCELToolStripMenuItem";
             this.EXCELToolStripMenuItem.Size = new System.Drawing.Size(218, 30);
             this.EXCELToolStripMenuItem.Text = "导出EXCEL";
             this.EXCELToolStripMenuItem.Click += new System.EventHandler(this.EXCELToolStripMenuItem_Click);
             // 
-<<<<<<< .mine
-            // ToolStripMenuItemDelete_Particle
-=======
             // ParticlesGridDevidePage
->>>>>>> .theirs
             // 
-<<<<<<< .mine
-            this.ToolStripMenuItemDelete_Particle.Name = "ToolStripMenuItemDelete_Particle";
-            this.ToolStripMenuItemDelete_Particle.Size = new System.Drawing.Size(218, 30);
-            this.ToolStripMenuItemDelete_Particle.Text = "Delete particles";
-            this.ToolStripMenuItemDelete_Particle.Click += new System.EventHandler(this.ToolStripMenuItem_Delete_Particle_Click);
-            // 
-            // tableLayoutPanel1
-            // 
-            this.tableLayoutPanel1.ColumnCount = 1;
-            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
-            this.tableLayoutPanel1.Controls.Add(this.panel2, 0, 0);
-            this.tableLayoutPanel1.Controls.Add(this.dgV_ParticlesDevidePage, 0, 1);
-            this.tableLayoutPanel1.Controls.Add(this.panel1, 0, 2);
-            this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
-            this.tableLayoutPanel1.Name = "tableLayoutPanel1";
-            this.tableLayoutPanel1.RowCount = 3;
-            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 43F));
-            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
-            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 45F));
-            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 13F));
-            this.tableLayoutPanel1.Size = new System.Drawing.Size(1508, 835);
-            this.tableLayoutPanel1.TabIndex = 7;
-            // 
-            // dgV_ParticlesDevidePage
-            // 
-            this.dgV_ParticlesDevidePage.AllowUserToAddRows = false;
-            this.dgV_ParticlesDevidePage.AllowUserToDeleteRows = false;
-            this.dgV_ParticlesDevidePage.BackgroundColor = System.Drawing.SystemColors.ButtonHighlight;
-            this.dgV_ParticlesDevidePage.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            this.dgV_ParticlesDevidePage.ContextMenuStrip = this.contextMenuStrip1;
-            this.dgV_ParticlesDevidePage.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.dgV_ParticlesDevidePage.Location = new System.Drawing.Point(3, 46);
-            this.dgV_ParticlesDevidePage.Name = "dgV_ParticlesDevidePage";
-            this.dgV_ParticlesDevidePage.ReadOnly = true;
-            this.dgV_ParticlesDevidePage.RowHeadersWidth = 4;
-            this.dgV_ParticlesDevidePage.RowTemplate.Height = 23;
-            this.dgV_ParticlesDevidePage.Size = new System.Drawing.Size(1502, 741);
-            this.dgV_ParticlesDevidePage.TabIndex = 5;
-            // 
-            // ParticlesGridDevidePage
-            // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
-=======
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
->>>>>>> .theirs
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.Controls.Add(this.tableLayoutPanel1);
             this.Name = "ParticlesGridDevidePage";
@@ -703,10 +573,6 @@
         private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
         private System.Windows.Forms.ToolStripMenuItem EXCELToolStripMenuItem;
         private System.Windows.Forms.DataGridView dgV_ParticlesDevidePage;
-<<<<<<< .mine
-        private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItemDelete_Particle;
-=======
         private System.Windows.Forms.Button btn_ReMeasure;
->>>>>>> .theirs
     }
 }

+ 13 - 24
OTSIncAReportApp/1-UI/Control_Grids/ParticlesGridDevidePage.cs

@@ -1093,39 +1093,28 @@ namespace OTSIncAReportGrids
                 m_mythread_state = true;
                 //颗粒信息
                 List<Particle> ParticleList = (List<Particle>)particles;
+                Dictionary<int, List<Particle>> keyValues = new Dictionary<int, List<Particle>>();
                 Dictionary<string, object> sampleMembers = ((Dictionary<string, object>)((Dictionary<string, object>)result.ResultInfo["Sample"])["Members"]);
                 Dictionary<string, object> imageScanParam = (Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)sampleMembers["MsrParams"])["Members"])["ImageScanParam"];
                 string ImageResolution = imageScanParam["ImageResolution"].ToString();
                 double width = Convert.ToDouble(ImageResolution.Split('_')[1]);
                 double height = Convert.ToDouble(ImageResolution.Split('_')[2]);
-                List<int> FieldIDList = new List<int>();
-                List<int> XrayIDList = new List<int>();
-                List<Point> FieldPoxList = new List<Point>();
-                List<Point> XrayPoxList = new List<Point>();
-                List<Rectangle> RectList = new List<Rectangle>();
-                List<List<int>> SegmentStart = new List<List<int>>();
-                List<List<int>> SegmentHeight = new List<List<int>>();
-                List<List<int>> SegmentLength = new List<List<int>>();
+                
                 ParticleList.OrderBy(a => a.FieldId).ToList();
                 for (int i = 0; i < ParticleList.Count; i++)
                 {
-                    FieldIDList.Add(ParticleList[i].FieldId);
-                    XrayIDList.Add(ParticleList[i].XrayId);
-                    FieldPoxList.Add(new Point(ParticleList[i].FieldPosX, ParticleList[i].FieldPosY));
-                    XrayPoxList.Add(new Point(ParticleList[i].PosX, ParticleList[i].PosY));
-                    RectList.Add(new Rectangle(ParticleList[i].RectLeft, ParticleList[i].RectTop, ParticleList[i].RectWidth, ParticleList[i].RectHeight));
-                    List<int> SgStart = new List<int>();
-                    List<int> SgHeight = new List<int>();
-                    List<int> SgLength = new List<int>();
-                    for (int j = 0; j < ParticleList[i].SegmentNum; j++)
+                    if (keyValues.ContainsKey(ParticleList[i].FieldId))
+                    {
+                        List<Particle> Particles = keyValues.ElementAt(ParticleList[i].FieldId).Value;
+                        Particles.Add(ParticleList[i]);
+                        keyValues[ParticleList[i].FieldId] = Particles;
+                    }
+                    else
                     {
-                        SgStart.Add(ParticleList[i].SegmentList[j].Start);
-                        SgHeight.Add(ParticleList[i].SegmentList[j].Height);
-                        SgLength.Add(ParticleList[i].SegmentList[j].Length);
+                        List<Particle> Particles = new List<Particle>();
+                        Particles.Add(ParticleList[i]);
+                        keyValues.Add(ParticleList[i].FieldId, Particles);
                     }
-                    SegmentStart.Add(SgStart);
-                    SegmentHeight.Add(SgHeight);
-                    SegmentLength.Add(SgLength);
                 }
 
                 //第一步,连接电镜
@@ -1136,7 +1125,7 @@ namespace OTSIncAReportGrids
                 //第二步,移动到指定位置,先读取再设置
                 if (m_OTSIncAReportGridsFun.m_SEMConnectionState == true)
                 {
-                    m_OTSIncAReportGridsFun.ReMeasure(result.FilePath, (int)width, (int)height, FieldIDList, XrayIDList, FieldPoxList, XrayPoxList, RectList, SegmentStart, SegmentHeight, SegmentLength, frmReMeasure.IMGSCANSPEED_INDEX, frmReMeasure.XRAYSCANMODE_INDEX, frmReMeasure.NUD_SCANTIME_COUNT);
+                    m_OTSIncAReportGridsFun.ReMeasure(result.FilePath, (int)width, (int)height, keyValues, frmReMeasure.IMGSCANSPEED_INDEX, frmReMeasure.XRAYSCANMODE_INDEX, frmReMeasure.NUD_SCANTIME_COUNT);
                 }
 
                 Thread.Sleep(1500);

+ 4 - 3
OTSIncAReportApp/1-UI/OTSMgrInfo/frmReportSysConfig.cs

@@ -1,4 +1,5 @@
-using OTSIncAReportApp;
+using OTSCommon.Model;
+using OTSIncAReportApp;
 using OTSIncAReportApp.Controls;
 using OTSIncAReportApp.OTSDataMgrFunction;
 using OTSIncAReportApp.OTSMgrInfo;
@@ -498,10 +499,10 @@ namespace OTSIncAReprotCharts
                 cb_Orientation.Checked = true;
             }
 
-            List<OTSIncAReportApp.DataOperation.Model.ResultFile> resfileList = m_ReportApp.m_rstDataMgr.ResultFilesList;
+            List<ResultFile> resfileList = m_ReportApp.m_rstDataMgr.ResultFilesList;
             if (resfileList.Count > 0)
             {
-                OTSIncAReportApp.DataOperation.Model.ResultFile resfile = resfileList[m_ReportApp.m_rstDataMgr.GetWorkingResult()];
+                ResultFile resfile = resfileList[m_ReportApp.m_rstDataMgr.GetWorkingResult()];
 
                 if (((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)resfile.ResultInfo["Sample"])["Members"])["MsrParams"])["SysType"].ToString() == "1:CleannessA")
                 {

+ 2 - 2
OTSIncAReportApp/3-ServiceCenter/HardwareController.cs

@@ -108,7 +108,7 @@ namespace ServiceInterface
             return false;
         }
 
-        public bool ReMeasure(string samplePath, int width, int height, List<int> FieldIDList, List<int> XrayIDList, List<Point> FieldPoxList, List<Point> XrayPoxList, List<Rectangle> RectList, List<List<int>> SegmentStart, List<List<int>> SegmentHeight, List<List<int>> SegmentLength, int IMGSCANSPEED_INDEX, int XRAYSCANMODE_INDEX, int NUD_SCANTIME_COUNT)
+        public bool ReMeasure(string samplePath, int width, int height, Dictionary<int, List<Particle>> keyValues, int IMGSCANSPEED_INDEX, int XRAYSCANMODE_INDEX, int NUD_SCANTIME_COUNT)
         {
             //Connect();
             if (remoteObj == null)
@@ -119,7 +119,7 @@ namespace ServiceInterface
 
             try
             {
-                return remoteObj.ReMeasure(samplePath, width, height, FieldIDList, XrayIDList, FieldPoxList, XrayPoxList, RectList, SegmentStart, SegmentHeight, SegmentLength, IMGSCANSPEED_INDEX, XRAYSCANMODE_INDEX, NUD_SCANTIME_COUNT);
+                return remoteObj.ReMeasure(samplePath, width, height, keyValues, IMGSCANSPEED_INDEX, XRAYSCANMODE_INDEX, NUD_SCANTIME_COUNT);
             }
             catch (Exception e)
             {