CXS 3 лет назад
Родитель
Сommit
02511904a0

+ 64 - 53
OTSIncAMeasureApp/5-OTSMeasureStatuImageFun/OTSMeasureStatusWindow.Designer.cs

@@ -29,14 +29,15 @@
         private void InitializeComponent()
         {
             this.components = new System.ComponentModel.Container();
-            System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
-            System.Windows.Forms.DataVisualization.Charting.Legend legend2 = new System.Windows.Forms.DataVisualization.Charting.Legend();
-            System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series();
-            System.Windows.Forms.DataVisualization.Charting.Title title2 = new System.Windows.Forms.DataVisualization.Charting.Title();
+            System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+            System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
+            System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
+            System.Windows.Forms.DataVisualization.Charting.Title title1 = new System.Windows.Forms.DataVisualization.Charting.Title();
             this.pbBSEImage = new System.Windows.Forms.PictureBox();
             this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
             this.SampleParaLock = new System.Windows.Forms.ToolStripMenuItem();
             this.ViewStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
             this.grayToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
             this.ChangeDiffImageShow = new System.Windows.Forms.ToolStripMenuItem();
@@ -46,9 +47,9 @@
             this.MenuItemLineScam = new System.Windows.Forms.ToolStripMenuItem();
             this.PointScanElementMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.ExportScanInfoMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.SlopFocusMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.myChart = new System.Windows.Forms.DataVisualization.Charting.Chart();
             this.panelXray = new System.Windows.Forms.Panel();
-            this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
             ((System.ComponentModel.ISupportInitialize)(this.pbBSEImage)).BeginInit();
             this.contextMenuStrip1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.myChart)).BeginInit();
@@ -58,9 +59,9 @@
             // 
             this.pbBSEImage.BackColor = System.Drawing.Color.Transparent;
             this.pbBSEImage.Location = new System.Drawing.Point(0, 0);
-            this.pbBSEImage.Margin = new System.Windows.Forms.Padding(2);
+            this.pbBSEImage.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.pbBSEImage.Name = "pbBSEImage";
-            this.pbBSEImage.Size = new System.Drawing.Size(781, 453);
+            this.pbBSEImage.Size = new System.Drawing.Size(1041, 566);
             this.pbBSEImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
             this.pbBSEImage.TabIndex = 0;
             this.pbBSEImage.TabStop = false;
@@ -84,139 +85,147 @@
             this.toolStripSeparator2,
             this.MenuItemLineScam,
             this.PointScanElementMenuItem,
-            this.ExportScanInfoMenuItem});
+            this.ExportScanInfoMenuItem,
+            this.SlopFocusMenuItem});
             this.contextMenuStrip1.Name = "contextMenuStrip1";
-            this.contextMenuStrip1.Size = new System.Drawing.Size(243, 258);
+            this.contextMenuStrip1.Size = new System.Drawing.Size(285, 308);
             this.contextMenuStrip1.Opened += new System.EventHandler(this.contextMenuStrip1_Opened);
             // 
             // SampleParaLock
             // 
             this.SampleParaLock.Name = "SampleParaLock";
-            this.SampleParaLock.Size = new System.Drawing.Size(242, 22);
+            this.SampleParaLock.Size = new System.Drawing.Size(284, 24);
             this.SampleParaLock.Text = "获取BSE图";
             this.SampleParaLock.Click += new System.EventHandler(this.AcquireBSEImage_Click);
             // 
             // ViewStripMenuItem
             // 
             this.ViewStripMenuItem.Name = "ViewStripMenuItem";
-            this.ViewStripMenuItem.Size = new System.Drawing.Size(242, 22);
+            this.ViewStripMenuItem.Size = new System.Drawing.Size(284, 24);
             this.ViewStripMenuItem.Text = "可视化设置BSE图背景灰度范围";
             this.ViewStripMenuItem.Click += new System.EventHandler(this.ViewStripMenuItem_Click);
             // 
