Browse Source

添加轴方向验证功能

cxs 1 year ago
parent
commit
62017cd9bd
2 changed files with 511 additions and 36 deletions
  1. 290 35
      OTSSysMgrApp/ControllerSettingForm.Designer.cs
  2. 221 1
      OTSSysMgrApp/ControllerSettingForm.cs

+ 290 - 35
OTSSysMgrApp/ControllerSettingForm.Designer.cs

@@ -57,6 +57,24 @@
             this.tbRWidth = new System.Windows.Forms.TextBox();
             this.lblDwellTime = new System.Windows.Forms.Label();
             this.lblResolution = new System.Windows.Forms.Label();
+            this.tabImage2 = new System.Windows.Forms.TabPage();
+            this.splitContainer1 = new System.Windows.Forms.SplitContainer();
+            this.label5 = new System.Windows.Forms.Label();
+            this.cb_imageresolution = new System.Windows.Forms.ComboBox();
+            this.label4 = new System.Windows.Forms.Label();
+            this.label3 = new System.Windows.Forms.Label();
+            this.tB_scanFieldSize100 = new System.Windows.Forms.TextBox();
+            this.label1 = new System.Windows.Forms.Label();
+            this.btn_confirm = new System.Windows.Forms.Button();
+            this.cb_Ydirection = new System.Windows.Forms.ComboBox();
+            this.label_y = new System.Windows.Forms.Label();
+            this.cb_Xdirection = new System.Windows.Forms.ComboBox();
+            this.label_x = new System.Windows.Forms.Label();
+            this.btn_continuousshot = new System.Windows.Forms.Button();
+            this.pictureBox3 = new System.Windows.Forms.PictureBox();
+            this.pictureBox4 = new System.Windows.Forms.PictureBox();
+            this.pictureBox2 = new System.Windows.Forms.PictureBox();
+            this.pictureBox1 = new System.Windows.Forms.PictureBox();
             this.tabSetting.SuspendLayout();
             this.tabXRay.SuspendLayout();
             this.groupBox1.SuspendLayout();
@@ -65,18 +83,28 @@
             this.groupBox2.SuspendLayout();
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pbImage)).BeginInit();
+            this.tabImage2.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
+            this.splitContainer1.Panel1.SuspendLayout();
+            this.splitContainer1.Panel2.SuspendLayout();
+            this.splitContainer1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             this.SuspendLayout();
             // 
             // tabSetting
             // 
             this.tabSetting.Controls.Add(this.tabXRay);
             this.tabSetting.Controls.Add(this.tabImage);
+            this.tabSetting.Controls.Add(this.tabImage2);
             this.tabSetting.Dock = System.Windows.Forms.DockStyle.Fill;
             this.tabSetting.Location = new System.Drawing.Point(0, 0);
-            this.tabSetting.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.tabSetting.Margin = new System.Windows.Forms.Padding(2);
             this.tabSetting.Name = "tabSetting";
             this.tabSetting.SelectedIndex = 0;
-            this.tabSetting.Size = new System.Drawing.Size(835, 481);
+            this.tabSetting.Size = new System.Drawing.Size(835, 736);
             this.tabSetting.TabIndex = 2;
             // 
             // tabXRay
@@ -93,10 +121,10 @@
             this.tabXRay.Controls.Add(this.label2);
             this.tabXRay.Controls.Add(this.lblCollectionTime);
             this.tabXRay.Location = new System.Drawing.Point(4, 22);
-            this.tabXRay.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.tabXRay.Margin = new System.Windows.Forms.Padding(2);
             this.tabXRay.Name = "tabXRay";
-            this.tabXRay.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
-            this.tabXRay.Size = new System.Drawing.Size(827, 455);
+            this.tabXRay.Padding = new System.Windows.Forms.Padding(2);
+            this.tabXRay.Size = new System.Drawing.Size(827, 710);
             this.tabXRay.TabIndex = 0;
             this.tabXRay.Text = "X-Ray设置";
             this.tabXRay.UseVisualStyleBackColor = true;
@@ -109,10 +137,10 @@
             this.groupBox1.BackColor = System.Drawing.Color.White;
             this.groupBox1.Controls.Add(this.chartXRay);
             this.groupBox1.Location = new System.Drawing.Point(6, 45);
