Browse Source

Merge branch 'dev' into cxs

CXS 3 years ago
parent
commit
b20291f796

+ 2 - 2
OTSCPP/OTSImagePro/OTSImageProcess.cpp

@@ -1738,8 +1738,8 @@ namespace OTSIMGPROC
 			//Mat cvcopyImg = Mat(nHeightImg, nWidthImg, CV_8UC1, pPixel);// use the medianblur method to achieve the same effect as open morphology(errod and dialate).
 			//pPixel = cvcopyImg.data;
 			
-				COTSImageProcess::BErode3(pPixel, pTempImg, 3, nHeightImg, nWidthImg);
-				COTSImageProcess::BDilate3(pTempImg, pPixel, 3, nHeightImg, nWidthImg);
+				COTSImageProcess::BErode3(pPixel, pTempImg, 5, nHeightImg, nWidthImg);
+				COTSImageProcess::BDilate3(pTempImg, pPixel, 5, nHeightImg, nWidthImg);
 			
 			
 			

+ 7 - 1
OTSIncAMeasureApp/4-OTSSamplespaceGraphicsPanel/OTSSamplespaceWindow.cs

@@ -104,6 +104,7 @@ namespace OTSMeasureApp
         public static double m_PropDMagni = 0;
         
         public static int m_TotalFieldsCount = 0;
+       private _5_OTSMeasureStatuImageFun.SlopFocus slopFocus=null;
         #region 鼠标滚动所需参数
         public static float m_ScaleNum = 1;
         public static float m_GlobalZoomNum = 1;//记录每次比例缩放后的总体比例系数。
@@ -3209,7 +3210,12 @@ namespace OTSMeasureApp
                     DeleteHoleBSEImageData();
                     break;
                 case "SlopFocusMenuItem":
-                    _5_OTSMeasureStatuImageFun.SlopFocus slopFocus = new _5_OTSMeasureStatuImageFun.SlopFocus(this);
+
+                    if (slopFocus == null)
+                    {
+                        slopFocus = new _5_OTSMeasureStatuImageFun.SlopFocus(this);
+                    }
+                   
                     slopFocus.Show();
                     
                     break;

+ 89 - 61
OTSIncAMeasureApp/5-OTSMeasureStatuImageFun/SlopFocus.Designer.cs

@@ -64,9 +64,10 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
             // cB_enable
             // 
             this.cB_enable.AutoSize = true;
-            this.cB_enable.Location = new System.Drawing.Point(15, 15);
+            this.cB_enable.Location = new System.Drawing.Point(11, 13);
+            this.cB_enable.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.cB_enable.Name = "cB_enable";
-            this.cB_enable.Size = new System.Drawing.Size(165, 19);
+            this.cB_enable.Size = new System.Drawing.Size(114, 17);
             this.cB_enable.TabIndex = 0;
             this.cB_enable.Text = "Whether to enable";
             this.cB_enable.UseVisualStyleBackColor = true;
@@ -74,40 +75,45 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
             // label2
             // 
             this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(32, 40);
+            this.label2.Location = new System.Drawing.Point(24, 35);
+            this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(23, 15);
+            this.label2.Size = new System.Drawing.Size(17, 13);
             this.label2.TabIndex = 2;
             this.label2.Text = "X:";
             // 
             // tB_FirstPointX
             // 
-            this.tB_FirstPointX.Location = new System.Drawing.Point(68, 37);
+            this.tB_FirstPointX.Location = new System.Drawing.Point(51, 32);
+            this.tB_FirstPointX.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.tB_FirstPointX.Name = "tB_FirstPointX";
-            this.tB_FirstPointX.Size = new System.Drawing.Size(100, 25);
+            this.tB_FirstPointX.Size = new System.Drawing.Size(76, 20);
             this.tB_FirstPointX.TabIndex = 3;
             // 
             // label3
             // 
             this.label3.AutoSize = true;
-            this.label3.Location = new System.Drawing.Point(196, 40);
+            this.label3.Location = new System.Drawing.Point(147, 35);
+            this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(23, 15);
+            this.label3.Size = new System.Drawing.Size(17, 13);
             this.label3.TabIndex = 4;
             this.label3.Text = "Y:";
             // 
             // tB_FirstPointY
             // 
