Explorar o código

remove redundant ExtenderIpcUI.cs file

gsp hai 1 ano
pai
achega
11378ea913

+ 38 - 26
OTSIncAReportApp/1-UI/GBCalculate/Purity.Designer.cs

@@ -50,10 +50,11 @@ namespace OTSIncAReportApp._1_UI.GBCalculate
             // btn_cal
             // 
             this.btn_cal.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.btn_cal.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.btn_cal.Location = new System.Drawing.Point(266, 17);
+            this.btn_cal.Font = new System.Drawing.Font("SimSun", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btn_cal.Location = new System.Drawing.Point(400, 26);
+            this.btn_cal.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.btn_cal.Name = "btn_cal";
-            this.btn_cal.Size = new System.Drawing.Size(83, 28);
+            this.btn_cal.Size = new System.Drawing.Size(124, 42);
             this.btn_cal.TabIndex = 0;
             this.btn_cal.Text = "计算";
             this.btn_cal.UseVisualStyleBackColor = true;
@@ -65,8 +66,9 @@ namespace OTSIncAReportApp._1_UI.GBCalculate
             | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
             this.label1.AutoSize = true;
-            this.label1.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(10, 22);
+            this.label1.Font = new System.Drawing.Font("SimSun", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.Location = new System.Drawing.Point(15, 33);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(115, 21);
             this.label1.TabIndex = 1;
@@ -78,11 +80,12 @@ namespace OTSIncAReportApp._1_UI.GBCalculate
             | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
             this.cBox_gride.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.cBox_gride.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.cBox_gride.Font = new System.Drawing.Font("SimSun", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.cBox_gride.FormattingEnabled = true;
-            this.cBox_gride.Location = new System.Drawing.Point(152, 17);
+            this.cBox_gride.Location = new System.Drawing.Point(228, 26);
+            this.cBox_gride.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.cBox_gride.Name = "cBox_gride";
-            this.cBox_gride.Size = new System.Drawing.Size(93, 28);
+            this.cBox_gride.Size = new System.Drawing.Size(139, 28);
             this.cBox_gride.TabIndex = 2;
             // 
             // label2
@@ -91,8 +94,9 @@ namespace OTSIncAReportApp._1_UI.GBCalculate
             | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
             this.label2.AutoSize = true;
-            this.label2.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(10, 15);
+            this.label2.Font = new System.Drawing.Font("SimSun", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.Location = new System.Drawing.Point(15, 22);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(136, 21);
             this.label2.TabIndex = 3;
@@ -104,10 +108,11 @@ namespace OTSIncAReportApp._1_UI.GBCalculate
             | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
             this.tB_result.Enabled = false;
-            this.tB_result.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.tB_result.Location = new System.Drawing.Point(152, 12);
+            this.tB_result.Font = new System.Drawing.Font("SimSun", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tB_result.Location = new System.Drawing.Point(228, 18);
+            this.tB_result.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.tB_result.Name = "tB_result";
-            this.tB_result.Size = new System.Drawing.Size(115, 31);
+            this.tB_result.Size = new System.Drawing.Size(171, 31);
             this.tB_result.TabIndex = 4;
             // 
             // label3
@@ -116,8 +121,9 @@ namespace OTSIncAReportApp._1_UI.GBCalculate
             | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
             this.label3.AutoSize = true;
-            this.label3.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(10, 369);
+            this.label3.Font = new System.Drawing.Font("SimSun", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label3.Location = new System.Drawing.Point(15, 554);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(115, 21);
             this.label3.TabIndex = 5;
@@ -128,10 +134,11 @@ namespace OTSIncAReportApp._1_UI.GBCalculate
             this.rBx_process.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
-            this.rBx_process.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.rBx_process.Location = new System.Drawing.Point(152, 367);
+            this.rBx_process.Font = new System.Drawing.Font("SimSun", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.rBx_process.Location = new System.Drawing.Point(228, 550);
+            this.rBx_process.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.rBx_process.Name = "rBx_process";
-            this.rBx_process.Size = new System.Drawing.Size(680, 334);
+            this.rBx_process.Size = new System.Drawing.Size(1019, 397);
             this.rBx_process.TabIndex = 6;
             this.rBx_process.Text = "";
             // 
@@ -140,6 +147,7 @@ namespace OTSIncAReportApp._1_UI.GBCalculate
             this.splitContainer1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
             this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
             this.splitContainer1.Location = new System.Drawing.Point(0, 0);
+            this.splitContainer1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.splitContainer1.Name = "splitContainer1";
             this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
             // 
@@ -157,8 +165,9 @@ namespace OTSIncAReportApp._1_UI.GBCalculate
             this.splitContainer1.Panel2.Controls.Add(this.label2);
             this.splitContainer1.Panel2.Controls.Add(this.label3);
             this.splitContainer1.Panel2.Controls.Add(this.tB_result);
-            this.splitContainer1.Size = new System.Drawing.Size(868, 772);
-            this.splitContainer1.SplitterDistance = 62;
+            this.splitContainer1.Size = new System.Drawing.Size(1302, 1045);
+            this.splitContainer1.SplitterDistance = 83;
+            this.splitContainer1.SplitterWidth = 6;
             this.splitContainer1.TabIndex = 7;
             // 
             // label4
@@ -167,8 +176,9 @@ namespace OTSIncAReportApp._1_UI.GBCalculate
             | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
             this.label4.AutoSize = true;
-            this.label4.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.Location = new System.Drawing.Point(11, 60);
+            this.label4.Font = new System.Drawing.Font("SimSun", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label4.Location = new System.Drawing.Point(16, 90);
+            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(115, 21);
             this.label4.TabIndex = 8;
@@ -178,20 +188,22 @@ namespace OTSIncAReportApp._1_UI.GBCalculate
             // 
             this.pictureBox_PurityFormula.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
             this.pictureBox_PurityFormula.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox_PurityFormula.Image")));
-            this.pictureBox_PurityFormula.Location = new System.Drawing.Point(152, 60);
+            this.pictureBox_PurityFormula.Location = new System.Drawing.Point(228, 90);
+            this.pictureBox_PurityFormula.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pictureBox_PurityFormula.Name = "pictureBox_PurityFormula";
-            this.pictureBox_PurityFormula.Size = new System.Drawing.Size(680, 308);
+            this.pictureBox_PurityFormula.Size = new System.Drawing.Size(1019, 461);
             this.pictureBox_PurityFormula.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
             this.pictureBox_PurityFormula.TabIndex = 7;
             this.pictureBox_PurityFormula.TabStop = false;
             // 
             // Purity
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
-            this.ClientSize = new System.Drawing.Size(868, 772);
+            this.ClientSize = new System.Drawing.Size(1302, 1045);
             this.Controls.Add(this.splitContainer1);
+            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Name = "Purity";
             this.ShowIcon = false;
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;

+ 0 - 418
OxfordExtenderWrapper/ExtenderIpcUI.cs

@@ -1,418 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-
-namespace OxfordExtenderWrapper
-{
-   public class ExtenderIpcUI2: MarshalByRefObject
-    {
-        ExtenderWrapper iExtender;
-        public ExtenderIpcUI2()
-        {
-            iExtender = new ExtenderWrapper();
-        }
-        public bool ConnectToEDSHardware()
-        {
-
-           return iExtender.ConnectToEDSHardware();
-
-        }
-
-        //结束
-        public void CloseExtender()
-        {
-           
-            iExtender.CloseExtender();
-
-        }
-
-        public bool AquisitionImage(ref ImageAquistionParam p)
-        {
-            bool r = false;
-            var p1 = p;
-            var task = new Task(() =>
-            {
-               
-              
-               r= iExtender.AquisitionImage(ref  p1);
-               
-            });
-          
-            task.Start();
-            task.Wait();
-            p = p1;
-            return r;
-        }
-        public bool MoveStageXY(float x, float y)
-        {
-            var r = false;
-            var task = new Task(() =>
-            {
-               
-                Thread.Sleep(50);
-                r = iExtender.MoveStageXY(x,y);
-                
-            });
-            task.Start();
-            task.Wait();
-            return r;
-        }
-        public bool XrayAreaCollecting(ref AreaXrayParam p)
-        {
-
-            bool r = false;
-            var p1 = p;
-            var thread = new Task(() =>
-            {
-              
-               
-                r = iExtender.XrayAreaCollecting(ref p1);
-               
-            });
-           
-            thread.Start();
-            thread.Wait();
-            p = p1;
-            return r;
-        }
-        public bool XrayPointCollecting(ref PointXrayParam p)
-        {
-
-            bool r = false;
-            var p1 = p;
-            var task = new Task(() =>
-            {
-              
-                
-                r = iExtender.XrayPointCollecting(ref p1);
-               
-            });
-          
-            task.Start();
-            task.Wait();
-            p = p1;
-            return r;
-        }
-        public bool CollectXrayByPoints(ref List<PointXrayParam> a_listPoints, uint a_nXRayAQTime, bool a_bElementInfo)
-        {
-
-
-            bool r = false;
-            var p1 = a_listPoints;
-            var task = new Task(() =>
-            {
-               
-              
-                r = iExtender.CollectXrayByPoints(ref p1,a_nXRayAQTime,a_bElementInfo);
-               
-            });
-          
-            task.Start();
-            task.Wait();
-            a_listPoints = p1;
-            return r;
-        }
-        public bool CollectXrayByFeatures(ref List<AreaXrayParam> a_listFeatures, double a_nXRayAQTime, bool a_bElementInfo)
-        {
-
-            bool r = false;
-            var p1 = a_listFeatures;
-            var task = new Task(() =>
-            {
-              
-               
-                r = iExtender.CollectXrayByFeatures(ref p1, a_nXRayAQTime, a_bElementInfo);
-               
-            });
-           
-            task.Start();
-            task.Wait();
-            a_listFeatures = p1;
-            return r;
-
-        }
-
-
-
-      
-
-        public float GetMagnification()
-        {
-            return (float)iExtender.GetMagnification();
-        }
-        public Boolean SetMagnification(float set)
-        {
-
-            var r = false;
-            var thread = new Task(() =>
-            {
-
-                r = iExtender.SetMagnification(set);
-            });
-            thread.Start();
-            thread.Wait();
-            return r;
-        }
-
-        //焦距
-        public float GetWorkingDistance()
-        {
-            return (float)iExtender.GetWorkingDistance();
-        }
-        public Boolean SetWorkingDistance(float set)
-        {
-            var r = false;
-            var thread = new Task(() =>
-            {
-
-                r = iExtender.SetWorkingDistance(set);
-            });
-            thread.Start();
-            thread.Wait();
-            return r;
-        }
-
-        //亮度
-        public float GetBrightness()
-        {
-
-            return (float)iExtender.GetBrightness();
-        }
-        public Boolean SetBrightness(float set)
-        {
-            var r = false;
-            var thread = new Task(() =>
-            {
-
-                r = iExtender.SetBrightness(set);
-            });
-            thread.Start();
-            thread.Wait();
-            return r;
-        }
-
-        //对比度
-        public float GetContrast()
-        {
-            return (float)iExtender.GetContrast();
-        }
-        public Boolean SetContrast(float set)
-        {
-            var r = false;
-            var thread = new Task(() =>
-            {
-
-                r = iExtender.SetContrast(set);
-            });
-            thread.Start();
-            thread.Wait();
-            return r;
-        }
-
-        //SEM电压
-        public float GetSEMVoltage()
-        {
-            return (float)iExtender.GetSEMVoltage();
-        }
-        public Boolean SetSEMVoltage(float set)
-        {
-            var r = false;
-            var thread = new Task(() =>
-            {
-
-                r = iExtender.SetSEMVoltage(set);
-            });
-            thread.Start();
-            thread.Wait();
-            return r;
-        }
-        public bool SetSemScanExternal(bool b)
-        {
-            var r = false;
-            var thread = new Task(() =>
-            {
-
-                r = iExtender.SetSemScanExternal(b);
-            });
-            thread.Start();
-            thread.Wait();
-            return r;
-        }
-
-        //样品台
-        public float[] GetStagePosition()
-        {
-            float[] ret = iExtender.GetStagePosition();
-
-            return ret;
-        }
-        public Boolean SetStagePosition(float[] set)
-        {
-           
-            var r = false;
-            var thread = new Task(() =>
-            {
-
-                r = iExtender.SetStagePosition(set);
-            });
-            thread.Start();
-            thread.Wait();
-            return r;
-        }
-       
-        public Boolean SetStageGotoX(float set)
-        {
-            var r = false;
-            var thread = new Task(() =>
-            {
-
-                r = iExtender.SetStageGotoX(set);
-            });
-            thread.Start();
-            thread.Wait();
-            return r;
-        }
-        public Boolean SetStageGotoY(float set)
-        {
-            var r = false;
-            var thread = new Task(() =>
-            {
-
-                r = iExtender.SetStageGotoY(set);
-            });
-            thread.Start();
-            thread.Wait();
-            return r;
-        }
-        public Boolean SetStageGotoZ(float set)
-        {
-            var r = false;
-            var thread = new Task(() =>
-            {
-
-                r = iExtender.SetStageGotoZ(set);
-            });
-            thread.Start();
-            thread.Wait();
-            return r;
-        }
-        public Boolean SetStageGotoT(float set)
-        {
-            var r = false;
-            var thread = new Task(() =>
-            {
-
-                r = iExtender.SetStageGotoT(set);
-            });
-            thread.Start();
-            thread.Wait();
-            return r;
-        }
-        public Boolean SetStageGotoR(float set)
-        {
-            var r = false;
-            var thread = new Task(() =>
-            {
-
-                r = iExtender.SetStageGotoR(set);
-            });
-            thread.Start();
-            thread.Wait();
-            return r;
-        }
-
-        public double[] ImageScanSize =
-      {
-            32,
-            64,
-            128,
-            256,
-            512,
-            704,
-            768,
-            1024,
-            4096,
-            8192
-        };
-
-        public double DImagePixelsize { get => iExtender.GetDImagePixelsize(); set => iExtender.SetDImagePixelsize(value); }
-        public float GetStageAtX()
-        {
-            
-            return (float)iExtender.GetStageAtX();
-        }
-        public float GetStageAtY()
-        {
-            
-            return (float)iExtender.GetStageAtY();
-        }
-        public float GetStageAtZ()
-        {
-           
-            return (float)iExtender.GetStageAtZ();
-        }
-        public float GetStageAtT()
-        {
-           
-            return (float)iExtender.GetStageAtT();
-        }
-        public float GetStageAtR()
-        {
-            return (float)iExtender.GetStageAtR();
-        }
-
-        #region X-ray
-
-
-
-
-
-
-
-
-
-
-
-
-        public bool IsAcquiringSpectrum()
-        {
-            return iExtender.IsAcquiringSpectrum();
-        }
-
-
-
-
-        public void BeginMultipleAquisition()
-        {
-
-            iExtender.BeginMultipleAquisition();
-        }
-
-        public void EndMultipleAquisition()
-        {
-            iExtender.EndMultipleAquisition();
-        }
-
-
-
-        public bool GetSemBeamOn()
-        {
-            return iExtender.GetSemBeamOn();
-
-        }
-        public void StopXrayAquisition()
-        {
-
-            iExtender.StopXrayAquisition();
-
-
-        }
-
-
-        #endregion
-    }
-}

+ 0 - 1
OxfordExtenderWrapper/OxfordExtenderWrapper.csproj

@@ -59,7 +59,6 @@
     <Reference Include="WindowsBase" />
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="ExtenderIpcUI.cs" />
     <Compile Include="ExtenderIpcUI1.cs" />
     <Compile Include="ExtenderWrapper.cs" />
     <Compile Include="Form1.cs">