RptConfigFile.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. using System;
  2. using System.Data;
  3. namespace OTSIncAReportApp.DataOperation.Model
  4. {
  5. [Serializable]
  6. public class RptConfigFile
  7. {
  8. private string path;
  9. public RptConfigFile(string pathe)
  10. {
  11. path = pathe;
  12. }
  13. public void LoadDataFromFile()
  14. {
  15. DataSet ds = DataOperation.DataAccess.XMLoperate.GetXml(path);
  16. this.FileFolderSize = ds.Tables[0].Rows[0]["FileFolderSize"].ToString();
  17. this.FileFolderTrigTemp = ds.Tables[0].Rows[0]["FileFolderTrigTemp"].ToString();
  18. this.Scale = ds.Tables[0].Rows[0]["Scale"].ToString();
  19. this.PartSizeFile = ds.Tables[1].Rows[2]["Name"].ToString();
  20. this.TriTempFile = ds.Tables[1].Rows[3]["Name"].ToString();
  21. }
  22. /// <summary>
  23. /// 粒级表目录
  24. /// </summary>
  25. public string FileFolderSize
  26. {
  27. get;
  28. set;
  29. }
  30. /// <summary>
  31. /// 三元相图目录
  32. /// </summary>
  33. public string FileFolderTrigTemp
  34. {
  35. get;
  36. set;
  37. }
  38. /// <summary>
  39. /// 比例因子
  40. /// </summary>
  41. public string Scale
  42. {
  43. get;
  44. set;
  45. }
  46. /// <summary>
  47. /// 默认使用的粒级文件
  48. /// </summary>
  49. public string PartSizeFile
  50. {
  51. get;
  52. set;
  53. }
  54. /// <summary>
  55. /// 默认使用的三元相图模板文件
  56. /// </summary>
  57. public string TriTempFile
  58. {
  59. get;
  60. set;
  61. }
  62. }
  63. }