+            // toolStripMenuItem1
+            // 
+            this.toolStripMenuItem1.Name = "toolStripMenuItem1";
+            this.toolStripMenuItem1.Size = new System.Drawing.Size(284, 24);
+            this.toolStripMenuItem1.Text = "可视化设置特殊颗粒灰度范围";
+            this.toolStripMenuItem1.Click += new System.EventHandler(this.toolStripMenuItem1_Click);
+            // 
             // grayToolStripMenuItem
             // 
             this.grayToolStripMenuItem.Name = "grayToolStripMenuItem";
-            this.grayToolStripMenuItem.Size = new System.Drawing.Size(242, 22);
+            this.grayToolStripMenuItem.Size = new System.Drawing.Size(284, 24);
             this.grayToolStripMenuItem.Text = "显示BSE灰度曲线图";
             this.grayToolStripMenuItem.Click += new System.EventHandler(this.ShowGrayLevelImage_Click);
             // 
             // toolStripSeparator1
             // 
             this.toolStripSeparator1.Name = "toolStripSeparator1";
-            this.toolStripSeparator1.Size = new System.Drawing.Size(239, 6);
+            this.toolStripSeparator1.Size = new System.Drawing.Size(281, 6);
             // 
             // ChangeDiffImageShow
             // 
             this.ChangeDiffImageShow.Name = "ChangeDiffImageShow";
-            this.ChangeDiffImageShow.Size = new System.Drawing.Size(242, 22);
+            this.ChangeDiffImageShow.Size = new System.Drawing.Size(284, 24);
             this.ChangeDiffImageShow.Text = "切换至BSE图";
             this.ChangeDiffImageShow.Click += new System.EventHandler(this.ChangeDiffImageShow_Click);
             // 
             // ToolStripMenuItem
             // 
             this.ToolStripMenuItem.Name = "ToolStripMenuItem";
-            this.ToolStripMenuItem.Size = new System.Drawing.Size(242, 22);
+            this.ToolStripMenuItem.Size = new System.Drawing.Size(284, 24);
             this.ToolStripMenuItem.Text = "BSE去背景图";
             this.ToolStripMenuItem.Click += new System.EventHandler(this.ShowRemoveBGImage_Click);
             // 
             // AbandonGrayStripMenuItem
             // 
             this.AbandonGrayStripMenuItem.Name = "AbandonGrayStripMenuItem";
-            this.AbandonGrayStripMenuItem.Size = new System.Drawing.Size(242, 22);
+            this.AbandonGrayStripMenuItem.Size = new System.Drawing.Size(284, 24);
             this.AbandonGrayStripMenuItem.Text = "显示BSE去背景灰度曲线图";
             this.AbandonGrayStripMenuItem.Click += new System.EventHandler(this.ShowAbandonGrayLevelImage_Click);
             // 
             // toolStripSeparator2
             // 
             this.toolStripSeparator2.Name = "toolStripSeparator2";
-            this.toolStripSeparator2.Size = new System.Drawing.Size(239, 6);
+            this.toolStripSeparator2.Size = new System.Drawing.Size(281, 6);
             // 
             // MenuItemLineScam
             // 
             this.MenuItemLineScam.CheckOnClick = true;
             this.MenuItemLineScam.Enabled = false;
             this.MenuItemLineScam.Name = "MenuItemLineScam";
-            this.MenuItemLineScam.Size = new System.Drawing.Size(242, 22);
+            this.MenuItemLineScam.Size = new System.Drawing.Size(284, 24);
             this.MenuItemLineScam.Text = "线扫描曲线";
             this.MenuItemLineScam.Click += new System.EventHandler(this.ShowGrayLevelLine_Click);
             // 
             // PointScanElementMenuItem
             // 
             this.PointScanElementMenuItem.Name = "PointScanElementMenuItem";
-            this.PointScanElementMenuItem.Size = new System.Drawing.Size(242, 22);
+            this.PointScanElementMenuItem.Size = new System.Drawing.Size(284, 24);
             this.PointScanElementMenuItem.Text = "X-Ray采集";
             this.PointScanElementMenuItem.Click += new System.EventHandler(this.PointScanElementMenuItem_Click);
             // 
             // ExportScanInfoMenuItem
             // 
             this.ExportScanInfoMenuItem.Name = "ExportScanInfoMenuItem";
