Browse Source

complement the stopAcquisition function.

gsp 3 years ago
parent
commit
6dd6059dbf

+ 9 - 0
OTSIncAMeasureApp/1-OTSMeasure/CMeasureThreadWrapper.cs

@@ -392,6 +392,15 @@ namespace OTSMeasureApp
         {
             m_MsrThread.GetSEMController().DisConnect();
         }
+        public void StopXrayAcquisition()
+        {
+            var hw = m_MsrThread.GetSEMController().GetHardwareInterface();
+            if (hw != null)
+            {
+                hw.StopXrayAcquisition();
+            }
+            
+        }
         public bool IsSEMConnected()
         {
             return m_MsrThread.GetSEMController().IsConnected();

+ 15 - 14
OTSIncAMeasureApp/OTSIncAMeasureAppForm.Designer.cs

@@ -167,7 +167,7 @@
             this.rbMenu.BorderMode = System.Windows.Forms.RibbonWindowMode.InsideWindow;
             this.rbMenu.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
             this.rbMenu.Location = new System.Drawing.Point(0, 0);
-            this.rbMenu.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.rbMenu.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.rbMenu.Minimized = true;
             this.rbMenu.Name = "rbMenu";
             // 
@@ -201,7 +201,7 @@
             this.rbMenu.QuickAcessToolbar.Image = null;
             this.rbMenu.QuickAcessToolbar.Tag = null;
             this.rbMenu.QuickAcessToolbar.ToolTipImage = null;
-            this.rbMenu.Size = new System.Drawing.Size(1703, 130);
+            this.rbMenu.Size = new System.Drawing.Size(1277, 130);
             this.rbMenu.TabIndex = 0;
             this.rbMenu.Tabs.Add(this.rbTabHome);
             this.rbMenu.Tabs.Add(this.rbTabView);
@@ -626,6 +626,7 @@
             this.rbinterrupt.ToolTip = null;
             this.rbinterrupt.ToolTipImage = null;
             this.rbinterrupt.ToolTipTitle = null;
+            this.rbinterrupt.Click += new System.EventHandler(this.rbinterrupt_Click);
             // 
             // rbPanelFunction
             // 
@@ -830,11 +831,11 @@
             this.TSGrayVal,
             this.STSemCoordinate,
             this.toolStripStatusLabel1});
-            this.statusStrip1.Location = new System.Drawing.Point(0, 841);
+            this.statusStrip1.Location = new System.Drawing.Point(0, 671);
             this.statusStrip1.Name = "statusStrip1";
-            this.statusStrip1.Padding = new System.Windows.Forms.Padding(3, 0, 19, 0);
+            this.statusStrip1.Padding = new System.Windows.Forms.Padding(2, 0, 14, 0);
             this.statusStrip1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
-            this.statusStrip1.Size = new System.Drawing.Size(1703, 30);
+            this.statusStrip1.Size = new System.Drawing.Size(1277, 26);
             this.statusStrip1.TabIndex = 2;
             this.statusStrip1.Text = "statusStrip1";
             // 
@@ -842,20 +843,20 @@
             // 
             this.TSGrayVal.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right;
             this.TSGrayVal.Name = "TSGrayVal";
-            this.TSGrayVal.Size = new System.Drawing.Size(58, 24);
+            this.TSGrayVal.Size = new System.Drawing.Size(48, 21);
             this.TSGrayVal.Text = "灰度值";
             // 
             // STSemCoordinate
             // 
             this.STSemCoordinate.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right;
             this.STSemCoordinate.Name = "STSemCoordinate";
-            this.STSemCoordinate.Size = new System.Drawing.Size(75, 24);
+            this.STSemCoordinate.Size = new System.Drawing.Size(62, 21);
             this.STSemCoordinate.Text = "SEM坐标";
             // 
             // toolStripStatusLabel1
             // 
             this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
-            this.toolStripStatusLabel1.Size = new System.Drawing.Size(65, 24);
+            this.toolStripStatusLabel1.Size = new System.Drawing.Size(54, 21);
             this.toolStripStatusLabel1.Text = "IsReady";
             this.toolStripStatusLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
             this.toolStripStatusLabel1.Visible = false;
@@ -870,9 +871,9 @@
             this.dockPanel.DockLeftPortion = 0.21D;
             this.dockPanel.DockRightPortion = 0.27D;
             this.dockPanel.Location = new System.Drawing.Point(0, 130);
-            this.dockPanel.Margin = new System.Windows.Forms.Padding(8);
+            this.dockPanel.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.dockPanel.Name = "dockPanel";
-            this.dockPanel.Size = new System.Drawing.Size(1703, 711);
+            this.dockPanel.Size = new System.Drawing.Size(1277, 541);
             dockPanelGradient1.EndColor = System.Drawing.SystemColors.ControlLight;
             dockPanelGradient1.StartColor = System.Drawing.SystemColors.ControlLight;
             autoHideStripSkin1.DockStripGradient = dockPanelGradient1;
@@ -949,9 +950,9 @@
             // 
             // OTSIncAMeasureAppForm
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1703, 871);
+            this.ClientSize = new System.Drawing.Size(1277, 697);
             this.Controls.Add(this.dockPanel);
             this.Controls.Add(this.statusStrip1);
             this.Controls.Add(this.rbMenu);
@@ -959,8 +960,8 @@
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
             this.IsMdiContainer = true;
             this.KeyPreview = true;
-            this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.MinimumSize = new System.Drawing.Size(902, 623);
+            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.MinimumSize = new System.Drawing.Size(680, 506);
             this.Name = "OTSIncAMeasureAppForm";
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
             this.Text = "OTSMeasureApp";

+ 12 - 0
OTSIncAMeasureApp/OTSIncAMeasureAppForm.cs

@@ -1390,5 +1390,17 @@ namespace OTSMeasureApp
             this.rbConnectHardware.Enabled = true;
             log.Warn("SEM Disconnect!");
         }
+
+        private void rbinterrupt_Click(object sender, EventArgs e)
+        {
+            if (m_MsrThreadWrapper.IsSEMConnected())
+            {
+                m_MsrThreadWrapper.DisconnectSEM();
+
+
+            }
+            
+            log.Warn("StopXrayAcquisition!");
+        }
     }
 }