-            this.tB_FirstPointY.Location = new System.Drawing.Point(232, 37);
+            this.tB_FirstPointY.Location = new System.Drawing.Point(174, 32);
+            this.tB_FirstPointY.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.tB_FirstPointY.Name = "tB_FirstPointY";
-            this.tB_FirstPointY.Size = new System.Drawing.Size(100, 25);
+            this.tB_FirstPointY.Size = new System.Drawing.Size(76, 20);
             this.tB_FirstPointY.TabIndex = 5;
             // 
             // bn_FirstPoint
             // 
-            this.bn_FirstPoint.Location = new System.Drawing.Point(647, 37);
+            this.bn_FirstPoint.Location = new System.Drawing.Point(485, 32);
+            this.bn_FirstPoint.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.bn_FirstPoint.Name = "bn_FirstPoint";
-            this.bn_FirstPoint.Size = new System.Drawing.Size(96, 25);
+            this.bn_FirstPoint.Size = new System.Drawing.Size(72, 22);
             this.bn_FirstPoint.TabIndex = 6;
             this.bn_FirstPoint.Text = "obtain";
             this.bn_FirstPoint.UseVisualStyleBackColor = true;
@@ -115,9 +121,10 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
             // 
             // bn_SecondPoint
             // 
-            this.bn_SecondPoint.Location = new System.Drawing.Point(647, 35);
+            this.bn_SecondPoint.Location = new System.Drawing.Point(485, 30);
+            this.bn_SecondPoint.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.bn_SecondPoint.Name = "bn_SecondPoint";
-            this.bn_SecondPoint.Size = new System.Drawing.Size(96, 25);
+            this.bn_SecondPoint.Size = new System.Drawing.Size(72, 22);
             this.bn_SecondPoint.TabIndex = 12;
             this.bn_SecondPoint.Text = "obtain";
             this.bn_SecondPoint.UseVisualStyleBackColor = true;
@@ -125,41 +132,46 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
             // 
             // tB_SecondPointY
             // 
-            this.tB_SecondPointY.Location = new System.Drawing.Point(232, 38);
+            this.tB_SecondPointY.Location = new System.Drawing.Point(174, 33);
+            this.tB_SecondPointY.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.tB_SecondPointY.Name = "tB_SecondPointY";
-            this.tB_SecondPointY.Size = new System.Drawing.Size(100, 25);
+            this.tB_SecondPointY.Size = new System.Drawing.Size(76, 20);
             this.tB_SecondPointY.TabIndex = 11;
             // 
             // label4
             // 
             this.label4.AutoSize = true;
-            this.label4.Location = new System.Drawing.Point(196, 41);
+            this.label4.Location = new System.Drawing.Point(147, 36);
+            this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(23, 15);
+            this.label4.Size = new System.Drawing.Size(17, 13);
             this.label4.TabIndex = 10;
             this.label4.Text = "Y:";
             // 
             // tB_SecondPointX
             // 
-            this.tB_SecondPointX.Location = new System.Drawing.Point(68, 38);
+            this.tB_SecondPointX.Location = new System.Drawing.Point(51, 33);
+            this.tB_SecondPointX.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.tB_SecondPointX.Name = "tB_SecondPointX";
-            this.tB_SecondPointX.Size = new System.Drawing.Size(100, 25);
+            this.tB_SecondPointX.Size = new System.Drawing.Size(76, 20);
             this.tB_SecondPointX.TabIndex = 9;
             // 
             // label5
             // 
             this.label5.AutoSize = true;
-            this.label5.Location = new System.Drawing.Point(32, 41);
+            this.label5.Location = new System.Drawing.Point(24, 36);
+            this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(23, 15);
+            this.label5.Size = new System.Drawing.Size(17, 13);
             this.label5.TabIndex = 8;
             this.label5.Text = "X:";
             // 
             // bn_ThirdPoint
             // 
