ソースを参照

fix the problems in sysMgrApp

gsp 1 年間 前
コミット
35d6cd9643

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

@@ -40,15 +40,15 @@ namespace OTSMeasureApp._0_OTSModel.Measure._4_ReMeasure
         /// <param name="sampleName"></param>
         /// <param name="a_pBSEImg"></param>
         /// <returns></returns>
-        public byte[] SetReFldInfo(CBSEImgClr a_pBSEImg)
+        public byte[] SetReFldInfo(string sampleName,CBSEImgClr a_pBSEImg)
         {
            
             aMeasureAppForm = (OTSIncAMeasureAppForm)Application.OpenForms["OTSIncAMeasureAppForm"];
-            //COTSSample sampleClr = aMeasureAppForm.m_ProjData.GetSampleByName(sampleName);
+            COTSSample sampleClr = aMeasureAppForm.m_ProjData.GetSampleByName(sampleName);
             curFldData = new COTSFieldData(new Point(0, 0), m_Sample.CalculatePixelSize());
             curFldData.SetId(0);
             curFldData.SetBSEImage(a_pBSEImg);
-            //SetSample(sampleClr);
+            SetSample(sampleClr);
             var expC = m_Sample.GetMsrParams().GetXRayParam().GetAnalyExpCount();
             var imgwidth = m_Sample.GetMsrParams().GetImageScanParam().GetImageResolutionSize().cx;
             var imgheight = m_Sample.GetMsrParams().GetImageScanParam().GetImageResolutionSize().cy;

+ 6 - 0
OTSIncAMeasureApp/0-OTSModel/Measure/ParamData/COTSMsrPrjResultData.cs

@@ -504,7 +504,13 @@ namespace OTSModelSharp
             string[] str2 = str1[0].Split('/');
             return str2[2] + "/" + str2[1] + "/" + str2[0] +" "+ str1[1];
         }
+        public string GetSampleWorkingFolder(string sampleName)
+        {
+            var pathname = FileHelper.GetFolderName(GetPathName());
 
+            var samplePathName = pathname + "\\" + sampleName + "\\";
+            return samplePathName;
+        }
         public bool Save()
         {
             // Save or Save As, if strPathName is not empty, it is exist in the computer, this is a save action

+ 21 - 14
OTSIncAMeasureApp/ServiceCenter/IpcSEMController.cs

@@ -13,8 +13,15 @@ namespace OTSMeasureApp.ServiceCenter
     {
         private ISemController sem = SemController.GetSEMController();
         private IScanController scan = ScanController.GetScanController();
-        //SmplMeasureReMeasure measureReMeasure;
-
+        SmplMeasureReMeasure measureReMeasure;
+        public bool TestConn()
+        {
+            if (!sem.IsConnected())
+            {
+                return false;
+            }
+            return true;
+        }
         public bool MoveSEMToPoint(Point poi)
         {
             if (!sem.IsConnected())
@@ -41,26 +48,26 @@ namespace OTSMeasureApp.ServiceCenter
             return sem.SetMagnification(a_dMagnification);
         }
 
-        public bool AcquireBSEImage(int width, int height, int dwellTime, ref byte[] ImageByte)
+        public bool AcquireBSEImage(string sampleName, int width, int height, int dwellTime, ref byte[] ImageByte)
         {
+            scan.Init();
             scan.SetDwellTime(dwellTime);
             scan.SetImageSize(width, height);
 
-            //ImageByte = measureReMeasure.SetReFldInfo("sample1", scan.AcquireBSEImage());
+         var   aMeasureAppForm = (OTSIncAMeasureAppForm)Application.OpenForms["OTSIncAMeasureAppForm"];
+            COTSSample sampleClr = aMeasureAppForm.m_ProjData.GetSampleByName(sampleName);
+           var samplePath=aMeasureAppForm.m_ProjData.GetSampleWorkingFolder(sampleName);
+            measureReMeasure = new SmplMeasureReMeasure(samplePath, sampleClr);
+            ImageByte = measureReMeasure.SetReFldInfo(sampleName, scan.AcquireBSEImage());
 
             return true;
         }
 
+        public bool AcquisitionSpectrum(string samplePath, int xrayMode, double new_PixelSize, ref Particle particle, uint a_nXRayAQTime)
+        {
+            return measureReMeasure.AcquisitionSpectrum(samplePath, xrayMode, new_PixelSize, ref particle, a_nXRayAQTime);
+        }
 
-        //public bool ReMeasure(string samplePath, int width, int height, Dictionary<int, List<Particle>> keyValues, int IMGSCANSPEED_INDEX, int XRAYSCANMODE_INDEX, int NUD_SCANTIME_COUNT)
-        //{
-        //    OTSIncAMeasureAppForm aMeasureAppForm = (OTSIncAMeasureAppForm)Application.OpenForms["OTSIncAMeasureAppForm"];
-        //    COTSSample sampleClr = aMeasureAppForm.m_ProjData.GetSampleByName("sample1");
-           
-        //    //SmplMeasureReMeasure smplMeasure = new SmplMeasureReMeasure();
-        //    bool isSuccess = smplMeasure.ReMeasure(samplePath, width, height, keyValues, IMGSCANSPEED_INDEX, XRAYSCANMODE_INDEX, NUD_SCANTIME_COUNT);
-
-        //    return isSuccess;
-        //}
+        
     }
 }

