MeasureFile.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. //时间:20200610
  2. //作者:郝爽
  3. //功能:测量文件
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using FileManager;
  10. using System.Xml;
  11. namespace MeasureData
  12. {
  13. public class MeasureFile:Convertinterface
  14. {
  15. #region 内容
  16. //文件名
  17. private string m_fileName;
  18. public string FileName
  19. {
  20. get { return this.m_fileName; }
  21. set { this.m_fileName = value; }
  22. }
  23. //文件路径
  24. private string m_filepath;
  25. public string FilePath
  26. {
  27. get { return this.m_filepath; }
  28. set { this.m_filepath = value; }
  29. }
  30. //切孔链表
  31. private List<CutHole> m_listCutHole;
  32. public List<CutHole> ListCutHole
  33. {
  34. get { return this.m_listCutHole; }
  35. set { this.m_listCutHole = value; }
  36. }
  37. //XML文件保存
  38. //样品孔存储xml文档
  39. public void Serialize(bool isStoring, XmlDocument xml, XmlNode rootNode)
  40. {
  41. Slo<CutHole> slo = new Slo<CutHole>();
  42. xString FileName = new xString();
  43. FileName.AssignValue(this.FileName);
  44. slo.Register("FileName", FileName);
  45. if (isStoring)
  46. {
  47. slo.Serialize(true, xml, rootNode);
  48. }
  49. else
  50. {
  51. slo.Serialize(false, xml, rootNode);
  52. this.FileName = FileName.value();
  53. }
  54. }
  55. #endregion
  56. //构造函数
  57. public MeasureFile()
  58. {
  59. Init();
  60. }
  61. public void Init()
  62. {
  63. }
  64. #region 操作
  65. //新建
  66. public void New()
  67. {
  68. }
  69. //打开
  70. public void Open()
  71. {
  72. }
  73. //保存
  74. public void Save()
  75. {
  76. //Serialize();
  77. }
  78. //另存为
  79. public void SaveAs()
  80. {
  81. }
  82. #endregion
  83. }
  84. }