-            this.groupBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.groupBox1.Margin = new System.Windows.Forms.Padding(2);
             this.groupBox1.Name = "groupBox1";
-            this.groupBox1.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
-            this.groupBox1.Size = new System.Drawing.Size(819, 410);
+            this.groupBox1.Padding = new System.Windows.Forms.Padding(2);
+            this.groupBox1.Size = new System.Drawing.Size(819, 665);
             this.groupBox1.TabIndex = 16;
             this.groupBox1.TabStop = false;
             this.groupBox1.Text = "图像显示";
@@ -124,7 +152,7 @@
             this.chartXRay.ChartAreas.Add(chartArea1);
             this.chartXRay.Dock = System.Windows.Forms.DockStyle.Fill;
             this.chartXRay.Location = new System.Drawing.Point(2, 16);
-            this.chartXRay.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.chartXRay.Margin = new System.Windows.Forms.Padding(2);
             this.chartXRay.Name = "chartXRay";
             series1.ChartArea = "ChartArea1";
             series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
@@ -136,7 +164,7 @@
             series1.XValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Int64;
             series1.YValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Int64;
             this.chartXRay.Series.Add(series1);
-            this.chartXRay.Size = new System.Drawing.Size(815, 392);
+            this.chartXRay.Size = new System.Drawing.Size(815, 647);
             this.chartXRay.SuppressExceptions = true;
             this.chartXRay.TabIndex = 2;
             this.chartXRay.Text = "chart2";
@@ -145,7 +173,7 @@
             // 
             this.btnClearData.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.btnClearData.Location = new System.Drawing.Point(688, 9);
-            this.btnClearData.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnClearData.Margin = new System.Windows.Forms.Padding(2);
             this.btnClearData.Name = "btnClearData";
             this.btnClearData.Size = new System.Drawing.Size(39, 33);
             this.btnClearData.TabIndex = 5;
@@ -157,7 +185,7 @@
             // 
             this.btnAreaRay.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.btnAreaRay.Location = new System.Drawing.Point(476, 9);
-            this.btnAreaRay.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnAreaRay.Margin = new System.Windows.Forms.Padding(2);
             this.btnAreaRay.Name = "btnAreaRay";
             this.btnAreaRay.Size = new System.Drawing.Size(67, 33);
             this.btnAreaRay.TabIndex = 4;
@@ -169,7 +197,7 @@
             // 
             this.btnPointXRay.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.btnPointXRay.Location = new System.Drawing.Point(617, 9);
-            this.btnPointXRay.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnPointXRay.Margin = new System.Windows.Forms.Padding(2);
             this.btnPointXRay.Name = "btnPointXRay";
             this.btnPointXRay.Size = new System.Drawing.Size(67, 33);
             this.btnPointXRay.TabIndex = 3;
@@ -181,7 +209,7 @@
             // 
             this.btnEanalysis.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.btnEanalysis.Location = new System.Drawing.Point(756, 9);
-            this.btnEanalysis.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnEanalysis.Margin = new System.Windows.Forms.Padding(2);
             this.btnEanalysis.Name = "btnEanalysis";
             this.btnEanalysis.Size = new System.Drawing.Size(67, 33);
             this.btnEanalysis.TabIndex = 6;
@@ -193,7 +221,7 @@
             // 
             this.btnDisplayXRay.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.btnDisplayXRay.Location = new System.Drawing.Point(547, 9);
-            this.btnDisplayXRay.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnDisplayXRay.Margin = new System.Windows.Forms.Padding(2);
             this.btnDisplayXRay.Name = "btnDisplayXRay";
             this.btnDisplayXRay.Size = new System.Drawing.Size(67, 33);
             this.btnDisplayXRay.TabIndex = 2;
@@ -215,7 +243,7 @@
             // 
             this.btnCollectionTime.Enabled = false;
             this.btnCollectionTime.Location = new System.Drawing.Point(167, 15);
-            this.btnCollectionTime.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnCollectionTime.Margin = new System.Windows.Forms.Padding(2);
             this.btnCollectionTime.Name = "btnCollectionTime";
             this.btnCollectionTime.Size = new System.Drawing.Size(40, 21);
             this.btnCollectionTime.TabIndex = 8;
