123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- //时间: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<CutHole> m_listCutHole;
- public List<CutHole> ListCutHole
- {
- get { return this.m_listCutHole; }
- set { this.m_listCutHole = value; }
- }
- //XML文件保存
- //样品孔存储xml文档
- public override void Serialize(bool isStoring, XmlDocument xml, XmlNode rootNode)
- {
- Slo<MeasureFile> slo = new Slo<MeasureFile>();
- 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<CutHole> ctch = new Collection<CutHole>();
- 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<CutHole>();
- }
- #region 操作
- //新建
- public void New()
- {
- }
- //打开
- public void Open()
- {
- }
- //保存
- public void Save()
- {
- //Serialize();
- }
- //另存为
- public void SaveAs()
- {
- }
- #endregion
- }
- }
|