123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- //时间:20200618
- //作者:郝爽
- //功能:测量参数
- 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 MeasureParam : ISlo
- {
- #region 内容
- //工作条件,一次测量的全部切孔都是一类的
- // 样品名
- private string m_SampleName;
- public string SampleName
- {
- get { return this.m_SampleName; }
- set { this.m_SampleName = value; }
- }
- //是否有pt工序
- private Boolean m_pt;
- public Boolean PT
- {
- get { return this.m_pt; }
- set { this.m_pt = value; }
- }
- //FIB工作模板
- private string m_fibTemp;
- public string FIBTemp
- {
- get { return this.m_fibTemp; }
- set { this.m_fibTemp = value; }
- }
- //PT工作模板,这个暂时不使用,FIB和PT是一个模板
- private string m_ptTemp;
- public string PTTemp
- {
- get { return this.m_ptTemp; }
- set { this.m_ptTemp = value; }
- }
- //对焦方式,自动对焦还是手动对焦,手动对焦是1,自动对焦0
- private bool m_fMode;
- public bool FocusMode
- {
- get { return m_fMode; }
- set { m_fMode = value; }
- }
- #endregion
- //构造函数
- public MeasureParam()
- {
- Init();
- }
- public void Init()
- {
- this.SampleName = @"";
- this.PT = false;
- this.FIBTemp = @"";
- this.PTTemp = @"";
- }
- //XML文件保存测量参数
- public override void Serialize(bool isStoring, XmlDocument xml, XmlNode rootNode)
- {
- Slo slo_msparam = new Slo();
- xString sampleName = new xString();
- xBool pt = new xBool();
- xString FIBtemp = new xString();
- xString PTtemp = new xString();
- xBool FocMode = new xBool();
- sampleName.AssignValue(this.SampleName);
- pt.AssignValue(this.PT);
- FIBtemp.AssignValue(this.FIBTemp);
- PTtemp.AssignValue(this.PTTemp);
- FocMode.AssignValue(this.FocusMode);
- slo_msparam.Register("SampleName", sampleName);
- slo_msparam.Register("PT", pt);
- slo_msparam.Register("FIBTemp", FIBtemp);
- slo_msparam.Register("PTTemp", PTtemp);
- slo_msparam.Register("FocusMode", FocMode);
- if (isStoring)
- {
- slo_msparam.Serialize(true, xml, rootNode);
- }
- else
- {
- slo_msparam.Serialize(false, xml, rootNode);
- this.SampleName = sampleName.value();
- this.PT = pt.value();
- this.FIBTemp = FIBtemp.value();
- this.PTTemp = PTtemp.value();
- this.FocusMode = FocMode.value();
- }
- }
- }
- }
|