ab56a9bcf7
SVN-Revision: r240
67 lines
1.5 KiB
C#
67 lines
1.5 KiB
C#
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();
|
|
}
|
|
/// <summary>
|
|
/// 标题对象
|
|
/// </summary>
|
|
/// <value>The title label object.</value>
|
|
public Label TitleLabelObj { get { return btn_title; } }
|
|
/// <summary>
|
|
/// 按钮点击
|
|
/// </summary>
|
|
/// <value>The title label object.</value>
|
|
public event EventHandler OnClick;
|
|
/// <summary>
|
|
/// 字体大小
|
|
/// </summary>
|
|
/// <value>The size of the control.</value>
|
|
public int FontSize
|
|
{
|
|
get
|
|
{
|
|
return FontSize;
|
|
}
|
|
set
|
|
{
|
|
|
|
if (value > 0)
|
|
{
|
|
this.btn_title.Font = new Font(this.btn_title.Font.FontFamily, value);
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 点击事件模拟
|
|
/// </summary>
|
|
/// <value>The title label object.</value>
|
|
public void OnClickCallBack()
|
|
{
|
|
if (OnClick != null)
|
|
{
|
|
OnClick(this, null);
|
|
}
|
|
}
|
|
private void btn_title_Click(object sender, EventArgs e)
|
|
{
|
|
OnClickCallBack();
|
|
}
|
|
|
|
}
|
|
}
|