MeasureFile.cs 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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<MeasureFile> slo = new Slo<MeasureFile>();
  42. xString FileName = new xString();
  43. this.FileName = "aaaaa";
  44. FileName.AssignValue(this.FileName);
  45. slo.Register("FileName", FileName);
  46. if (isStoring)
  47. {
  48. slo.Serialize(true, xml, rootNode);
  49. }
  50. else
  51. {
  52. slo.Serialize(false, xml, rootNode);
  53. this.FileName = FileName.value();
  54. }
  55. }
  56. #endregion
  57. //构造函数
  58. public MeasureFile()
  59. {
  60. Init();
  61. }
  62. public void Init()
  63. {
  64. }
  65. #region 操作
  66. //新建
  67. public void New()
  68. {
  69. }
  70. //打开
  71. public void Open()
  72. {
  73. }
  74. //保存
  75. public void Save()
  76. {
  77. //Serialize();
  78. }
  79. //另存为
  80. public void SaveAs()
  81. {
  82. }
  83. #endregion
  84. }
  85. }