@@ -227,7 +255,7 @@
             // tbCollectionTime
             // 
             this.tbCollectionTime.Location = new System.Drawing.Point(76, 16);
-            this.tbCollectionTime.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.tbCollectionTime.Margin = new System.Windows.Forms.Padding(2);
             this.tbCollectionTime.Name = "tbCollectionTime";
             this.tbCollectionTime.Size = new System.Drawing.Size(63, 21);
             this.tbCollectionTime.TabIndex = 1;
@@ -264,10 +292,10 @@
             this.tabImage.Controls.Add(this.lblDwellTime);
             this.tabImage.Controls.Add(this.lblResolution);
             this.tabImage.Location = new System.Drawing.Point(4, 22);
-            this.tabImage.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.tabImage.Margin = new System.Windows.Forms.Padding(2);
             this.tabImage.Name = "tabImage";
-            this.tabImage.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
-            this.tabImage.Size = new System.Drawing.Size(827, 455);
+            this.tabImage.Padding = new System.Windows.Forms.Padding(2);
+            this.tabImage.Size = new System.Drawing.Size(827, 710);
             this.tabImage.TabIndex = 1;
             this.tabImage.Text = "BSE设置";
             this.tabImage.UseVisualStyleBackColor = true;
@@ -285,7 +313,7 @@
             "128",
             "256"});
             this.ddlDwellTime.Location = new System.Drawing.Point(266, 16);
-            this.ddlDwellTime.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.ddlDwellTime.Margin = new System.Windows.Forms.Padding(2);
             this.ddlDwellTime.Name = "ddlDwellTime";
             this.ddlDwellTime.Size = new System.Drawing.Size(82, 20);
             this.ddlDwellTime.TabIndex = 3;
@@ -299,10 +327,10 @@
             this.groupBox2.Controls.Add(this.panel1);
             this.groupBox2.Controls.Add(this.btnClear);
             this.groupBox2.Location = new System.Drawing.Point(6, 45);
-            this.groupBox2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.groupBox2.Margin = new System.Windows.Forms.Padding(2);
             this.groupBox2.Name = "groupBox2";
-            this.groupBox2.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
-            this.groupBox2.Size = new System.Drawing.Size(822, 410);
+            this.groupBox2.Padding = new System.Windows.Forms.Padding(2);
+            this.groupBox2.Size = new System.Drawing.Size(822, 665);
             this.groupBox2.TabIndex = 13;
             this.groupBox2.TabStop = false;
             this.groupBox2.Text = "图像显示";
@@ -313,9 +341,9 @@
             this.panel1.Controls.Add(this.pbImage);
             this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
             this.panel1.Location = new System.Drawing.Point(2, 16);
-            this.panel1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.panel1.Margin = new System.Windows.Forms.Padding(2);
             this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(818, 392);
+            this.panel1.Size = new System.Drawing.Size(818, 647);
             this.panel1.TabIndex = 2;
             // 
             // pbImage
@@ -323,9 +351,9 @@
             this.pbImage.BackColor = System.Drawing.Color.White;
             this.pbImage.Dock = System.Windows.Forms.DockStyle.Fill;
             this.pbImage.Location = new System.Drawing.Point(0, 0);
-            this.pbImage.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.pbImage.Margin = new System.Windows.Forms.Padding(2);
             this.pbImage.Name = "pbImage";
-            this.pbImage.Size = new System.Drawing.Size(818, 392);
+            this.pbImage.Size = new System.Drawing.Size(818, 647);
             this.pbImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
             this.pbImage.TabIndex = 0;
             this.pbImage.TabStop = false;
@@ -334,7 +362,7 @@
             // 
             this.btnClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.btnClear.Location = new System.Drawing.Point(750, 77);
-            this.btnClear.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnClear.Margin = new System.Windows.Forms.Padding(2);
             this.btnClear.Name = "btnClear";
             this.btnClear.Size = new System.Drawing.Size(67, 50);
             this.btnClear.TabIndex = 1;
@@ -347,7 +375,7 @@
             // 
             this.btnSaveImage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.btnSaveImage.Location = new System.Drawing.Point(550, 8);
