DKCheckedListBox.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*******************************************************************************
  2. * Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential
  3. * 类的信息:
  4. * 1.程序名称:DKCheckedListBox.cs
  5. * 2.功能描述:扩展的复选框列表控件:便于修改背景颜色及字体、颜色
  6. * 编辑履历:
  7. * 作者 日期 版本 修改内容
  8. * 陈晓野 2014/08/13 1.00 新建
  9. *******************************************************************************/
  10. using System.Windows.Forms;
  11. namespace Dongke.IBOSS.PRD.Basics.BaseControls
  12. {
  13. /// <summary>
  14. /// 扩展的复选框列表控件
  15. /// </summary>
  16. public abstract partial class DKCheckedListBox : CheckedListBox, IDKControl
  17. {
  18. #region 成员变量
  19. // 异步处理开始时,控件状态
  20. private bool _beginAsyncStatus;
  21. #endregion
  22. #region 控件构造函数
  23. public DKCheckedListBox()
  24. {
  25. InitializeComponent();
  26. this.Font = ControlsConst.FONT_SYSTEM_DEFAULT;
  27. }
  28. #endregion
  29. #region 控件属性
  30. #endregion
  31. #region 公有方法
  32. /// <summary>
  33. /// 异步处理开始
  34. /// </summary>
  35. public void BeginAsync()
  36. {
  37. this._beginAsyncStatus = this.Enabled;
  38. this.Enabled = false;
  39. }
  40. /// <summary>
  41. /// 异步处理结束
  42. /// </summary>
  43. public void EndAsync()
  44. {
  45. this.Enabled = this._beginAsyncStatus;
  46. }
  47. #endregion
  48. }
  49. }