using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace IntelligentControlForsx.MyControls { public partial class DS_DIGIT_webfontLable2 : UserControl { public DS_DIGIT_webfontLable2() { InitializeComponent(); this.label1.Font = new System.Drawing.Font("DS-Digital", 13F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); } [Browsable(true), Category("Appearance")] public string LableText { get { return this.label1.Text; } set { this.label1.Text = value; } } [Browsable(true), Category("Appearance")] public float LableFontSize { get { return this.label1.Font.Size; } set { this.label1.Font = new System.Drawing.Font("DS-Digital", value, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); } } public event EventHandler MyClick; private void label1_Click(object sender, EventArgs e) { MessageBox.Show("Lable"); if (MyClick != null) { MyClick(this, e); } } private void label1_MouseEnter(object sender, EventArgs e) { this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); } private void label1_MouseLeave(object sender, EventArgs e) { this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); } } }