-            this.btnSaveImage.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnSaveImage.Margin = new System.Windows.Forms.Padding(2);
             this.btnSaveImage.Name = "btnSaveImage";
             this.btnSaveImage.Size = new System.Drawing.Size(67, 33);
             this.btnSaveImage.TabIndex = 4;
@@ -360,7 +388,7 @@
             // 
             this.btnDisplay.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.btnDisplay.Location = new System.Drawing.Point(756, 8);
-            this.btnDisplay.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnDisplay.Margin = new System.Windows.Forms.Padding(2);
             this.btnDisplay.Name = "btnDisplay";
             this.btnDisplay.Size = new System.Drawing.Size(67, 33);
             this.btnDisplay.TabIndex = 5;
@@ -371,7 +399,7 @@
             // tbRHeight
             // 
             this.tbRHeight.Location = new System.Drawing.Point(119, 15);
-            this.tbRHeight.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.tbRHeight.Margin = new System.Windows.Forms.Padding(2);
             this.tbRHeight.Name = "tbRHeight";
             this.tbRHeight.Size = new System.Drawing.Size(48, 21);
             this.tbRHeight.TabIndex = 2;
@@ -380,7 +408,7 @@
             // tbRWidth
             // 
             this.tbRWidth.Location = new System.Drawing.Point(66, 15);
-            this.tbRWidth.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.tbRWidth.Margin = new System.Windows.Forms.Padding(2);
             this.tbRWidth.Name = "tbRWidth";
             this.tbRWidth.Size = new System.Drawing.Size(48, 21);
             this.tbRWidth.TabIndex = 1;
@@ -406,15 +434,214 @@
             this.lblResolution.TabIndex = 10;
             this.lblResolution.Text = "分辨率";
             // 
