Explorar o código

自动对焦测试

HaoShuang %!s(int64=5) %!d(string=hai) anos
pai
achega
c263591817
Modificáronse 3 ficheiros con 248 adicións e 164 borrados
  1. 172 158
      ManulDo/MainForm.Designer.cs
  2. 10 4
      ManulDo/MainForm.cs
  3. 66 2
      MeasureData/FocusParam.cs

+ 172 - 158
ManulDo/MainForm.Designer.cs

@@ -28,7 +28,7 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
             this.groupBox1 = new System.Windows.Forms.GroupBox();
             this.btnOpenFile = new System.Windows.Forms.Button();
             this.btnSaveFile = new System.Windows.Forms.Button();
@@ -61,26 +61,27 @@
             this.listmsg = new System.Windows.Forms.ListBox();
             this.tbAutoFocus = new System.Windows.Forms.Button();
             this.groupBox5 = new System.Windows.Forms.GroupBox();
-            this.btImgPath = new System.Windows.Forms.Button();
-            this.tBImgPath = new System.Windows.Forms.TextBox();
-            this.label3 = new System.Windows.Forms.Label();
-            this.label4 = new System.Windows.Forms.Label();
-            this.label5 = new System.Windows.Forms.Label();
-            this.label6 = new System.Windows.Forms.Label();
-            this.label7 = new System.Windows.Forms.Label();
-            this.label8 = new System.Windows.Forms.Label();
-            this.tB = new System.Windows.Forms.TextBox();
-            this.textBox2 = new System.Windows.Forms.TextBox();
-            this.textBox3 = new System.Windows.Forms.TextBox();
-            this.textBox4 = new System.Windows.Forms.TextBox();
-            this.textBox5 = new System.Windows.Forms.TextBox();
-            this.textBox6 = new System.Windows.Forms.TextBox();
-            this.label9 = new System.Windows.Forms.Label();
-            this.label10 = new System.Windows.Forms.Label();
-            this.label11 = new System.Windows.Forms.Label();
-            this.label12 = new System.Windows.Forms.Label();
-            this.label13 = new System.Windows.Forms.Label();
+            this.button2 = new System.Windows.Forms.Button();
             this.label14 = new System.Windows.Forms.Label();
+            this.label13 = new System.Windows.Forms.Label();
+            this.label12 = new System.Windows.Forms.Label();
+            this.label11 = new System.Windows.Forms.Label();
+            this.label10 = new System.Windows.Forms.Label();
+            this.label9 = new System.Windows.Forms.Label();
+            this.textBox6 = new System.Windows.Forms.TextBox();
+            this.textBox5 = new System.Windows.Forms.TextBox();
+            this.textBox4 = new System.Windows.Forms.TextBox();
+            this.textBox3 = new System.Windows.Forms.TextBox();
+            this.textBox2 = new System.Windows.Forms.TextBox();
+            this.tB = new System.Windows.Forms.TextBox();
+            this.label8 = new System.Windows.Forms.Label();
+            this.label7 = new System.Windows.Forms.Label();
+            this.label6 = new System.Windows.Forms.Label();
+            this.label5 = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.label3 = new System.Windows.Forms.Label();
+            this.tBImgPath = new System.Windows.Forms.TextBox();
+            this.btImgPath = new System.Windows.Forms.Button();
             this.groupBox1.SuspendLayout();
             this.groupBox2.SuspendLayout();
             this.groupBox3.SuspendLayout();
@@ -244,14 +245,14 @@
             this.groupBox3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.groupBox3.Name = "groupBox3";
             this.groupBox3.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.groupBox3.Size = new System.Drawing.Size(454, 109);
+            this.groupBox3.Size = new System.Drawing.Size(774, 76);
             this.groupBox3.TabIndex = 3;
             this.groupBox3.TabStop = false;
             this.groupBox3.Text = "测量参数";
             // 
             // btParamOK
             // 
