SsrStatusStrip.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. 
  2. using System.ComponentModel;
  3. using System.Drawing;
  4. using System.Windows.Forms;
  5. namespace Dongke.WinForm.Controls
  6. {
  7. /// <summary>
  8. /// 状态栏控件
  9. /// </summary>
  10. [ToolboxBitmap(typeof(StatusStrip))]
  11. public class SsrStatusStrip : StatusStrip, IDKControl, IAsyncControl
  12. {
  13. #region 构造函数
  14. /// <summary>
  15. /// 状态栏控件
  16. /// </summary>
  17. public SsrStatusStrip()
  18. {
  19. base.BackColor = Color.Transparent;
  20. base.Font = SystemFonts.DefaultFont;
  21. }
  22. #endregion
  23. #region 重写属性
  24. /// <summary>
  25. /// 获取或设置控件的背景色
  26. /// </summary>
  27. [DefaultValue(typeof(Color), "Transparent")]
  28. public new Color BackColor
  29. {
  30. get
  31. {
  32. return base.BackColor;
  33. }
  34. set
  35. {
  36. base.BackColor = value;
  37. }
  38. }
  39. /// <summary>
  40. /// 获取或设置用于在控件中显示文本的字体。
  41. /// </summary>
  42. [DefaultValue(typeof(Font), "宋体, 9pt")]
  43. public override Font Font
  44. {
  45. get
  46. {
  47. return base.Font;
  48. }
  49. set
  50. {
  51. base.Font = value;
  52. }
  53. }
  54. #endregion
  55. #region IAsyncControl 成员
  56. /// <summary>
  57. /// 异步处理开始
  58. /// </summary>
  59. /// <param name="doFocus"></param>
  60. public virtual void BeginAsync(ref bool doFocus)
  61. {
  62. }
  63. /// <summary>
  64. /// 异步处理结束
  65. /// </summary>
  66. public virtual void EndAsync()
  67. {
  68. }
  69. #endregion
  70. }
  71. }