-            this.ExportScanInfoMenuItem.Size = new System.Drawing.Size(242, 22);
+            this.ExportScanInfoMenuItem.Size = new System.Drawing.Size(284, 24);
             this.ExportScanInfoMenuItem.Text = "输出X-Ray信息";
             this.ExportScanInfoMenuItem.Click += new System.EventHandler(this.ExportScanInfoMenuItem_Click);
             // 
+            // SlopFocusMenuItem
+            // 
+            this.SlopFocusMenuItem.Name = "SlopFocusMenuItem";
+            this.SlopFocusMenuItem.Size = new System.Drawing.Size(284, 24);
+            this.SlopFocusMenuItem.Text = "斜面焦距";
+            this.SlopFocusMenuItem.Click += new System.EventHandler(this.SlopFocusMenuItem_Click);
+            // 
             // myChart
             // 
-            chartArea2.AlignmentStyle = System.Windows.Forms.DataVisualization.Charting.AreaAlignmentStyles.None;
-            chartArea2.Area3DStyle.Enable3D = true;
-            chartArea2.Area3DStyle.Inclination = 5;
-            chartArea2.Area3DStyle.IsClustered = true;
-            chartArea2.Area3DStyle.IsRightAngleAxes = false;
-            chartArea2.Area3DStyle.Perspective = 5;
-            chartArea2.Area3DStyle.WallWidth = 10;
-            chartArea2.Name = "ChartArea1";
-            this.myChart.ChartAreas.Add(chartArea2);
+            chartArea1.AlignmentStyle = System.Windows.Forms.DataVisualization.Charting.AreaAlignmentStyles.None;
+            chartArea1.Area3DStyle.Enable3D = true;
+            chartArea1.Area3DStyle.Inclination = 5;
+            chartArea1.Area3DStyle.IsClustered = true;
+            chartArea1.Area3DStyle.IsRightAngleAxes = false;
+            chartArea1.Area3DStyle.Perspective = 5;
+            chartArea1.Area3DStyle.WallWidth = 10;
+            chartArea1.Name = "ChartArea1";
+            this.myChart.ChartAreas.Add(chartArea1);
             this.myChart.Dock = System.Windows.Forms.DockStyle.Fill;
-            legend2.Name = "Legend1";
-            this.myChart.Legends.Add(legend2);
+            legend1.Name = "Legend1";
+            this.myChart.Legends.Add(legend1);
             this.myChart.Location = new System.Drawing.Point(0, 0);
-            this.myChart.Margin = new System.Windows.Forms.Padding(2);
+            this.myChart.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.myChart.Name = "myChart";
-            series2.ChartArea = "ChartArea1";
-            series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
-            series2.Legend = "Legend1";
-            series2.Name = "Series1";
-            this.myChart.Series.Add(series2);
-            this.myChart.Size = new System.Drawing.Size(781, 453);
+            series1.ChartArea = "ChartArea1";
+            series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
+            series1.Legend = "Legend1";
+            series1.Name = "Series1";
+            this.myChart.Series.Add(series1);
+            this.myChart.Size = new System.Drawing.Size(1041, 566);
             this.myChart.TabIndex = 5;
             this.myChart.Text = "chart1";
             this.myChart.TextAntiAliasingQuality = System.Windows.Forms.DataVisualization.Charting.TextAntiAliasingQuality.Normal;
-            title2.Name = "Title1";
-            title2.Text = "---";
-            this.myChart.Titles.Add(title2);
+            title1.Name = "Title1";
+            title1.Text = "---";
+            this.myChart.Titles.Add(title1);
             this.myChart.Visible = false;
             // 
             // panelXray
             // 
             this.panelXray.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.panelXray.Location = new System.Drawing.Point(0, 253);
-            this.panelXray.Margin = new System.Windows.Forms.Padding(2);
+            this.panelXray.Location = new System.Drawing.Point(0, 316);
+            this.panelXray.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.panelXray.Name = "panelXray";
-            this.panelXray.Size = new System.Drawing.Size(781, 200);
+            this.panelXray.Size = new System.Drawing.Size(1041, 250);
             this.panelXray.TabIndex = 0;
             // 