-            this.btParamOK.Location = new System.Drawing.Point(342, 67);
+            this.btParamOK.Location = new System.Drawing.Point(653, 20);
             this.btParamOK.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.btParamOK.Name = "btParamOK";
             this.btParamOK.Size = new System.Drawing.Size(102, 37);
@@ -262,7 +263,7 @@
             // 
             // btFIB
             // 
-            this.btFIB.Location = new System.Drawing.Point(184, 60);
+            this.btFIB.Location = new System.Drawing.Point(575, 23);
             this.btFIB.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.btFIB.Name = "btFIB";
             this.btFIB.Size = new System.Drawing.Size(43, 26);
@@ -273,7 +274,7 @@
             // 
             // tBFIBTemp
             // 
-            this.tBFIBTemp.Location = new System.Drawing.Point(86, 59);
+            this.tBFIBTemp.Location = new System.Drawing.Point(477, 22);
             this.tBFIBTemp.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.tBFIBTemp.Name = "tBFIBTemp";
             this.tBFIBTemp.ReadOnly = true;
@@ -283,7 +284,7 @@
             // label2
             // 
             this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(17, 68);
+            this.label2.Location = new System.Drawing.Point(408, 31);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(71, 18);
             this.label2.TabIndex = 4;
@@ -330,9 +331,9 @@
             // 
             // CutHoleGridView
             // 
-            dataGridViewCellStyle2.BackColor = System.Drawing.Color.Beige;
-            dataGridViewCellStyle2.Font = new System.Drawing.Font("Verdana", 8F, System.Drawing.FontStyle.Bold);
-            this.CutHoleGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
+            dataGridViewCellStyle1.BackColor = System.Drawing.Color.Beige;
+            dataGridViewCellStyle1.Font = new System.Drawing.Font("Verdana", 8F, System.Drawing.FontStyle.Bold);
+            this.CutHoleGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
             this.CutHoleGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.CutHoleGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.Name,
@@ -342,7 +343,7 @@
             this.M,
             this.R,
             this.T});
-            this.CutHoleGridView.Location = new System.Drawing.Point(12, 350);
+            this.CutHoleGridView.Location = new System.Drawing.Point(15, 326);
             this.CutHoleGridView.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.CutHoleGridView.Name = "CutHoleGridView";
             this.CutHoleGridView.ReadOnly = true;
@@ -389,23 +390,24 @@
             // 
             this.listmsg.FormattingEnabled = true;
             this.listmsg.ItemHeight = 18;
-            this.listmsg.Location = new System.Drawing.Point(802, 12);
+            this.listmsg.Location = new System.Drawing.Point(802, 18);
             this.listmsg.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
             this.listmsg.Name = "listmsg";
-            this.listmsg.Size = new System.Drawing.Size(784, 832);
+            this.listmsg.Size = new System.Drawing.Size(784, 796);
             this.listmsg.TabIndex = 17;
             // 
             // tbAutoFocus
             // 
             this.tbAutoFocus.Location = new System.Drawing.Point(630, 158);
             this.tbAutoFocus.Name = "tbAutoFocus";
-            this.tbAutoFocus.Size = new System.Drawing.Size(114, 32);
+            this.tbAutoFocus.Size = new System.Drawing.Size(102, 37);
             this.tbAutoFocus.TabIndex = 18;
             this.tbAutoFocus.Text = "对焦";
             this.tbAutoFocus.UseVisualStyleBackColor = true;
             // 
             // groupBox5
             // 
+            this.groupBox5.Controls.Add(this.button2);
             this.groupBox5.Controls.Add(this.label14);
             this.groupBox5.Controls.Add(this.label13);
             this.groupBox5.Controls.Add(this.label12);
@@ -427,98 +429,99 @@
             this.groupBox5.Controls.Add(this.tBImgPath);
             this.groupBox5.Controls.Add(this.btImgPath);
             this.groupBox5.Controls.Add(this.tbAutoFocus);