+ 38 - 28
OTSSysMgrApp/About.Designer.cs

@@ -43,18 +43,20 @@
             // label1
             // 
             this.label1.AutoSize = true;
-            this.label1.Font = new System.Drawing.Font("微软雅黑", 7.5F, System.Drawing.FontStyle.Bold);
-            this.label1.Location = new System.Drawing.Point(23, 12);
+            this.label1.Font = new System.Drawing.Font("Microsoft YaHei", 7.5F, System.Drawing.FontStyle.Bold);
+            this.label1.Location = new System.Drawing.Point(15, 8);
+            this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(136, 19);
+            this.label1.Size = new System.Drawing.Size(92, 15);
             this.label1.TabIndex = 1;
             this.label1.Text = "OTS System IncA";
             // 
             // button1
             // 
-            this.button1.Location = new System.Drawing.Point(498, 252);
+            this.button1.Location = new System.Drawing.Point(332, 168);
+            this.button1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.button1.Name = "button1";
-            this.button1.Size = new System.Drawing.Size(106, 37);
+            this.button1.Size = new System.Drawing.Size(71, 25);
             this.button1.TabIndex = 2;
             this.button1.Text = "关  闭";
             this.button1.UseVisualStyleBackColor = true;
@@ -63,70 +65,77 @@
             // listBox1
             // 
             this.listBox1.FormattingEnabled = true;
-            this.listBox1.ItemHeight = 18;
+            this.listBox1.ItemHeight = 12;
             this.listBox1.Items.AddRange(new object[] {
             "OTS IncA Measure APP",
             "OTS IncA Report APP",
             "OTS Tool App"});
-            this.listBox1.Location = new System.Drawing.Point(12, 170);
+            this.listBox1.Location = new System.Drawing.Point(8, 113);
+            this.listBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.listBox1.Name = "listBox1";
-            this.listBox1.Size = new System.Drawing.Size(592, 76);
+            this.listBox1.Size = new System.Drawing.Size(396, 52);
             this.listBox1.TabIndex = 3;
             // 
             // label2
             // 
             this.label2.AutoSize = true;
-            this.label2.Font = new System.Drawing.Font("微软雅黑", 7.5F, System.Drawing.FontStyle.Bold);
-            this.label2.Location = new System.Drawing.Point(22, 39);
+            this.label2.Font = new System.Drawing.Font("Microsoft YaHei", 7.5F, System.Drawing.FontStyle.Bold);
+            this.label2.Location = new System.Drawing.Point(15, 26);
+            this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(70, 19);
+            this.label2.Size = new System.Drawing.Size(48, 15);
             this.label2.TabIndex = 1;
-            this.label2.Text = "版本1.31";
+            this.label2.Text = "版本2.71";
             // 
             // label3
             // 
             this.label3.AutoSize = true;
