123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- //时间:20200911
- //作者:郝爽
- //功能:测量参数
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using FileManager;
- using System.Xml;
- using System.IO;
- 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 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_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();
- }
- }
- }
- }
|