MenuItemEntity.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. // ***********************************************************************
  2. // Assembly : HZH_Controls
  3. // Created : 08-15-2019
  4. //
  5. // ***********************************************************************
  6. // <copyright file="MenuItemEntity.cs">
  7. // Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
  8. // </copyright>
  9. //
  10. // Blog: https://www.cnblogs.com/bfyx
  11. // GitHub:https://github.com/kwwwvagaa/NetWinformControl
  12. // gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
  13. //
  14. // If you use this code, please keep this note.
  15. // ***********************************************************************
  16. using System;
  17. using System.Collections.Generic;
  18. using System.Linq;
  19. using System.Text;
  20. namespace HZH_Controls.Controls
  21. {
  22. /// <summary>
  23. /// Class MenuItemEntity.
  24. /// </summary>
  25. [Serializable]
  26. public class MenuItemEntity
  27. {
  28. /// <summary>
  29. /// 键
  30. /// </summary>
  31. /// <value>The key.</value>
  32. public string Key { get; set; }
  33. /// <summary>
  34. /// 文字
  35. /// </summary>
  36. /// <value>The text.</value>
  37. public string Text { get; set; }
  38. /// <summary>
  39. /// The m childrens
  40. /// </summary>
  41. private List<MenuItemEntity> m_childrens = new List<MenuItemEntity>();
  42. /// <summary>
  43. /// 子节点
  44. /// </summary>
  45. /// <value>The childrens.</value>
  46. public List<MenuItemEntity> Childrens
  47. {
  48. get
  49. {
  50. return m_childrens ?? (new List<MenuItemEntity>());
  51. }
  52. set
  53. {
  54. m_childrens = value;
  55. }
  56. }
  57. /// <summary>
  58. /// 自定义数据源,一般用于扩展展示,比如定义节点图片等
  59. /// </summary>
  60. /// <value>The data source.</value>
  61. public object DataSource { get; set; }
  62. }
  63. }