-            // toolStripMenuItem1
-            // 
-            this.toolStripMenuItem1.Name = "toolStripMenuItem1";
-            this.toolStripMenuItem1.Size = new System.Drawing.Size(242, 22);
-            this.toolStripMenuItem1.Text = "可视化设置特殊颗粒灰度范围";
-            this.toolStripMenuItem1.Click += new System.EventHandler(this.toolStripMenuItem1_Click);
-            // 
             // OTSMeasureStatusWindow
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.AutoSize = true;
-            this.ClientSize = new System.Drawing.Size(781, 453);
+            this.ClientSize = new System.Drawing.Size(1041, 566);
             this.CloseButton = false;
             this.CloseButtonVisible = false;
             this.Controls.Add(this.panelXray);
@@ -224,6 +233,7 @@
             this.Controls.Add(this.pbBSEImage);
             this.DockAreas = ((OTS.WinFormsUI.Docking.DockAreas)((OTS.WinFormsUI.Docking.DockAreas.DockTop | OTS.WinFormsUI.Docking.DockAreas.Document)));
             this.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "OTSMeasureStatusWindow";
             this.Text = "OTSMeasureStatus";
             this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
@@ -254,5 +264,6 @@
         private System.Windows.Forms.ToolStripMenuItem ExportScanInfoMenuItem;
         private System.Windows.Forms.ToolStripMenuItem ViewStripMenuItem;
         private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
+        private System.Windows.Forms.ToolStripMenuItem SlopFocusMenuItem;
     }
 }

+ 11 - 1
OTSIncAMeasureApp/5-OTSMeasureStatuImageFun/OTSMeasureStatusWindow.cs

@@ -684,6 +684,7 @@ namespace OTSMeasureApp
             IsShowGrayLevelLine = false;
             ViewStripMenuItem.Enabled = isEnabled;
             toolStripMenuItem1.Enabled = true;
+            SlopFocusMenuItem.Enabled = isEnabled;
             this.Cursor = Cursors.Default;
             this.Validate();
         }
@@ -1955,10 +1956,19 @@ namespace OTSMeasureApp
             DialogResult dialogResult = toolWindow.ShowDialog();
             if (dialogResult == DialogResult.Cancel)
             {
-              
                 return;
             }
         }
+
+        private void SlopFocusMenuItem_Click(object sender, EventArgs e)
+        {
+            _5_OTSMeasureStatuImageFun.SlopFocus slopFocus = new _5_OTSMeasureStatuImageFun.SlopFocus();
+            DialogResult result = slopFocus.ShowDialog();
+            if (result == DialogResult.OK)
+            {
+                m_MeasureAppForm.m_ProjParam.GetWorkSample().GetMsrParams().SlopParam = slopFocus.GetCSlopFocusParam();
+            }
+        }
     }
 }
 

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