-            this.bn_ThirdPoint.Location = new System.Drawing.Point(647, 37);
+            this.bn_ThirdPoint.Location = new System.Drawing.Point(485, 32);
+            this.bn_ThirdPoint.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.bn_ThirdPoint.Name = "bn_ThirdPoint";
-            this.bn_ThirdPoint.Size = new System.Drawing.Size(96, 25);
+            this.bn_ThirdPoint.Size = new System.Drawing.Size(72, 22);
             this.bn_ThirdPoint.TabIndex = 18;
             this.bn_ThirdPoint.Text = "obtain";
             this.bn_ThirdPoint.UseVisualStyleBackColor = true;
@@ -167,33 +179,37 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
             // 
             // tB_ThirdPointY
             // 
-            this.tB_ThirdPointY.Location = new System.Drawing.Point(232, 34);
+            this.tB_ThirdPointY.Location = new System.Drawing.Point(174, 29);
+            this.tB_ThirdPointY.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.tB_ThirdPointY.Name = "tB_ThirdPointY";
-            this.tB_ThirdPointY.Size = new System.Drawing.Size(100, 25);
+            this.tB_ThirdPointY.Size = new System.Drawing.Size(76, 20);
             this.tB_ThirdPointY.TabIndex = 17;
             // 
             // label7
             // 
             this.label7.AutoSize = true;
-            this.label7.Location = new System.Drawing.Point(196, 40);
+            this.label7.Location = new System.Drawing.Point(147, 35);
+            this.label7.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label7.Name = "label7";
-            this.label7.Size = new System.Drawing.Size(23, 15);
+            this.label7.Size = new System.Drawing.Size(17, 13);
             this.label7.TabIndex = 16;
             this.label7.Text = "Y:";
             // 
             // tB_ThirdPointX
             // 
-            this.tB_ThirdPointX.Location = new System.Drawing.Point(68, 37);
+            this.tB_ThirdPointX.Location = new System.Drawing.Point(51, 32);
+            this.tB_ThirdPointX.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.tB_ThirdPointX.Name = "tB_ThirdPointX";
-            this.tB_ThirdPointX.Size = new System.Drawing.Size(100, 25);
+            this.tB_ThirdPointX.Size = new System.Drawing.Size(76, 20);
             this.tB_ThirdPointX.TabIndex = 15;
             // 
             // label9
             // 
             this.label9.AutoSize = true;
-            this.label9.Location = new System.Drawing.Point(32, 40);
+            this.label9.Location = new System.Drawing.Point(24, 35);
+            this.label9.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label9.Name = "label9";
-            this.label9.Size = new System.Drawing.Size(23, 15);
+            this.label9.Size = new System.Drawing.Size(17, 13);
             this.label9.TabIndex = 13;
             this.label9.Text = "X:";
             // 
@@ -206,26 +222,30 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
             this.groupBox1.Controls.Add(this.tB_FirstPointX);
             this.groupBox1.Controls.Add(this.label3);
             this.groupBox1.Controls.Add(this.tB_FirstPointY);
-            this.groupBox1.Location = new System.Drawing.Point(15, 59);
+            this.groupBox1.Location = new System.Drawing.Point(11, 51);
+            this.groupBox1.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.groupBox1.Name = "groupBox1";
-            this.groupBox1.Size = new System.Drawing.Size(749, 89);
+            this.groupBox1.Padding = new System.Windows.Forms.Padding(2, 3, 2, 3);
+            this.groupBox1.Size = new System.Drawing.Size(562, 77);
             this.groupBox1.TabIndex = 19;
             this.groupBox1.TabStop = false;
             this.groupBox1.Text = "FirstPoint";
             // 
             // tB_FirstPointD
             // 
-            this.tB_FirstPointD.Location = new System.Drawing.Point(504, 37);
+            this.tB_FirstPointD.Location = new System.Drawing.Point(378, 32);
+            this.tB_FirstPointD.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.tB_FirstPointD.Name = "tB_FirstPointD";
-            this.tB_FirstPointD.Size = new System.Drawing.Size(109, 25);
+            this.tB_FirstPointD.Size = new System.Drawing.Size(83, 20);
             this.tB_FirstPointD.TabIndex = 8;
             // 
             // label8
             // 
             this.label8.AutoSize = true;