-            this.groupBox5.Location = new System.Drawing.Point(17, 636);
+            this.groupBox5.Location = new System.Drawing.Point(17, 609);
             this.groupBox5.Name = "groupBox5";
             this.groupBox5.Size = new System.Drawing.Size(771, 207);
             this.groupBox5.TabIndex = 19;
             this.groupBox5.TabStop = false;
             this.groupBox5.Text = "自动对焦";
             // 
-            // btImgPath
+            // button2
             // 
-            this.btImgPath.Location = new System.Drawing.Point(17, 25);
-            this.btImgPath.Name = "btImgPath";
-            this.btImgPath.Size = new System.Drawing.Size(266, 35);
-            this.btImgPath.TabIndex = 20;
-            this.btImgPath.Text = "选择图像存储路径";
-            this.btImgPath.UseVisualStyleBackColor = true;
-            this.btImgPath.Click += new System.EventHandler(this.btImgPath_Click);
+            this.button2.Location = new System.Drawing.Point(508, 158);
+            this.button2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.button2.Name = "button2";
+            this.button2.Size = new System.Drawing.Size(102, 37);
+            this.button2.TabIndex = 39;
+            this.button2.Text = "确定";
+            this.button2.UseVisualStyleBackColor = true;
+            this.button2.Click += new System.EventHandler(this.button2_Click);
             // 
-            // tBImgPath
+            // label14
             // 
-            this.tBImgPath.Location = new System.Drawing.Point(302, 27);
-            this.tBImgPath.Name = "tBImgPath";
-            this.tBImgPath.ReadOnly = true;
-            this.tBImgPath.Size = new System.Drawing.Size(450, 28);
-            this.tBImgPath.TabIndex = 21;
+            this.label14.AutoSize = true;
+            this.label14.Location = new System.Drawing.Point(718, 122);
+            this.label14.Name = "label14";
+            this.label14.Size = new System.Drawing.Size(26, 18);
+            this.label14.TabIndex = 38;
+            this.label14.Text = "um";
             // 
-            // label3
+            // label13
             // 
-            this.label3.AutoSize = true;
-            this.label3.Location = new System.Drawing.Point(33, 83);
-            this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(80, 18);
-            this.label3.TabIndex = 8;
-            this.label3.Text = "调节上限";
+            this.label13.AutoSize = true;
+            this.label13.Location = new System.Drawing.Point(487, 126);
+            this.label13.Name = "label13";
+            this.label13.Size = new System.Drawing.Size(26, 18);
+            this.label13.TabIndex = 37;
+            this.label13.Text = "um";
             // 
-            // label4
+            // label12
             // 
-            this.label4.AutoSize = true;
-            this.label4.Location = new System.Drawing.Point(299, 83);
-            this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(80, 18);
-            this.label4.TabIndex = 22;
-            this.label4.Text = "调节下限";
+            this.label12.AutoSize = true;
+            this.label12.Location = new System.Drawing.Point(222, 121);
+            this.label12.Name = "label12";
+            this.label12.Size = new System.Drawing.Size(26, 18);
+            this.label12.TabIndex = 36;
+            this.label12.Text = "um";
             // 
-            // label5
+            // label11
             // 
-            this.label5.AutoSize = true;
-            this.label5.Location = new System.Drawing.Point(530, 83);
-            this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(80, 18);
-            this.label5.TabIndex = 23;
-            this.label5.Text = "调节步长";
+            this.label11.AutoSize = true;
+            this.label11.Location = new System.Drawing.Point(718, 84);
+            this.label11.Name = "label11";
+            this.label11.Size = new System.Drawing.Size(26, 18);
+            this.label11.TabIndex = 35;
+            this.label11.Text = "um";
             // 
-            // label6
+            // label10
             // 
-            this.label6.AutoSize = true;
-            this.label6.Location = new System.Drawing.Point(36, 119);
-            this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(80, 18);
-            this.label6.TabIndex = 24;
-            this.label6.Text = "精调范围";
+            this.label10.AutoSize = true;
+            this.label10.Location = new System.Drawing.Point(487, 84);
+            this.label10.Name = "label10";
+            this.label10.Size = new System.Drawing.Size(26, 18);
+            this.label10.TabIndex = 34;
+            this.label10.Text = "um";
             // 
