using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Windows.Forms; namespace Lskj.SweepCodeExe.Control { public partial class SweepButton : UserControl { public SweepButton() { InitializeComponent(); } /// /// 标题对象 /// /// The title label object. public Label TitleLabelObj { get { return btn_title; } } /// /// 按钮点击 /// /// The title label object. public event EventHandler OnClick; /// /// 字体大小 /// /// The size of the control. public int FontSize { get { return FontSize; } set { if (value > 0) { this.btn_title.Font = new Font(this.btn_title.Font.FontFamily, value); } } } /// /// 点击事件模拟 /// /// The title label object. public void OnClickCallBack() { if (OnClick != null) { OnClick(this, null); } } private void btn_title_Click(object sender, EventArgs e) { OnClickCallBack(); } } }