-            this.label8.Location = new System.Drawing.Point(401, 40);
+            this.label8.Location = new System.Drawing.Point(301, 35);
+            this.label8.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label8.Name = "label8";
-            this.label8.Size = new System.Drawing.Size(79, 15);
+            this.label8.Size = new System.Drawing.Size(52, 13);
             this.label8.TabIndex = 7;
             this.label8.Text = "Distance:";
             // 
@@ -238,26 +258,30 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
             this.groupBox2.Controls.Add(this.tB_SecondPointX);
             this.groupBox2.Controls.Add(this.label4);
             this.groupBox2.Controls.Add(this.bn_SecondPoint);
-            this.groupBox2.Location = new System.Drawing.Point(15, 181);
+            this.groupBox2.Location = new System.Drawing.Point(11, 157);
+            this.groupBox2.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.groupBox2.Name = "groupBox2";
-            this.groupBox2.Size = new System.Drawing.Size(749, 95);
+            this.groupBox2.Padding = new System.Windows.Forms.Padding(2, 3, 2, 3);
+            this.groupBox2.Size = new System.Drawing.Size(562, 82);
             this.groupBox2.TabIndex = 7;
             this.groupBox2.TabStop = false;
             this.groupBox2.Text = "SecondPoint";
             // 
             // tB_SecondPointD
             // 
-            this.tB_SecondPointD.Location = new System.Drawing.Point(504, 38);
+            this.tB_SecondPointD.Location = new System.Drawing.Point(378, 33);
+            this.tB_SecondPointD.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.tB_SecondPointD.Name = "tB_SecondPointD";
-            this.tB_SecondPointD.Size = new System.Drawing.Size(100, 25);
+            this.tB_SecondPointD.Size = new System.Drawing.Size(76, 20);
             this.tB_SecondPointD.TabIndex = 23;
             // 
             // label6
             // 
             this.label6.AutoSize = true;
-            this.label6.Location = new System.Drawing.Point(401, 41);
+            this.label6.Location = new System.Drawing.Point(301, 36);
+            this.label6.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(79, 15);
+            this.label6.Size = new System.Drawing.Size(52, 13);
             this.label6.TabIndex = 22;
             this.label6.Text = "Distance:";
             // 
@@ -270,34 +294,39 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
             this.groupBox3.Controls.Add(this.tB_ThirdPointX);
             this.groupBox3.Controls.Add(this.tB_ThirdPointY);
             this.groupBox3.Controls.Add(this.label7);
-            this.groupBox3.Location = new System.Drawing.Point(15, 311);
+            this.groupBox3.Location = new System.Drawing.Point(11, 270);
+            this.groupBox3.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.groupBox3.Name = "groupBox3";
-            this.groupBox3.Size = new System.Drawing.Size(749, 93);
+            this.groupBox3.Padding = new System.Windows.Forms.Padding(2, 3, 2, 3);
+            this.groupBox3.Size = new System.Drawing.Size(562, 81);
             this.groupBox3.TabIndex = 13;
             this.groupBox3.TabStop = false;
             this.groupBox3.Text = "ThirdPoint";
             // 
             // tB_ThirdPointD
             // 
-            this.tB_ThirdPointD.Location = new System.Drawing.Point(504, 37);
+            this.tB_ThirdPointD.Location = new System.Drawing.Point(378, 32);
+            this.tB_ThirdPointD.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.tB_ThirdPointD.Name = "tB_ThirdPointD";
-            this.tB_ThirdPointD.Size = new System.Drawing.Size(100, 25);
+            this.tB_ThirdPointD.Size = new System.Drawing.Size(76, 20);
             this.tB_ThirdPointD.TabIndex = 22;
             // 
             // label1
             // 
             this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(401, 40);
+            this.label1.Location = new System.Drawing.Point(301, 35);
+            this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(86, 15);
+            this.label1.Size = new System.Drawing.Size(63, 13);
             this.label1.TabIndex = 21;
             this.label1.Text = "DiStance:";
             // 
             // bn_OK
             // 
-            this.bn_OK.Location = new System.Drawing.Point(667, 428);
+            this.bn_OK.Location = new System.Drawing.Point(500, 371);
+            this.bn_OK.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.bn_OK.Name = "bn_OK";
-            this.bn_OK.Size = new System.Drawing.Size(97, 32);
+            this.bn_OK.Size = new System.Drawing.Size(73, 28);
             this.bn_OK.TabIndex = 20;
             this.bn_OK.Text = "OK";
             this.bn_OK.UseVisualStyleBackColor = true;