-            // label7
+            // label9
             // 
-            this.label7.AutoSize = true;
-            this.label7.Location = new System.Drawing.Point(305, 119);
-            this.label7.Name = "label7";
-            this.label7.Size = new System.Drawing.Size(80, 18);
-            this.label7.TabIndex = 25;
-            this.label7.Text = "精调步长";
+            this.label9.AutoSize = true;
+            this.label9.Location = new System.Drawing.Point(218, 84);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(26, 18);
+            this.label9.TabIndex = 33;
+            this.label9.Text = "um";
             // 
-            // label8
+            // textBox6
             // 
-            this.label8.AutoSize = true;
-            this.label8.Location = new System.Drawing.Point(530, 119);
-            this.label8.Name = "label8";
-            this.label8.Size = new System.Drawing.Size(44, 18);
-            this.label8.TabIndex = 26;
-            this.label8.Text = "焦距";
+            this.textBox6.Location = new System.Drawing.Point(616, 118);
+            this.textBox6.Name = "textBox6";
+            this.textBox6.ReadOnly = true;
+            this.textBox6.Size = new System.Drawing.Size(96, 28);
+            this.textBox6.TabIndex = 32;
             // 
-            // tB
+            // textBox5
             // 
-            this.tB.Location = new System.Drawing.Point(119, 78);
-            this.tB.Name = "tB";
-            this.tB.Size = new System.Drawing.Size(96, 28);
-            this.tB.TabIndex = 27;
+            this.textBox5.Location = new System.Drawing.Point(385, 119);
+            this.textBox5.Name = "textBox5";
+            this.textBox5.Size = new System.Drawing.Size(96, 28);
+            this.textBox5.TabIndex = 31;
             // 
-            // textBox2
+            // textBox4
             // 
-            this.textBox2.Location = new System.Drawing.Point(385, 80);
-            this.textBox2.Name = "textBox2";
-            this.textBox2.Size = new System.Drawing.Size(96, 28);
-            this.textBox2.TabIndex = 28;
+            this.textBox4.Location = new System.Drawing.Point(120, 116);
+            this.textBox4.Name = "textBox4";
+            this.textBox4.Size = new System.Drawing.Size(96, 28);
+            this.textBox4.TabIndex = 30;
             // 
             // textBox3
             // 
@@ -527,87 +530,97 @@
             this.textBox3.Size = new System.Drawing.Size(96, 28);
             this.textBox3.TabIndex = 29;
             // 
-            // textBox4
+            // textBox2
             // 
-            this.textBox4.Location = new System.Drawing.Point(120, 116);
-            this.textBox4.Name = "textBox4";
-            this.textBox4.Size = new System.Drawing.Size(96, 28);
-            this.textBox4.TabIndex = 30;
+            this.textBox2.Location = new System.Drawing.Point(385, 80);
+            this.textBox2.Name = "textBox2";
+            this.textBox2.Size = new System.Drawing.Size(96, 28);
+            this.textBox2.TabIndex = 28;
             // 
-            // textBox5
+            // tB
             // 
-            this.textBox5.Location = new System.Drawing.Point(385, 119);
-            this.textBox5.Name = "textBox5";
-            this.textBox5.Size = new System.Drawing.Size(96, 28);
-            this.textBox5.TabIndex = 31;
+            this.tB.Location = new System.Drawing.Point(119, 78);
+            this.tB.Name = "tB";
+            this.tB.Size = new System.Drawing.Size(96, 28);
+            this.tB.TabIndex = 27;
             // 
-            // textBox6
+            // label8
             // 
-            this.textBox6.Location = new System.Drawing.Point(616, 118);
-            this.textBox6.Name = "textBox6";
-            this.textBox6.ReadOnly = true;
-            this.textBox6.Size = new System.Drawing.Size(96, 28);
-            this.textBox6.TabIndex = 32;
+            this.label8.AutoSize = true;
+            this.label8.Location = new System.Drawing.Point(530, 119);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(44, 18);
+            this.label8.TabIndex = 26;
+            this.label8.Text = "焦距";
             // 
