//时间:20200610 //作者:郝爽 //功能:测量文件 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using FileManager; using System.Xml; namespace MeasureData { public class MeasureFile:ISlo { #region 内容 //文件名 private string m_fileName; public string FileName { get { return this.m_fileName; } set { this.m_fileName = value; } } //文件路径 private string m_filepath; public string FilePath { get { return this.m_filepath; } set { this.m_filepath = value; } } //切孔链表 private List m_listCutHole; public List ListCutHole { get { return this.m_listCutHole; } set { this.m_listCutHole = value; } } //XML文件保存 //样品孔存储xml文档 public override void Serialize(bool isStoring, XmlDocument xml, XmlNode rootNode) { Slo slo = new Slo(); xString FileName = new xString(); xString FilePath = new xString(); FileName.AssignValue(this.FileName); FilePath.AssignValue(this.FilePath); slo.Register("FileName", FileName); slo.Register("FilePath", FilePath); Collection ctch = new Collection(); ctch.addItem(this.ListCutHole[0]); if (isStoring) { slo.Serialize(true, xml, rootNode); } else { slo.Serialize(false, xml, rootNode); this.FileName = FileName.value(); this.FilePath = FilePath.value(); } } #endregion //构造函数 public MeasureFile() { Init(); } public void Init() { this.ListCutHole = new List(); } #region 操作 //新建 public void New() { } //打开 public void Open() { } //保存 public void Save() { //Serialize(); } //另存为 public void SaveAs() { } #endregion } }