@@ -305,9 +334,10 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
             // 
             // bn_Cancel
             // 
-            this.bn_Cancel.Location = new System.Drawing.Point(537, 428);
+            this.bn_Cancel.Location = new System.Drawing.Point(403, 371);
+            this.bn_Cancel.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.bn_Cancel.Name = "bn_Cancel";
-            this.bn_Cancel.Size = new System.Drawing.Size(91, 32);
+            this.bn_Cancel.Size = new System.Drawing.Size(68, 28);
             this.bn_Cancel.TabIndex = 21;
             this.bn_Cancel.Text = "Cancel";
             this.bn_Cancel.UseVisualStyleBackColor = true;
@@ -315,22 +345,20 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
             // 
             // SlopFocus
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(773, 482);
-            this.ControlBox = false;
+            this.ClientSize = new System.Drawing.Size(581, 425);
             this.Controls.Add(this.bn_Cancel);
             this.Controls.Add(this.bn_OK);
             this.Controls.Add(this.groupBox3);
             this.Controls.Add(this.groupBox2);
             this.Controls.Add(this.groupBox1);
             this.Controls.Add(this.cB_enable);
+            this.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.MaximizeBox = false;
-            this.MaximumSize = new System.Drawing.Size(791, 529);
-            this.MinimizeBox = false;
-            this.MinimumSize = new System.Drawing.Size(791, 529);
+            this.MaximumSize = new System.Drawing.Size(597, 464);
+            this.MinimumSize = new System.Drawing.Size(597, 464);
             this.Name = "SlopFocus";
-            this.ShowInTaskbar = false;
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
             this.Text = "SlopFocus";
             this.Load += new System.EventHandler(this.SlopFocus_Load);

+ 22 - 22
OTSIncAMeasureApp/5-OTSMeasureStatuImageFun/SlopFocus.cs

@@ -39,11 +39,11 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
         }
         private void bn_OK_Click(object sender, EventArgs e)
         {
-            int iPX1, iPY1, iPX2, iPY2, iPX3,iPY3;
+            double iPX1, iPY1, iPX2, iPY2, iPX3,iPY3;
             iPX1 = iPY1 = iPX2 = iPY2 = iPX3=iPY3 = 0;
             double dPW1, dPW2, dPW3;
             dPW1 = dPW2 = dPW3 = 0;
-            if(!int.TryParse(tB_FirstPointX.Text,out iPX1)|| !int.TryParse(tB_FirstPointY.Text, out iPY1) || !int.TryParse(tB_SecondPointX.Text, out iPX2) || !int.TryParse(tB_SecondPointY.Text, out iPY2) || !int.TryParse(tB_ThirdPointX.Text, out iPX3) || !int.TryParse(tB_ThirdPointY.Text, out iPY3) || !double.TryParse(tB_FirstPointD.Text, out dPW1) || !double.TryParse(tB_SecondPointD.Text, out dPW2) || !double.TryParse(tB_ThirdPointD.Text, out dPW3))
+            if(!double.TryParse(tB_FirstPointX.Text,out iPX1)|| !double.TryParse(tB_FirstPointY.Text, out iPY1) || !double.TryParse(tB_SecondPointX.Text, out iPX2) || !double.TryParse(tB_SecondPointY.Text, out iPY2) || !double.TryParse(tB_ThirdPointX.Text, out iPX3) || !double.TryParse(tB_ThirdPointY.Text, out iPY3) || !double.TryParse(tB_FirstPointD.Text, out dPW1) || !double.TryParse(tB_SecondPointD.Text, out dPW2) || !double.TryParse(tB_ThirdPointD.Text, out dPW3))
             {
                 MessageBox.Show("Please check Params!");
                 return;
@@ -58,14 +58,14 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
                 slopFocusParam = new CSlopFocusParam();
             }
             slopFocusParam.IsUsingSlopParam = cB_enable.Checked;
-            slopFocusParam.FirstPoint = new Point(iPX1, iPY1);
+            slopFocusParam.FirstPoint = new Point((int)iPX1, (int)iPY1);
             slopFocusParam.FirstWD = dPW1;
-            slopFocusParam.SecondPoint = new Point(iPX2, iPY2);
+            slopFocusParam.SecondPoint = new Point((int)iPX2, (int)iPY2);
             slopFocusParam.SecondWD = dPW2;
-            slopFocusParam.ThirdPoint = new Point(iPX3, iPY3);
+            slopFocusParam.ThirdPoint = new Point((int)iPX3, (int)iPY3);
             slopFocusParam.ThirdWD = dPW3;
             oTSSamplespaceWindow.setSlopFocusParam(this);
-            this.Close();
+            this.Hide();
         }
 
         private void SlopFocus_Load(object sender, EventArgs e)