@@ -0,0 +1,378 @@
+
+namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
+{
+    partial class SlopFocus
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.cB_enable = new System.Windows.Forms.CheckBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.tB_FirstPointX = new System.Windows.Forms.TextBox();
+            this.label3 = new System.Windows.Forms.Label();
+            this.tB_FirstPointY = new System.Windows.Forms.TextBox();
+            this.bn_FirstPoint = new System.Windows.Forms.Button();
+            this.bn_SecondPoint = new System.Windows.Forms.Button();
+            this.tB_SecondPointY = new System.Windows.Forms.TextBox();
+            this.label4 = new System.Windows.Forms.Label();
+            this.tB_SecondPointX = new System.Windows.Forms.TextBox();
+            this.label5 = new System.Windows.Forms.Label();
+            this.bn_ThirdPoint = new System.Windows.Forms.Button();
+            this.tB_ThirdPointY = new System.Windows.Forms.TextBox();
+            this.label7 = new System.Windows.Forms.Label();
+            this.tB_ThirdPointX = new System.Windows.Forms.TextBox();
+            this.label9 = new System.Windows.Forms.Label();
+            this.groupBox1 = new System.Windows.Forms.GroupBox();
+            this.tB_FirstPointD = new System.Windows.Forms.TextBox();
+            this.label8 = new System.Windows.Forms.Label();
+            this.groupBox2 = new System.Windows.Forms.GroupBox();
+            this.tB_SecondPointD = new System.Windows.Forms.TextBox();
+            this.label6 = new System.Windows.Forms.Label();
+            this.groupBox3 = new System.Windows.Forms.GroupBox();
+            this.tB_ThirdPointD = new System.Windows.Forms.TextBox();
+            this.label1 = new System.Windows.Forms.Label();
+            this.bn_OK = new System.Windows.Forms.Button();
+            this.bn_Cancel = new System.Windows.Forms.Button();
+            this.groupBox1.SuspendLayout();
+            this.groupBox2.SuspendLayout();
+            this.groupBox3.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // cB_enable
+            // 
+            this.cB_enable.AutoSize = true;
+            this.cB_enable.Location = new System.Drawing.Point(15, 15);
+            this.cB_enable.Name = "cB_enable";
+            this.cB_enable.Size = new System.Drawing.Size(165, 19);
+            this.cB_enable.TabIndex = 0;
+            this.cB_enable.Text = "Whether to enable";
+            this.cB_enable.UseVisualStyleBackColor = true;
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(32, 40);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(23, 15);
+            this.label2.TabIndex = 2;
+            this.label2.Text = "X:";
+            // 
+            // tB_FirstPointX
+            // 
+            this.tB_FirstPointX.Location = new System.Drawing.Point(68, 37);
+            this.tB_FirstPointX.Name = "tB_FirstPointX";
+            this.tB_FirstPointX.Size = new System.Drawing.Size(100, 25);
+            this.tB_FirstPointX.TabIndex = 3;
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(196, 40);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(23, 15);
+            this.label3.TabIndex = 4;
+            this.label3.Text = "Y:";
+            // 
+            // tB_FirstPointY
+            // 
+            this.tB_FirstPointY.Location = new System.Drawing.Point(232, 37);
+            this.tB_FirstPointY.Name = "tB_FirstPointY";
+            this.tB_FirstPointY.Size = new System.Drawing.Size(100, 25);
+            this.tB_FirstPointY.TabIndex = 5;
+            // 
+            // bn_FirstPoint
+            // 
+            this.bn_FirstPoint.Location = new System.Drawing.Point(647, 37);
+            this.bn_FirstPoint.Name = "bn_FirstPoint";
+            this.bn_FirstPoint.Size = new System.Drawing.Size(96, 25);
+            this.bn_FirstPoint.TabIndex = 6;
+            this.bn_FirstPoint.Text = "obtain";
+            this.bn_FirstPoint.UseVisualStyleBackColor = true;
+            this.bn_FirstPoint.Click += new System.EventHandler(this.bn_FirstPoint_Click);
+            // 
+            // bn_SecondPoint
+            // 
+            this.bn_SecondPoint.Location = new System.Drawing.Point(647, 35);
+            this.bn_SecondPoint.Name = "bn_SecondPoint";
+            this.bn_SecondPoint.Size = new System.Drawing.Size(96, 25);
+            this.bn_SecondPoint.TabIndex = 12;
+            this.bn_SecondPoint.Text = "obtain";
+            this.bn_SecondPoint.UseVisualStyleBackColor = true;
+            this.bn_SecondPoint.Click += new System.EventHandler(this.bn_SecondPoint_Click);
+            // 
+            // tB_SecondPointY
+            // 
+            this.tB_SecondPointY.Location = new System.Drawing.Point(232, 38);
+            this.tB_SecondPointY.Name = "tB_SecondPointY";
+            this.tB_SecondPointY.Size = new System.Drawing.Size(100, 25);
+            this.tB_SecondPointY.TabIndex = 11;
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Location = new System.Drawing.Point(196, 41);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(23, 15);
+            this.label4.TabIndex = 10;
+            this.label4.Text = "Y:";
+            // 
+            // tB_SecondPointX
+            // 
+            this.tB_SecondPointX.Location = new System.Drawing.Point(68, 38);
+            this.tB_SecondPointX.Name = "tB_SecondPointX";
+            this.tB_SecondPointX.Size = new System.Drawing.Size(100, 25);
+            this.tB_SecondPointX.TabIndex = 9;
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Location = new System.Drawing.Point(32, 41);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(23, 15);
+            this.label5.TabIndex = 8;
+            this.label5.Text = "X:";
+            // 
+            // bn_ThirdPoint
+            // 
+            this.bn_ThirdPoint.Location = new System.Drawing.Point(647, 37);
+            this.bn_ThirdPoint.Name = "bn_ThirdPoint";
+            this.bn_ThirdPoint.Size = new System.Drawing.Size(96, 25);
+            this.bn_ThirdPoint.TabIndex = 18;
+            this.bn_ThirdPoint.Text = "obtain";
+            this.bn_ThirdPoint.UseVisualStyleBackColor = true;
+            this.bn_ThirdPoint.Click += new System.EventHandler(this.bn_ThirdPoint_Click);
+            // 
+            // tB_ThirdPointY
+            // 
+            this.tB_ThirdPointY.Location = new System.Drawing.Point(232, 34);
+            this.tB_ThirdPointY.Name = "tB_ThirdPointY";
+            this.tB_ThirdPointY.Size = new System.Drawing.Size(100, 25);
+            this.tB_ThirdPointY.TabIndex = 17;
+            // 
+            // label7
+            // 
+            this.label7.AutoSize = true;
+            this.label7.Location = new System.Drawing.Point(196, 40);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(23, 15);
+            this.label7.TabIndex = 16;
+            this.label7.Text = "Y:";
+            // 
+            // tB_ThirdPointX
+            // 
+            this.tB_ThirdPointX.Location = new System.Drawing.Point(68, 37);
+            this.tB_ThirdPointX.Name = "tB_ThirdPointX";
+            this.tB_ThirdPointX.Size = new System.Drawing.Size(100, 25);
+            this.tB_ThirdPointX.TabIndex = 15;
+            // 
+            // label9
+            // 
+            this.label9.AutoSize = true;
+            this.label9.Location = new System.Drawing.Point(32, 40);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(23, 15);
+            this.label9.TabIndex = 13;
+            this.label9.Text = "X:";
+            // 
+            // groupBox1
+            // 
+            this.groupBox1.Controls.Add(this.tB_FirstPointD);
+            this.groupBox1.Controls.Add(this.label8);
+            this.groupBox1.Controls.Add(this.bn_FirstPoint);
+            this.groupBox1.Controls.Add(this.label2);
+            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, 76);
+            this.groupBox1.Name = "groupBox1";
+            this.groupBox1.Size = new System.Drawing.Size(749, 89);
+            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.Name = "tB_FirstPointD";
+            this.tB_FirstPointD.Size = new System.Drawing.Size(109, 25);
+            this.tB_FirstPointD.TabIndex = 8;
+            // 
+            // label8
+            // 
+            this.label8.AutoSize = true;
+            this.label8.Location = new System.Drawing.Point(401, 40);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(79, 15);
+            this.label8.TabIndex = 7;
+            this.label8.Text = "Distance:";
+            // 
+            // groupBox2
+            // 
+            this.groupBox2.Controls.Add(this.tB_SecondPointD);
+            this.groupBox2.Controls.Add(this.label6);
+            this.groupBox2.Controls.Add(this.tB_SecondPointY);
+            this.groupBox2.Controls.Add(this.label5);
+            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, 219);
+            this.groupBox2.Name = "groupBox2";
+            this.groupBox2.Size = new System.Drawing.Size(749, 95);
+            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.Name = "tB_SecondPointD";
+            this.tB_SecondPointD.Size = new System.Drawing.Size(100, 25);
+            this.tB_SecondPointD.TabIndex = 23;
+            // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Location = new System.Drawing.Point(401, 41);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(79, 15);
+            this.label6.TabIndex = 22;
+            this.label6.Text = "Distance:";
+            // 
+            // groupBox3
+            // 
+            this.groupBox3.Controls.Add(this.tB_ThirdPointD);
+            this.groupBox3.Controls.Add(this.label1);
+            this.groupBox3.Controls.Add(this.bn_ThirdPoint);
+            this.groupBox3.Controls.Add(this.label9);
+            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, 365);
+            this.groupBox3.Name = "groupBox3";
+            this.groupBox3.Size = new System.Drawing.Size(749, 93);
+            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.Name = "tB_ThirdPointD";
+            this.tB_ThirdPointD.Size = new System.Drawing.Size(100, 25);
+            this.tB_ThirdPointD.TabIndex = 22;
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(401, 40);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(86, 15);
+            this.label1.TabIndex = 21;
+            this.label1.Text = "DiStance:";
+            // 
+            // bn_OK
+            // 
+            this.bn_OK.Location = new System.Drawing.Point(667, 486);
+            this.bn_OK.Name = "bn_OK";
+            this.bn_OK.Size = new System.Drawing.Size(97, 32);
+            this.bn_OK.TabIndex = 20;
+            this.bn_OK.Text = "OK";
+            this.bn_OK.UseVisualStyleBackColor = true;
+            this.bn_OK.Click += new System.EventHandler(this.bn_OK_Click);
+            // 
+            // bn_Cancel
+            // 
+            this.bn_Cancel.Location = new System.Drawing.Point(537, 486);
+            this.bn_Cancel.Name = "bn_Cancel";
+            this.bn_Cancel.Size = new System.Drawing.Size(91, 32);
+            this.bn_Cancel.TabIndex = 21;
+            this.bn_Cancel.Text = "Cancel";
+            this.bn_Cancel.UseVisualStyleBackColor = true;
+            this.bn_Cancel.Click += new System.EventHandler(this.bn_Cancel_Click);
+            // 
+            // SlopFocus
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(773, 525);
+            this.ControlBox = false;
+            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.MaximizeBox = false;
+            this.MaximumSize = new System.Drawing.Size(791, 572);
+            this.MinimizeBox = false;
+            this.MinimumSize = new System.Drawing.Size(791, 572);
+            this.Name = "SlopFocus";
+            this.ShowInTaskbar = false;
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+            this.Text = "SlopFocus";
+            this.Load += new System.EventHandler(this.SlopFocus_Load);
+            this.groupBox1.ResumeLayout(false);
+            this.groupBox1.PerformLayout();
+            this.groupBox2.ResumeLayout(false);
+            this.groupBox2.PerformLayout();
+            this.groupBox3.ResumeLayout(false);
+            this.groupBox3.PerformLayout();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.CheckBox cB_enable;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.TextBox tB_FirstPointX;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.TextBox tB_FirstPointY;
+        private System.Windows.Forms.Button bn_FirstPoint;
+        private System.Windows.Forms.Button bn_SecondPoint;
+        private System.Windows.Forms.TextBox tB_SecondPointY;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.TextBox tB_SecondPointX;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.Button bn_ThirdPoint;
+        private System.Windows.Forms.TextBox tB_ThirdPointY;
+        private System.Windows.Forms.Label label7;
+        private System.Windows.Forms.TextBox tB_ThirdPointX;
+        private System.Windows.Forms.Label label9;
+        private System.Windows.Forms.GroupBox groupBox1;
+        private System.Windows.Forms.GroupBox groupBox2;
+        private System.Windows.Forms.GroupBox groupBox3;
+        private System.Windows.Forms.Button bn_OK;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label label6;
+        private System.Windows.Forms.TextBox tB_FirstPointD;
+        private System.Windows.Forms.Label label8;
+        private System.Windows.Forms.TextBox tB_SecondPointD;
+        private System.Windows.Forms.TextBox tB_ThirdPointD;
+        private System.Windows.Forms.Button bn_Cancel;
+    }
+}

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