-            // label9
+            // label7
             // 
-            this.label9.AutoSize = true;
-            this.label9.Location = new System.Drawing.Point(218, 84);
-            this.label9.Name = "label9";
-            this.label9.Size = new System.Drawing.Size(26, 18);
-            this.label9.TabIndex = 33;
-            this.label9.Text = "um";
+            this.label7.AutoSize = true;
+            this.label7.Location = new System.Drawing.Point(305, 119);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(80, 18);
+            this.label7.TabIndex = 25;
+            this.label7.Text = "精调步长";
             // 
-            // label10
+            // label6
             // 
-            this.label10.AutoSize = true;
-            this.label10.Location = new System.Drawing.Point(487, 84);
-            this.label10.Name = "label10";
-            this.label10.Size = new System.Drawing.Size(26, 18);
-            this.label10.TabIndex = 34;
-            this.label10.Text = "um";
+            this.label6.AutoSize = true;
+            this.label6.Location = new System.Drawing.Point(36, 119);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(80, 18);
+            this.label6.TabIndex = 24;
+            this.label6.Text = "精调范围";
             // 
-            // label11
+            // label5
             // 
-            this.label11.AutoSize = true;
-            this.label11.Location = new System.Drawing.Point(718, 84);
-            this.label11.Name = "label11";
-            this.label11.Size = new System.Drawing.Size(26, 18);
-            this.label11.TabIndex = 35;
-            this.label11.Text = "um";
+            this.label5.AutoSize = true;
+            this.label5.Location = new System.Drawing.Point(530, 83);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(80, 18);
+            this.label5.TabIndex = 23;
+            this.label5.Text = "调节步长";
             // 
-            // label12
+            // label4
             // 
-            this.label12.AutoSize = true;
-            this.label12.Location = new System.Drawing.Point(222, 121);
-            this.label12.Name = "label12";
-            this.label12.Size = new System.Drawing.Size(26, 18);
-            this.label12.TabIndex = 36;
-            this.label12.Text = "um";
+            this.label4.AutoSize = true;
+            this.label4.Location = new System.Drawing.Point(299, 83);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(80, 18);
+            this.label4.TabIndex = 22;
+            this.label4.Text = "调节下限";
             // 
-            // label13
+            // label3
             // 
-            this.label13.AutoSize = true;
-            this.label13.Location = new System.Drawing.Point(487, 126);
-            this.label13.Name = "label13";
-            this.label13.Size = new System.Drawing.Size(26, 18);
-            this.label13.TabIndex = 37;
-            this.label13.Text = "um";
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(33, 83);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(80, 18);
+            this.label3.TabIndex = 8;
+            this.label3.Text = "调节上限";
             // 
-            // label14
+            // tBImgPath
             // 
-            this.label14.AutoSize = true;
-            this.label14.Location = new System.Drawing.Point(718, 122);
-            this.label14.Name = "label14";
-            this.label14.Size = new System.Drawing.Size(26, 18);
-            this.label14.TabIndex = 38;
-            this.label14.Text = "um";
+            this.tBImgPath.Location = new System.Drawing.Point(302, 27);
+            this.tBImgPath.Name = "tBImgPath";
+            this.tBImgPath.ReadOnly = true;
+            this.tBImgPath.Size = new System.Drawing.Size(450, 28);
+            this.tBImgPath.TabIndex = 21;
+            // 
+            // btImgPath
+            // 
+            this.btImgPath.Location = new System.Drawing.Point(17, 25);
+            this.btImgPath.Name = "btImgPath";
+            this.btImgPath.Size = new System.Drawing.Size(266, 35);
+            this.btImgPath.TabIndex = 20;
+            this.btImgPath.Text = "选择图像存储路径";
+            this.btImgPath.UseVisualStyleBackColor = true;
+            this.btImgPath.Click += new System.EventHandler(this.btImgPath_Click);
             // 
             // MainForm
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1600, 854);
+            this.ClientSize = new System.Drawing.Size(1600, 825);
             this.Controls.Add(this.groupBox5);
             this.Controls.Add(this.listmsg);
             this.Controls.Add(this.CutHoleGridView);