+            // tabImage2
+            // 
+            this.tabImage2.Controls.Add(this.splitContainer1);
+            this.tabImage2.Location = new System.Drawing.Point(4, 22);
+            this.tabImage2.Name = "tabImage2";
+            this.tabImage2.Padding = new System.Windows.Forms.Padding(3);
+            this.tabImage2.Size = new System.Drawing.Size(827, 710);
+            this.tabImage2.TabIndex = 2;
+            this.tabImage2.Text = "BSE设置2";
+            this.tabImage2.UseVisualStyleBackColor = true;
+            // 
+            // splitContainer1
+            // 
+            this.splitContainer1.Location = new System.Drawing.Point(7, 8);
+            this.splitContainer1.Name = "splitContainer1";
+            this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
+            // 
+            // splitContainer1.Panel1
+            // 
+            this.splitContainer1.Panel1.Controls.Add(this.label5);
+            this.splitContainer1.Panel1.Controls.Add(this.cb_imageresolution);
+            this.splitContainer1.Panel1.Controls.Add(this.label4);
+            this.splitContainer1.Panel1.Controls.Add(this.label3);
+            this.splitContainer1.Panel1.Controls.Add(this.tB_scanFieldSize100);
+            this.splitContainer1.Panel1.Controls.Add(this.label1);
+            this.splitContainer1.Panel1.Controls.Add(this.btn_confirm);
+            this.splitContainer1.Panel1.Controls.Add(this.cb_Ydirection);
+            this.splitContainer1.Panel1.Controls.Add(this.label_y);
+            this.splitContainer1.Panel1.Controls.Add(this.cb_Xdirection);
+            this.splitContainer1.Panel1.Controls.Add(this.label_x);
+            this.splitContainer1.Panel1.Controls.Add(this.btn_continuousshot);
+            // 
+            // splitContainer1.Panel2
+            // 
+            this.splitContainer1.Panel2.Controls.Add(this.pictureBox3);
+            this.splitContainer1.Panel2.Controls.Add(this.pictureBox4);
+            this.splitContainer1.Panel2.Controls.Add(this.pictureBox2);
+            this.splitContainer1.Panel2.Controls.Add(this.pictureBox1);
+            this.splitContainer1.Size = new System.Drawing.Size(813, 695);
+            this.splitContainer1.SplitterDistance = 83;
+            this.splitContainer1.TabIndex = 3;
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Location = new System.Drawing.Point(512, 53);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(131, 12);
+            this.label5.TabIndex = 15;
+            this.label5.Text = "请在 100 放大倍数调试";
+            // 
+            // cb_imageresolution
+            // 
+            this.cb_imageresolution.FormattingEnabled = true;
+            this.cb_imageresolution.Location = new System.Drawing.Point(66, 45);
+            this.cb_imageresolution.Name = "cb_imageresolution";
+            this.cb_imageresolution.Size = new System.Drawing.Size(121, 20);
+            this.cb_imageresolution.TabIndex = 14;
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Location = new System.Drawing.Point(7, 48);
+            this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(47, 12);
+            this.label4.TabIndex = 13;
+            this.label4.Text = "分辨率:";
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(597, 11);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(29, 12);
+            this.label3.TabIndex = 8;
+            this.label3.Text = "微米";
+            // 
+            // tB_scanFieldSize100
+            // 
+            this.tB_scanFieldSize100.Location = new System.Drawing.Point(491, 7);
+            this.tB_scanFieldSize100.Name = "tB_scanFieldSize100";
+            this.tB_scanFieldSize100.Size = new System.Drawing.Size(100, 21);
+            this.tB_scanFieldSize100.TabIndex = 7;
+            this.tB_scanFieldSize100.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(391, 11);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(107, 12);
+            this.label1.TabIndex = 6;
+            this.label1.Text = "100倍下屏幕宽度:";
+            // 
+            // btn_confirm
+            // 
+            this.btn_confirm.Location = new System.Drawing.Point(730, 11);
+            this.btn_confirm.Name = "btn_confirm";
+            this.btn_confirm.Size = new System.Drawing.Size(75, 60);
+            this.btn_confirm.TabIndex = 5;
+            this.btn_confirm.Text = "保存";
+            this.btn_confirm.UseVisualStyleBackColor = true;
+            this.btn_confirm.Click += new System.EventHandler(this.btn_confirm_Click);
+            // 
+            // cb_Ydirection
+            // 
+            this.cb_Ydirection.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cb_Ydirection.FormattingEnabled = true;
+            this.cb_Ydirection.Location = new System.Drawing.Point(259, 7);
+            this.cb_Ydirection.Name = "cb_Ydirection";
+            this.cb_Ydirection.Size = new System.Drawing.Size(119, 20);
+            this.cb_Ydirection.TabIndex = 4;
+            // 
+            // label_y
+            // 
+            this.label_y.AutoSize = true;
+            this.label_y.Location = new System.Drawing.Point(193, 11);
+            this.label_y.Name = "label_y";
+            this.label_y.Size = new System.Drawing.Size(71, 12);
+            this.label_y.TabIndex = 3;
+            this.label_y.Text = "y轴正方向:";
+            // 
+            // cb_Xdirection
+            // 
+            this.cb_Xdirection.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cb_Xdirection.FormattingEnabled = true;
+            this.cb_Xdirection.Location = new System.Drawing.Point(68, 8);
+            this.cb_Xdirection.Name = "cb_Xdirection";
+            this.cb_Xdirection.Size = new System.Drawing.Size(119, 20);
+            this.cb_Xdirection.TabIndex = 2;
+            // 
+            // label_x
+            // 
+            this.label_x.AutoSize = true;
+            this.label_x.Location = new System.Drawing.Point(3, 11);
+            this.label_x.Name = "label_x";
+            this.label_x.Size = new System.Drawing.Size(71, 12);
+            this.label_x.TabIndex = 1;
+            this.label_x.Text = "x轴正方向:";
+            // 
+            // btn_continuousshot
+            // 
+            this.btn_continuousshot.Location = new System.Drawing.Point(649, 11);
+            this.btn_continuousshot.Name = "btn_continuousshot";
+            this.btn_continuousshot.Size = new System.Drawing.Size(75, 61);
+            this.btn_continuousshot.TabIndex = 0;
+            this.btn_continuousshot.Text = "轴方向验证";
+            this.btn_continuousshot.UseVisualStyleBackColor = true;
+            this.btn_continuousshot.Click += new System.EventHandler(this.btn_continuousshot_Click);
+            // 
+            // pictureBox3
+            // 
+            this.pictureBox3.BackColor = System.Drawing.Color.White;
+            this.pictureBox3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.pictureBox3.Location = new System.Drawing.Point(405, 305);
+            this.pictureBox3.Margin = new System.Windows.Forms.Padding(2);
+            this.pictureBox3.Name = "pictureBox3";
+            this.pictureBox3.Size = new System.Drawing.Size(400, 300);
+            this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
+            this.pictureBox3.TabIndex = 4;
+            this.pictureBox3.TabStop = false;
+            // 
+            // pictureBox4
+            // 
+            this.pictureBox4.BackColor = System.Drawing.Color.White;
+            this.pictureBox4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.pictureBox4.Location = new System.Drawing.Point(5, 305);
+            this.pictureBox4.Margin = new System.Windows.Forms.Padding(2);
+            this.pictureBox4.Name = "pictureBox4";
+            this.pictureBox4.Size = new System.Drawing.Size(400, 300);
+            this.pictureBox4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
+            this.pictureBox4.TabIndex = 3;
+            this.pictureBox4.TabStop = false;
+            // 
+            // pictureBox2
+            // 
+            this.pictureBox2.BackColor = System.Drawing.Color.White;
+            this.pictureBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.pictureBox2.Location = new System.Drawing.Point(405, 5);
+            this.pictureBox2.Margin = new System.Windows.Forms.Padding(2);
+            this.pictureBox2.Name = "pictureBox2";
+            this.pictureBox2.Size = new System.Drawing.Size(400, 300);
+            this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
+            this.pictureBox2.TabIndex = 2;
+            this.pictureBox2.TabStop = false;
+            // 
+            // pictureBox1
+            // 
+            this.pictureBox1.BackColor = System.Drawing.Color.White;
+            this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.pictureBox1.Location = new System.Drawing.Point(5, 5);
+            this.pictureBox1.Margin = new System.Windows.Forms.Padding(2);
+            this.pictureBox1.Name = "pictureBox1";
+            this.pictureBox1.Size = new System.Drawing.Size(400, 300);
+            this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
+            this.pictureBox1.TabIndex = 1;
+            this.pictureBox1.TabStop = false;
+            // 
             // ControllerSettingForm
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.White;
-            this.ClientSize = new System.Drawing.Size(835, 481);
+            this.ClientSize = new System.Drawing.Size(835, 736);
             this.Controls.Add(this.tabSetting);
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
-            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.Margin = new System.Windows.Forms.Padding(2);
             this.MinimumSize = new System.Drawing.Size(639, 403);
             this.Name = "ControllerSettingForm";
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
@@ -431,6 +658,16 @@
             this.groupBox2.ResumeLayout(false);
             this.panel1.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.pbImage)).EndInit();
