CPropItem.cs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. using OTSModelSharp.ResourceManage;
  2. using System.Collections.Generic;
  3. namespace OTSDataType
  4. {
  5. public class CPropItem
  6. {
  7. public CPropItem()
  8. {
  9. }// constructor
  10. public CPropItem(CPropItem p)
  11. {
  12. }// copy constructor
  13. // copy constructor
  14. public bool equals(CPropItem p)
  15. {
  16. return true;
  17. }
  18. // set sample parameters
  19. public void SetSmplParameter(int OTS_SAMPLE_PROP_GRID_ITEM_GROUPS, OTS_SAMPLE_PROP_GRID_ITEMS a_nSmplId, OTS_ITEM_TYPES a_nType, bool a_bReadOnly, bool a_bShow)
  20. {
  21. int sampleTitle = ResourceID.IDS_SAMPLE_TITLE_FIRST;
  22. int sampleDES = ResourceID.IDS_SAMPLE_DES_FIRST;
  23. //获取SourceGrid 列表与描述
  24. m_strName = ResourceData.GetSourceColNameString(OTS_SAMPLE_PROP_GRID_ITEM_GROUPS, (sampleTitle + (int)a_nSmplId));
  25. m_strDescription = ResourceData.GetSourceColNameString(OTS_SAMPLE_PROP_GRID_ITEM_GROUPS, (sampleDES + (int)a_nSmplId));
  26. m_nSmplId = a_nSmplId;
  27. m_nType = a_nType;
  28. m_bReadOnly = a_bReadOnly;
  29. m_bShow = a_bShow;
  30. }
  31. // name
  32. public string GetName() { return m_strName; }
  33. public void SetName(string a_strName) { m_strName = a_strName; }
  34. // description
  35. public string GetDescription() { return m_strDescription; }
  36. public void SetDescription(string a_strDescription) { m_strDescription = a_strDescription; }
  37. // sample item Id
  38. public OTS_SAMPLE_PROP_GRID_ITEMS GetSmplItemId() { return m_nSmplId; }
  39. public void SetSmplItemId(OTS_SAMPLE_PROP_GRID_ITEMS a_nSmplId) { m_nSmplId = a_nSmplId; }
  40. // item type
  41. public OTS_ITEM_TYPES GetTypeId() { return m_nType; }
  42. public void SetTypeId(OTS_ITEM_TYPES a_nType) { m_nType = a_nType; }
  43. // read only flag
  44. public bool IsReadOnly() { return m_bReadOnly; }
  45. public void SetReadOnly(bool a_bReadOnly) { m_bReadOnly = a_bReadOnly; }
  46. // cleanup
  47. public void Cleanup()
  48. {
  49. }
  50. // initialization
  51. public void Init()
  52. {
  53. }
  54. // duplication
  55. public void Duplicate(CPropItem a_oSource)
  56. {
  57. }
  58. // name
  59. string m_strName;
  60. // description
  61. string m_strDescription;
  62. // sample item Id
  63. OTS_SAMPLE_PROP_GRID_ITEMS m_nSmplId;
  64. // item type
  65. OTS_ITEM_TYPES m_nType;
  66. // read only flag
  67. bool m_bReadOnly;
  68. // show flag, this is used for interface to sure if this propetry should be show, it is controlled by C++ now.
  69. bool m_bShow;
  70. };
  71. }