| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
-
- using System.ComponentModel;
- using System.Drawing;
- using System.Windows.Forms;
- namespace Dongke.WinForm.Controls
- {
- /// <summary>
- /// 可显示超链接的标签控件
- /// </summary>
- [ToolboxBitmap(typeof(LinkLabel))]
- public class LklLinkLabel : LinkLabel, IDKControl, IAsyncControl
- {
- #region 构造函数
- /// <summary>
- /// 可显示超链接的标签控件
- /// </summary>
- public LklLinkLabel()
- {
- base.BackColor = Color.Transparent;
- }
- #endregion
- #region 重写属性
- /// <summary>
- /// 获取或设置一个值,该值指示是否自动调整控件的大小以完整显示其内容
- /// </summary>
- [DefaultValue(true)]
- public override bool AutoSize
- {
- get
- {
- return base.AutoSize;
- }
- set
- {
- base.AutoSize = value;
- }
- }
- /// <summary>
- /// 获取或设置控件的背景色
- /// </summary>
- [DefaultValue(typeof(Color), "Transparent")]
- public override Color BackColor
- {
- get
- {
- return base.BackColor;
- }
- set
- {
- base.BackColor = value;
- }
- }
- #endregion
- #region IAsyncControl 成员
- /// <summary>
- /// 开始异步处理
- /// </summary>
- /// <param name="doFocus">是否处理焦点</param>
- public virtual void BeginAsync(ref bool doFocus)
- {
- this.Enabled = false;
- }
- /// <summary>
- /// 结束异步处理
- /// </summary>
- public virtual void EndAsync()
- {
- }
- #endregion
- }
- }
|