+            this.tabImage2.ResumeLayout(false);
+            this.splitContainer1.Panel1.ResumeLayout(false);
+            this.splitContainer1.Panel1.PerformLayout();
+            this.splitContainer1.Panel2.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
+            this.splitContainer1.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -462,5 +699,23 @@
         private System.Windows.Forms.Button btnPointXRay;
         private System.Windows.Forms.Button btnClearData;
         private System.Windows.Forms.Button btnEanalysis;
+        private System.Windows.Forms.TabPage tabImage2;
+        private System.Windows.Forms.SplitContainer splitContainer1;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.ComboBox cb_imageresolution;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.TextBox tB_scanFieldSize100;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Button btn_confirm;
+        private System.Windows.Forms.ComboBox cb_Ydirection;
+        private System.Windows.Forms.Label label_y;
+        private System.Windows.Forms.ComboBox cb_Xdirection;
+        private System.Windows.Forms.Label label_x;
+        private System.Windows.Forms.Button btn_continuousshot;
+        private System.Windows.Forms.PictureBox pictureBox3;
+        private System.Windows.Forms.PictureBox pictureBox4;
+        private System.Windows.Forms.PictureBox pictureBox2;
+        private System.Windows.Forms.PictureBox pictureBox1;
     }
 }

+ 221 - 1
OTSSysMgrApp/ControllerSettingForm.cs

@@ -150,6 +150,18 @@ namespace OTSSysMgrApp
             int width=Convert.ToInt32( tbRWidth.Text);
             int height =Convert.ToInt32(tbRHeight.Text);
             m_EDSHardwareMgr = EDSController.GetEDSController(width,height,5000);
