Explorar o código

修改斜面焦距界面点击X而产生的bug

CXS %!s(int64=3) %!d(string=hai) anos
pai
achega
62edbbf6b7

+ 1 - 0
OTSIncAMeasureApp/5-OTSMeasureStatuImageFun/SlopFocus.Designer.cs

@@ -339,6 +339,7 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
             this.Name = "SlopFocus";
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
             this.Text = "SlopFocus";
+            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.SlopFocus_FormClosing);
             this.Load += new System.EventHandler(this.SlopFocus_Load);
             this.groupBox1.ResumeLayout(false);
             this.groupBox1.PerformLayout();

+ 6 - 0
OTSIncAMeasureApp/5-OTSMeasureStatuImageFun/SlopFocus.cs

@@ -150,5 +150,11 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
             m_result = false;
             this.Hide();
         }
+
+        private void SlopFocus_FormClosing(object sender, FormClosingEventArgs e)
+        {
+            e.Cancel = true;
+            this.Hide();
+        }
     }
 }