@@ -0,0 +1,138 @@
+using OTSCLRINTERFACE;
+using OTSDataType;
+using OTSMeasureApp._0_OTSModel.OTSDataType;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace OTSMeasureApp._5_OTSMeasureStatuImageFun
+{
+    public partial class SlopFocus : Form
+    {
+        COTSControlFunExport cfun;
+        CSlopFocusParam slopFocusParam = new CSlopFocusParam();
+
+        public SlopFocus()
+        {
+            InitializeComponent();
+        }
+        public CSlopFocusParam GetCSlopFocusParam()
+        {
+            return slopFocusParam;
+        }
+        private void bn_OK_Click(object sender, EventArgs e)
+        {
+            int 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))
+            {
+                MessageBox.Show("Please check Params!");
+                return;
+            }
+            if((tB_FirstPointX.Text== tB_SecondPointX.Text&& tB_FirstPointY.Text== tB_SecondPointY.Text)||(tB_FirstPointX.Text== tB_ThirdPointX.Text&& tB_FirstPointY.Text== tB_ThirdPointY.Text)||(tB_SecondPointX.Text== tB_ThirdPointX.Text&& tB_SecondPointY.Text== tB_ThirdPointY.Text))
+            {
+                MessageBox.Show("Please select different points!");
+                return;
+            }
+            slopFocusParam.IsUsingSlopParam = cB_enable.Checked;
+            slopFocusParam.FirstPoint = new Point(iPX1, iPY1);
+            slopFocusParam.FirstWD = dPW1;
+            slopFocusParam.SecondPoint = new Point(iPX2, iPY2);
+            slopFocusParam.SecondWD = dPW2;
+            slopFocusParam.ThirdPoint = new Point(iPX3, iPY3);
+            slopFocusParam.ThirdWD = dPW3;
+            this.DialogResult = DialogResult.OK;
+        }
+
+        private void SlopFocus_Load(object sender, EventArgs e)
+        {
+            if(cfun==null)
+            {
+                cfun = COTSControlFunExport.GetControllerInstance();
+            }
+        }
+
+        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 Px = 0;
+            double Py = 0;
+            double Pr = 0;
+            if(cfun.GetSemPositionXY(ref Px,ref Py,ref Pr))
+            {
+                tB_FirstPointX.Text = Px.ToString();
+                tB_FirstPointY.Text = Py.ToString();
+            }
+            double WD = 0;
+            if(cfun.GetSemWorkingDistance(ref WD))
+            {
+                tB_FirstPointD.Text = WD.ToString();
+            }
+        }
+
+        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 Px = 0;
+            double Py = 0;
+            double Pr = 0;
+
+            if (cfun.GetSemPositionXY(ref Px, ref Py, ref Pr))
+            {
+                tB_SecondPointX.Text = Px.ToString();
+                tB_SecondPointY.Text = Py.ToString();
+            }
+            double WD = 0;
+            if (cfun.GetSemWorkingDistance(ref WD))
+            {
+                tB_SecondPointD.Text = WD.ToString();
+            }
+        }
+
+        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 Px = 0;
+            double Py = 0;
+            double Pr = 0;
+            if (cfun.GetSemPositionXY(ref Px, ref Py, ref Pr))
+            {
+                tB_ThirdPointX.Text = Px.ToString();
+                tB_ThirdPointY.Text = Py.ToString();
+            }
+            double WD = 0;
+            if (cfun.GetSemWorkingDistance(ref WD))
+            {
+                tB_ThirdPointD.Text = WD.ToString();
+            }
+        }
+
+        private void bn_Cancel_Click(object sender, EventArgs e)
+        {
+            this.Close();
+        }
+    }
+}