+
+            cb_Xdirection.Items.Add("LEFT_TOWARD");
+            cb_Xdirection.Items.Add("RIGHT_TOWARD");
+            cb_Ydirection.Items.Add("UP_TOWARD");
+            cb_Ydirection.Items.Add("DOWN_TOWARD");
+            tB_scanFieldSize100.Text = "1270";
+            cb_imageresolution.Items.Add("1024*768");
+            cb_imageresolution.Items.Add("1024*704");
+            cb_imageresolution.Items.Add("1536*1024");
+            cb_Xdirection.SelectedIndex = 0;
+            cb_Ydirection.SelectedIndex = 0;
+            cb_imageresolution.SelectedIndex = 0;
         }
 
         Thread ScanThread = null;
@@ -1140,7 +1152,215 @@ namespace OTSSysMgrApp
 
             return true;
         }
-       
+
         #endregion
+
+        private void btn_continuousshot_Click(object sender, EventArgs e)
+        {
+            pictureBox1.Image = null;
+            pictureBox2.Image = null;
+            pictureBox3.Image = null;
+            pictureBox4.Image = null;
+
+            btn_continuousshot.Enabled = false;
+            btn_confirm.Enabled = false;
+            this.Refresh();
+
+            ISemController m_Sem = SemController.GetSEMController();
+            bool flag = m_Sem.Connect();
+            //电镜设置对象
+            var cfun = ScanController.GetScanController();
+
+            bool IsConnec = cfun.Init();
+
+            double Magnification = 0;
+            m_Sem.GetMagnification(ref Magnification);
+
+            //double a_dScanFieldSizeX = 0;
+            //double a_dScanFieldSizeY = 0;
+            //m_Sem.GetScanFieldSize(ref a_dScanFieldSizeX,ref a_dScanFieldSizeY);
+
+            double scanFieldSize100 = 0;
+            double.TryParse(tB_scanFieldSize100.Text, out scanFieldSize100);
+            double scanFieldSize = scanFieldSize100 * 100 / Magnification;
+
+            double PositionX = 0;
+            double PositionY = 0;
+            double PositionR = 0;
+            m_Sem.GetSemPositionXY(ref PositionX, ref PositionY, ref PositionR);
+
+            double PositionXO = PositionX;
+            double PositionYO = PositionY;
+            //double PositionR0 = PositionR;
+
+            int width = 1024;
+            int height = 768;
+            //设置图像分辨率
+            if (cb_imageresolution.Text.Trim() == "")
+            {
+                MessageBox.Show("imageresolution cannot be null!");
+                return;
+            }
+            else
+            {
+                width = Convert.ToInt32(cb_imageresolution.Text.Split('*')[0]);
+                height = Convert.ToInt32(cb_imageresolution.Text.Split('*')[1]);
+
+                pictureBox1.Height = pictureBox1.Width * height / width;
+                pictureBox2.Height = pictureBox1.Width * height / width;
+                pictureBox3.Height = pictureBox1.Width * height / width;
+                pictureBox4.Height = pictureBox1.Width * height / width;
+                pictureBox2.Location = new Point(pictureBox1.Location.X + pictureBox1.Width, pictureBox1.Location.Y);
+                pictureBox3.Location = new Point(pictureBox1.Location.X, pictureBox1.Location.Y + pictureBox1.Height);
+                pictureBox4.Location = new Point(pictureBox1.Location.X + pictureBox1.Width, pictureBox1.Location.Y + pictureBox1.Height);
+            }
+
+            this.Refresh();
+
+            double scanFieldSizeH = scanFieldSize * height / width;
+
+            m_Sem.SetScanExternal(true);
+
+            try
+            {
+                for (int i = 0; i < 4; i++)
+                {
+                    if (i == 0)
+                    {
+
+                    }
+                    else if (i == 1)
+                    {
+                        switch (cb_Xdirection.SelectedItem.ToString())
+                        {
+                            case "RIGHT_TOWARD": PositionX += scanFieldSize; break;
+                            default: PositionX -= scanFieldSize; break;
+                        }
+                        m_Sem.MoveSEMToPoint(PositionX, PositionY);
+                    }
+                    else if (i == 2)
+                    {
+                        switch (cb_Ydirection.SelectedItem.ToString())
+                        {
+                            case "UP_TOWARD": PositionY -= scanFieldSizeH; break;
+                            default: PositionY += scanFieldSizeH; break;
+                        }
+                        m_Sem.MoveSEMToPoint(PositionX, PositionY);
+                    }
+                    else
+                    {
+                        switch (cb_Xdirection.SelectedItem.ToString())
+                        {
+                            case "RIGHT_TOWARD": PositionX -= scanFieldSize; break;
+                            default: PositionX += scanFieldSize; break;
+                        }
+                        m_Sem.MoveSEMToPoint(PositionX, PositionY);
+                    }
+                    //Thread.Sleep(50);
+                    byte[] ImageByte = new byte[width * height];
+                    bool resultValue = GetScanImage(width, height, "2", ref ImageByte);
+
+                    if (resultValue)
+                    {
+                        if (ImageByte != null)
+                        {
+                            var bitmap = CImageHandler.ToGrayBitmap(ImageByte, width, height);
+                            switch (i)
+                            {
+                                case 0:
+                                    pictureBox1.Image = bitmap;
+                                    break;
+                                case 1:
+                                    pictureBox2.Image = bitmap;
+                                    break;
+                                case 2:
+                                    pictureBox4.Image = bitmap;
+                                    break;
+                                case 3:
+                                    pictureBox3.Image = bitmap;
+                                    break;
+                            }
+                            this.Refresh();
+                        }
+                    }
+                }
+                m_Sem.MoveSEMToPoint(PositionXO, PositionYO);
+            }
+            catch (Exception ex)
+            {
+                log.Error("continuousshot--错误信息:" + ex.ToString());
+            }
+            finally
+            {
+                m_Sem.SetScanExternal(false);
+                m_Sem.DisConnect();
+                btn_continuousshot.Enabled = true;
+                btn_confirm.Enabled = true;
+                btn_continuousshot.Refresh();
+            }
+        }
+        bool SaveConfigXml(string xmlpath, string xAxisDir, string yAxisDir, string scanFieldSize)
+        {
+            try
+            {
+                XmlDocument xmlDocument = new XmlDocument();
+                xmlDocument.Load(xmlpath);
+                XmlNodeList nodeList = xmlDocument.SelectSingleNode("XMLData").ChildNodes;
+
+                foreach (XmlNode xn in nodeList)
+                {
+                    XmlElement xe = (XmlElement)xn;
+                    if (xe.GetAttribute("RegName") == "StageData")
+                    {
+                        xe.SetAttribute("scanFieldSize", scanFieldSize);
+                        xe.SetAttribute("xAxisDir", xAxisDir);
+                        xe.SetAttribute("yAxisDir", yAxisDir);
+                        break;
+                    }
+                }
+
+                xmlDocument.Save(xmlpath);
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show(ex.ToString());
+                return false;
+            }
+            return true;
+        }
+
+        private void btn_confirm_Click(object sender, EventArgs e)
+        {
+            double dscanFieldSize100 = 0;
+            if (cb_Xdirection.Text.Trim() != null && cb_imageresolution.Text.Trim() != null && cb_Ydirection.Text.Trim() != null && double.TryParse(tB_scanFieldSize100.Text, out dscanFieldSize100))
+            {
+                string xmlpath = Application.StartupPath + @"\Config\SysData\OTSProgMgrParam.pmf";
+                string xAxisDir = "";
+                string yAxisDir = "";
+                switch (cb_Xdirection.SelectedItem.ToString())
+                {
+                    case "LEFT_TOWARD":
+                        xAxisDir = "0:LEFT_TOWARD";
+                        break;
+                    default:
+                        xAxisDir = "1:RIGHT_TOWARD";
+                        break;
+                }
+                switch(cb_Ydirection.Text)
+                {
+                    case "UP_TOWARD":
+                        yAxisDir="0:" + cb_Ydirection.Text;
+                        break;
+                    default:
+                        yAxisDir = "1:DOWN_TOWARD";
+                        break;
+                }
+                SaveConfigXml(xmlpath, xAxisDir, yAxisDir, tB_scanFieldSize100.Text);
+            }
+            else
+            {
+                MessageBox.Show("Please check params!");
+            }
+        }
     }
 }