瀏覽代碼

in SmartSEM.cs add CMDMCF command

@wang_qi0307 5 年之前
父節點
當前提交
94559389dd

+ 26 - 11
HOZProject/FormUnitControl.Designer.cs

@@ -33,6 +33,7 @@
             this.groupBox1 = new System.Windows.Forms.GroupBox();
             this.tabControl1 = new System.Windows.Forms.TabControl();
             this.tabPage1 = new System.Windows.Forms.TabPage();
+            this.button1 = new System.Windows.Forms.Button();
             this.btnDoSemDriftCorrn = new System.Windows.Forms.Button();
             this.btnGetStagePosition = new System.Windows.Forms.Button();
             this.btnStageSetM = new System.Windows.Forms.Button();
@@ -111,7 +112,7 @@
             this.label1 = new System.Windows.Forms.Label();
             this.tabPage2 = new System.Windows.Forms.TabPage();
             this.tabPage3 = new System.Windows.Forms.TabPage();
-            this.button1 = new System.Windows.Forms.Button();
+            this.btnCMDMCF = new System.Windows.Forms.Button();
             this.groupBox1.SuspendLayout();
             this.tabControl1.SuspendLayout();
             this.tabPage1.SuspendLayout();
@@ -168,6 +169,7 @@
             // tabPage1
             // 
             this.tabPage1.BackColor = System.Drawing.Color.Transparent;
+            this.tabPage1.Controls.Add(this.btnCMDMCF);
             this.tabPage1.Controls.Add(this.button1);
             this.tabPage1.Controls.Add(this.btnDoSemDriftCorrn);
             this.tabPage1.Controls.Add(this.btnGetStagePosition);
@@ -254,6 +256,18 @@
             this.tabPage1.TabIndex = 0;
             this.tabPage1.Text = "SEM";
             // 
+            // button1
+            // 
+            this.button1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.button1.Location = new System.Drawing.Point(762, 375);
+            this.button1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.button1.Name = "button1";
+            this.button1.Size = new System.Drawing.Size(144, 42);
+            this.button1.TabIndex = 93;
+            this.button1.Text = "设置光束校正";
+            this.button1.UseVisualStyleBackColor = true;
+            this.button1.Click += new System.EventHandler(this.button1_Click);
+            // 
             // btnDoSemDriftCorrn
             // 
             this.btnDoSemDriftCorrn.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -1084,17 +1098,17 @@
             this.tabPage3.Text = "PT";
             this.tabPage3.UseVisualStyleBackColor = true;
             // 
-            // button1
+            // btnCMDMCF
             // 
-            this.button1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.button1.Location = new System.Drawing.Point(762, 375);
-            this.button1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.button1.Name = "button1";
-            this.button1.Size = new System.Drawing.Size(144, 42);
-            this.button1.TabIndex = 93;
-            this.button1.Text = "设置光束校正";
-            this.button1.UseVisualStyleBackColor = true;
-            this.button1.Click += new System.EventHandler(this.button1_Click);
+            this.btnCMDMCF.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnCMDMCF.Location = new System.Drawing.Point(762, 290);
+            this.btnCMDMCF.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.btnCMDMCF.Name = "btnCMDMCF";
+            this.btnCMDMCF.Size = new System.Drawing.Size(144, 42);
+            this.btnCMDMCF.TabIndex = 94;
+            this.btnCMDMCF.Text = "执行宏文件";
+            this.btnCMDMCF.UseVisualStyleBackColor = true;
+            this.btnCMDMCF.Click += new System.EventHandler(this.btnCMDMCF_Click);
             // 
             // FormUnitControl
             // 
@@ -1200,6 +1214,7 @@
         private System.Windows.Forms.Button btnGetStagePosition;
         private System.Windows.Forms.Button btnDoSemDriftCorrn;
         private System.Windows.Forms.Button button1;
+        private System.Windows.Forms.Button btnCMDMCF;
     }
 }
 

+ 5 - 0
HOZProject/FormUnitControl.cs

@@ -515,5 +515,10 @@ namespace HOZProject
                 iSEM.Dispose();
             }
         }
+
+        private void btnCMDMCF_Click(object sender, EventArgs e)
+        {
+            iSEM.CMDMCFFilename("OPTON");
+        }
     }
 }

+ 3 - 0
SmartSEMControl/HardwareInterface.cs

@@ -128,6 +128,9 @@ namespace SmartSEMControl
         //图像类型切换
         Boolean DetectorType(float set);
 
+        //执行宏文件
+        Boolean CMDMCFFilename(String filename);
+
         //清除控件
         Boolean Dispose();
 

+ 11 - 1
SmartSEMControl/SmartSEM.cs

@@ -93,6 +93,10 @@ namespace SmartSEMControl
         private String CMD_AUTO_STIG = "CMD_AUTO_STIG";
         #endregion
 
+        #region 宏文件命令
+        private String MCF_FILENAME = "MCF_";
+        #endregion
+
         #region APILib
         private Api CZEMApi = new Api();
         private Boolean m_bInitialised = false;
@@ -1105,6 +1109,12 @@ namespace SmartSEMControl
         }
         #endregion
 
-
+        #region 调用宏文件命令
+        public Boolean CMDMCFFilename(String filename)
+        {
+            String CMDMCF = MCF_FILENAME + filename;
+            return ExecuteCmd(CMDMCF);
+        }
+        #endregion
     }
 }