+ 120 - 0
OTSIncAMeasureApp/5-OTSMeasureStatuImageFun/SlopFocus.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 9 - 0
OTSIncAMeasureApp/OTSIncAMeasureApp.csproj

@@ -260,6 +260,12 @@
     <Compile Include="5-OTSMeasureStatuImageFun\frmSpecialGrayParticle.Designer.cs">
       <DependentUpon>frmSpecialGrayParticle.cs</DependentUpon>
     </Compile>
+    <Compile Include="5-OTSMeasureStatuImageFun\SlopFocus.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="5-OTSMeasureStatuImageFun\SlopFocus.Designer.cs">
+      <DependentUpon>SlopFocus.cs</DependentUpon>
+    </Compile>
     <Compile Include="7-OTSProgMgrInfo\Stage\DlgStageEdit.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -467,6 +473,9 @@
     <EmbeddedResource Include="5-OTSMeasureStatuImageFun\frmSpecialGrayParticle.resx">
       <DependentUpon>frmSpecialGrayParticle.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="5-OTSMeasureStatuImageFun\SlopFocus.resx">
+      <DependentUpon>SlopFocus.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="7-OTSProgMgrInfo\Stage\DlgStageEdit.resx">
       <DependentUpon>DlgStageEdit.cs</DependentUpon>
     </EmbeddedResource>