ToolbarItem.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. using Muchinfo.MTPClient.Data.Enums;
  2. using System.Collections.Generic;
  3. namespace Muchinfo.MTPClient.Data
  4. {
  5. /// <summary>
  6. /// ToolbarGroup类
  7. /// </summary>
  8. public class ToolbarGroup
  9. {
  10. /// <summary>
  11. /// 顺序
  12. /// </summary>
  13. public int Order { get; set; }
  14. /// <summary>
  15. /// 子Toolbar集合
  16. /// </summary>
  17. public List<ToolbarItem> Items { get; set; }
  18. }
  19. /// <summary>
  20. /// ToolbarItem类
  21. /// </summary>
  22. public class ToolbarItem
  23. {
  24. /// <summary>
  25. /// Initializes a new instance of the <see cref="ToolbarItem" /> class.
  26. /// </summary>
  27. /// <param name="iconName">图标资源名称.</param>
  28. /// <param name="toolTip">提示字符.</param>
  29. /// <param name="commandType">命令类型.</param>
  30. public ToolbarItem(string iconName, string toolTip, MenuCommandType commandType)
  31. {
  32. this.IconName = iconName;
  33. this.ToolTip = toolTip;
  34. this.CommandType = commandType;
  35. this.Visible = false;
  36. this.Type = ToolbarButtonType.Default;
  37. }
  38. /// <summary>
  39. /// 图标名称
  40. /// </summary>
  41. public string IconName { get; set; }
  42. /// <summary>
  43. /// 提示字符
  44. /// </summary>
  45. public string ToolTip { get; set; }
  46. /// <summary>
  47. /// 命令类型
  48. /// </summary>
  49. public MenuCommandType CommandType { get; set; }
  50. /// <summary>
  51. /// 子项集合
  52. /// </summary>
  53. public List<ToolbarItem> Children { get; set; }
  54. /// <summary>
  55. /// 是否可见
  56. /// </summary>
  57. public bool Visible { get; set; }
  58. /// <summary>
  59. /// 何种类型页面可用
  60. /// </summary>
  61. public ToolbarButtonType Type { get; set; }
  62. }
  63. }