@@ -78,11 +78,11 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
 
         private void bn_FirstPoint_Click(object sender, EventArgs e)
         {
-            double a, b, c;
-            a = b = 20;
-            c = 20;
-            cfun.SetSemPositionXY(a, b, c);
-            cfun.SetSemWorkingDistance(c);
+            //double a, b, c;
+            //a = b = 20;
+            //c = 20;
+            //cfun.SetSemPositionXY(a, b, c);
+            //cfun.SetSemWorkingDistance(c);
             double Px = 0;
             double Py = 0;
             double Pr = 0;
@@ -100,11 +100,11 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
 
         private void bn_SecondPoint_Click(object sender, EventArgs e)
         {
-            double a, b, c;
-            a = b = 10;
-            c = 10;
-            cfun.SetSemPositionXY(a, b, c);
-            cfun.SetSemWorkingDistance(c);
+            //double a, b, c;
+            //a = b = 10;
+            //c = 10;
+            //cfun.SetSemPositionXY(a, b, c);
+            //cfun.SetSemWorkingDistance(c);
 
             double Px = 0;
             double Py = 0;
@@ -124,11 +124,11 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
 
         private void bn_ThirdPoint_Click(object sender, EventArgs e)
         {
-            double a, b, c;
-            a = b = 30;
-            c = 30;
-            cfun.SetSemPositionXY(a, b, c);
-            cfun.SetSemWorkingDistance(c);
+            //double a, b, c;
+            //a = b = 30;
+            //c = 30;
+            //cfun.SetSemPositionXY(a, b, c);
+            //cfun.SetSemWorkingDistance(c);
 
             double Px = 0;
             double Py = 0;
@@ -148,7 +148,7 @@ namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
         private void bn_Cancel_Click(object sender, EventArgs e)
         {
             m_result = false;
-            this.Close();
+            this.Hide();
         }
     }
 }

+ 4 - 5
OTSIncAMeasureApp/OTSIncAMeasureAppForm.cs

@@ -799,12 +799,11 @@ namespace OTSMeasureApp
           
 
             if (DialogResult.OK == ProgMgrForm.ShowDialog())
-            {
-                //m_DataMgrFun.SetSysPartSTDData(ProgMgrForm.GetCPartSTDDataClr());
-                //检查\\Config\\SysData 是否有OTSProgMgrParam.pmf文件
+            {              
+            
                 if (m_ProjParam.LoadParamFile() && m_ProjParam.LoadStageParamFile())
                 {
-                    //检查\\Config\\SysData 是否有OTSProgMgrParam.pmf文件
+                  
                     if (m_ProjParam.InitResultData())
                     {
                         m_RibbonFun.SetAllRibbonButnStatus(true);
@@ -812,7 +811,7 @@ namespace OTSMeasureApp
                         //当样品台上有样品,则不更新样品台数据
                         if (0 == m_ProjParam.GetSampleCount())
                         {
-                            //通过委托事件将样品台数据发送给SamplespaceWindwo
+                          
                           
                             m_SamplepaceWindow.InitStageDisplay(m_ProjData.GetStage(), m_ProjData.GetSEMStageData());
                         }

+ 10 - 0
OTSIncAReportApp/1-UI/Control_Graph/Controls/Control_DrawDistrbutionImageAndBSE.cs

@@ -1313,6 +1313,16 @@ namespace OTSIncAReportGraph.Controls
                 ls_sei.ElementName = list_celementchemistryclr[i].Name;
                 ls_sei.Percentage = list_celementchemistryclr[i].Percentage;
                 ls_sei.dKF = Convert.ToDouble(CListPeriodic.GetPeriodicByYsm(CListPeriodic.GetListPeriodic(), ls_sei.ElementName).SX1);
+                double de_sx2 = 0;
+                if (CListPeriodic.GetPeriodicByYsm(CListPeriodic.GetListPeriodic(), ls_sei.ElementName).SX2 == "" || CListPeriodic.GetPeriodicByYsm(CListPeriodic.GetListPeriodic(), ls_sei.ElementName).SX2 == "-")
+                {
+                    de_sx2 = 0;
+                }
+                else
+                {
+                    de_sx2 = Convert.ToDouble(CListPeriodic.GetPeriodicByYsm(CListPeriodic.GetListPeriodic(), ls_sei.ElementName).SX2);
+                }
+                ls_sei.dLF = de_sx2;
                 list_showelementinfo.Add(ls_sei);
             }
 

+ 17 - 1
OTSIncAReportApp/1-UI/Control_Graph/Controls/Control_XRayTable.cs

@@ -394,7 +394,7 @@ namespace OTSIncAReportGraph.Controls
                 KMLFPoint ls_lkmfpoint = new KMLFPoint();
                 ls_lkmfpoint.ysm = in_list_showelementinfo[i].ElementName;
                 ls_lkmfpoint.kml_x = (float)in_list_showelementinfo[i].dKF;
-
+                ls_lkmfpoint.lml_x = (float)in_list_showelementinfo[i].dLF;
                 //将该峰值保存到峰值上
                 m_list_kmlfpoint.Add(ls_lkmfpoint);
             }
@@ -537,6 +537,20 @@ namespace OTSIncAReportGraph.Controls
                         m_thisfont_bold,
                         m_this_sb,
                         new PointF(f_js_width * (m_list_kmlfpoint[i].kml_x * (m_i_draw_end / 20) - out_testsizef.Width / 2), m_f_rulerX_location / 3 - 20 + i_py));
+
+                    if (m_list_kmlfpoint[i].lml_x != 0)
+                    {
+                        //绘制竖线
+                        g.DrawLine(new Pen(Color.Wheat, 0.5f), f_js_width * (m_list_kmlfpoint[i].lml_x * (m_i_draw_end / 20)), m_f_rulerX_location / 3 + i_py, f_js_width * (m_list_kmlfpoint[i].lml_x * (m_i_draw_end / 20)), m_f_rulerX_location - 3);
+                        //输出文字,并将字输出到线的上面
+                        SizeF out_testsizef2 = g.MeasureString(m_list_kmlfpoint[i].ysm, m_thisfont);
+                        PointF ut_test_pointF2 = new PointF(m_mouse_point.X - (out_testsizef.Width / 2), 2);
+                        g.FillRectangle(Brushes.Goldenrod, new RectangleF(new PointF(f_js_width * (m_list_kmlfpoint[i].lml_x * (m_i_draw_end / 20) - out_testsizef.Width / 2), m_f_rulerX_location / 3 - 20 + i_py), out_testsizef));
+                        g.DrawString(m_list_kmlfpoint[i].ysm,
+                            m_thisfont_bold,
+                            m_this_sb,
+                            new PointF(f_js_width * (m_list_kmlfpoint[i].lml_x * (m_i_draw_end / 20) - out_testsizef.Width / 2), m_f_rulerX_location / 3 - 20 + i_py));
+                    }
                 }
             }
             #endregion 
@@ -690,6 +704,7 @@ namespace OTSIncAReportGraph.Controls
     public class KMLFPoint
     {
         public float kml_x;
+        public float lml_x;
         public string ysm;
     }
 
@@ -702,6 +717,7 @@ namespace OTSIncAReportGraph.Controls
         public string ElementName;
         public double Percentage;//实际能谱返回的质量百分比
         public double dKF;//K峰,元素周期表中固定值
+        public double dLF;//L峰
         public double percentageIn100;//归一化后的百分比
     }
     #endregion