@@ -681,6 +694,7 @@
         private System.Windows.Forms.Label label12;
         private System.Windows.Forms.Label label11;
         private System.Windows.Forms.Label label10;
+        private System.Windows.Forms.Button button2;
     }
 }
 

+ 10 - 4
ManulDo/MainForm.cs

@@ -26,8 +26,8 @@ namespace WindowsFormsApp1
         /// 测量线程  
         public Measure m_Ms;
 
-        //图像文件夹
-        public string m_strImgPath;
+        //自动对焦函数
+        public FocusParam m_focusParam;
 
         #endregion
         #region 构造函数
@@ -43,8 +43,8 @@ namespace WindowsFormsApp1
             m_BackgroundWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(CompletedWork);
 
             LogManager.InitManulLog();
-           
 
+            m_focusParam = new FocusParam();
         }
         #endregion
         #region 测量线程
@@ -281,10 +281,16 @@ namespace WindowsFormsApp1
                     return;
                 }
 
-                m_strImgPath = dialog.SelectedPath;
+                m_focusParam.Path = dialog.SelectedPath;
                 tBImgPath.Text = dialog.SelectedPath;
 
             }
         }
+
+        private void button2_Click(object sender, EventArgs e)
+        {
+           //保存自动对焦函数
+
+        }
     }
 }

+ 66 - 2
MeasureData/FocusParam.cs

@@ -16,27 +16,91 @@ namespace MeasureData
     public class FocusParam : ISlo
     {
         #region 内容
+        //图像存储路径
+        private string m_sPath;
+        public string Path
+        {
+            get { return this.m_sPath; }
+            set { this.m_sPath = value; }
+        }
+
         //调节上限
         private float m_fUp;
-        public string UP
+        public float UP
         {
             get { return this.m_fUp; }
             set { this.m_fUp = value; }
         }
         //调节下限
         private float m_fDown;
+        public float Down
+        {
+            get { return this.m_fDown; }
+            set { this.m_fDown = value; }
+        }
         //调节步长
         private float m_fStep;
+        public float Step
+        {
+            get { return this.m_fStep; }
+            set { this.m_fStep = value; }
+        }
         //精调范围
         private float m_ffRange;
+        public float Range
+        {
+            get { return this.m_ffRange; }
+            set { this.m_ffRange = value; }
+        }
         //精调步长
         private float m_ffStep;
+        public float fStep
+        {
+            get { return this.m_ffStep; }
+            set { this.m_ffStep = value; }
+        }
         #endregion
+
+        public FocusParam()
+        {
+            Init();
+        }
+
+        public void Init()
+        {
+            this.UP = 0;
+            this.Down = 0;
+            this.Step = 0;
+            this.Range = 0;
+            this.fStep = 0;
+        }
+
         //XML文件保存测量参数
         public override void Serialize(bool isStoring, XmlDocument xml, XmlNode rootNode)
         {
-            Slo slo_msparam = new Slo();
+            Slo slo_fcsparam = new Slo();
+
+            xDouble dUp = new xDouble();
+            xDouble dDown = new xDouble();
+            xDouble dStep = new xDouble();
+            xDouble dRange = new xDouble();
+            xDouble dfStep = new xDouble();
+
+            if (isStoring)
+            {
+                slo_fcsparam.Serialize(true, xml, rootNode);
+            }
+            else
+            {
+                slo_fcsparam.Serialize(false, xml, rootNode);
+
+                this.UP = (float)dUp.value();
+                this.Down = (float)dDown.value();
+                this.Step = (float)dStep.value();
+                this.Range = (float)dRange.value();
+                this.fStep = (float)dfStep.value();
 
+            }
         }
     }
 }