-            this.label3.Font = new System.Drawing.Font("微软雅黑", 7.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(22, 67);
+            this.label3.Font = new System.Drawing.Font("Microsoft YaHei", 7.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label3.Location = new System.Drawing.Point(15, 45);
+            this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(214, 19);
+            this.label3.Size = new System.Drawing.Size(145, 15);
             this.label3.TabIndex = 1;
             this.label3.Text = "©2019 OPTON Corporation";
             // 
             // label4
             // 
             this.label4.AutoSize = true;
-            this.label4.Location = new System.Drawing.Point(12, 146);
+            this.label4.Location = new System.Drawing.Point(8, 97);
+            this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(107, 18);
+            this.label4.Size = new System.Drawing.Size(71, 12);
             this.label4.TabIndex = 1;
             this.label4.Text = "已安装产品:";
             // 
             // label5
             // 
             this.label5.AutoSize = true;
-            this.label5.Font = new System.Drawing.Font("微软雅黑", 7.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label5.Location = new System.Drawing.Point(22, 95);
+            this.label5.Font = new System.Drawing.Font("Microsoft YaHei", 7.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label5.Location = new System.Drawing.Point(15, 63);
+            this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(99, 19);
+            this.label5.Size = new System.Drawing.Size(67, 15);
             this.label5.TabIndex = 1;
             this.label5.Text = "保留所有权利";
             // 
             // pictureBox1
             // 
             this.pictureBox1.Image = global::OTSSysMgrApp.Properties.Resources.logo;
-            this.pictureBox1.Location = new System.Drawing.Point(355, 12);
+            this.pictureBox1.Location = new System.Drawing.Point(237, 8);
+            this.pictureBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.pictureBox1.Name = "pictureBox1";
-            this.pictureBox1.Size = new System.Drawing.Size(243, 60);
+            this.pictureBox1.Size = new System.Drawing.Size(162, 40);
             this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
             this.pictureBox1.TabIndex = 0;
             this.pictureBox1.TabStop = false;
             // 
             // button2
             // 
-            this.button2.Location = new System.Drawing.Point(376, 252);
+            this.button2.Location = new System.Drawing.Point(251, 168);
+            this.button2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.button2.Name = "button2";
-            this.button2.Size = new System.Drawing.Size(106, 37);
+            this.button2.Size = new System.Drawing.Size(71, 25);
             this.button2.TabIndex = 2;
             this.button2.Text = "版本说明";
             this.button2.UseVisualStyleBackColor = true;
@@ -134,9 +143,9 @@
             // 
             // About
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(610, 293);
+            this.ClientSize = new System.Drawing.Size(411, 207);
             this.Controls.Add(this.listBox1);
             this.Controls.Add(this.button2);
             this.Controls.Add(this.button1);
@@ -146,10 +155,11 @@
             this.Controls.Add(this.label2);
             this.Controls.Add(this.label1);
             this.Controls.Add(this.pictureBox1);
+            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.MaximizeBox = false;
-            this.MaximumSize = new System.Drawing.Size(632, 349);
+            this.MaximumSize = new System.Drawing.Size(427, 246);
             this.MinimizeBox = false;
-            this.MinimumSize = new System.Drawing.Size(632, 349);
+            this.MinimumSize = new System.Drawing.Size(427, 246);
             this.Name = "About";
             this.ShowIcon = false;
             this.ShowInTaskbar = false;

+ 5 - 4
OTSSysMgrApp/ControllerSettingForm.cs

@@ -51,6 +51,7 @@ namespace OTSSysMgrApp
         public ControllerSettingForm()
         {
             InitializeComponent();
+            m_EDSHardwareMgr = EDSController.GetEDSController(Convert.ToInt32(tbRWidth.Text), Convert.ToInt32(tbRHeight.Text), 5000);
 
             lan = new Language(this);
             table = lan.GetNameTable(this.Name);
@@ -941,10 +942,10 @@ namespace OTSSysMgrApp
                         int width = 0;
                         int height = 0;
                         //获取宽度
-                        width = Convert.ToInt32(tbRWidth.Text);
-                        height = Convert.ToInt32(tbRHeight.Text);
-                        m_EDSHardwareMgr.SetResolution(width, height);
-                        bool isTrue = m_EDSHardwareMgr.GetXRayBySingleFeature(a_Milliseconds, fea, ref a_XrayData,ref ele, false);
+                        //width = Convert.ToInt32(tbRWidth.Text);
+                        //height = Convert.ToInt32(tbRHeight.Text);
+                        //m_EDSHardwareMgr.SetResolution(width, height);
+                        bool isTrue = GetXRayBySingleFeature(a_Milliseconds, fea, ref a_XrayData,ref ele, false);
                         int[] XData = new int[2000];
                         uint nXrayCount = 0;
                         for (int i = 1; i <= 2000; i++)