RevitButton.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*-------------------------------------------------------------------------
  2. * 功能描述:RevitButton
  3. * 作者:xulisong
  4. * 创建时间: 2019/3/7 15:37:11
  5. * 版本号:v1.0
  6. * -------------------------------------------------------------------------*/
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Linq;
  10. using System.Text;
  11. using System.Threading.Tasks;
  12. namespace FWindSoft.Revit.Menu
  13. {
  14. public class RevitButton:RevitMenuComponment
  15. {
  16. /// <summary>
  17. /// 命令顺序
  18. /// </summary>
  19. public int Index { get;internal set; } = 0;
  20. #region 描述属性
  21. public string AssemblyName { get; set; }
  22. public string ClassName { get; set; }
  23. public string ImageName { get; set; }
  24. public string Description { get; set; }
  25. public string LongDescription { get; set; }
  26. public bool Visible { get; set; }
  27. /// <summary>
  28. /// 按钮类型
  29. /// </summary>
  30. public RevitButtonStyle ButtonStyle { get; set; }
  31. public string GroupName { get; set; }
  32. public bool IsStack { get; set; }
  33. #endregion
  34. #region 关联属性
  35. public string PanelName { get; set; }
  36. #endregion
  37. #region 相关方法
  38. public RevitPanel GetPanel()
  39. {
  40. return Config.Panels.FirstOrDefault(t => t.Name == PanelName);
  41. }
  42. public RevitTab GetTab()
  43. {
  44. return GetPanel()?.GetTab();
  45. }
  46. #endregion
  47. }
  48. }