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 PanelLabel : UserControl { public PanelLabel() { InitializeComponent(); } public event EventHandler MyClick; public event EventHandler MyMouseEnter; public event EventHandler MyMouseLeave; [Browsable(true), Category("Appearance")] public string LableText { set { this.label1.Text = value; } get { return this.label1.Text; } } private void PanelLabel_Click(object sender, EventArgs e) { if (MyClick != null) { MyClick(this, e); } } private void PanelLabel_MouseEnter(object sender, EventArgs e) { if (!this.DesignMode) { this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); if (MyMouseEnter != null) { MyMouseEnter(this.Name, e); } } } private void PanelLabel_MouseLeave(object sender, EventArgs e) { if (!this.DesignMode) { this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(215)))), ((int)(((byte)(231))))); if (MyMouseLeave != null) { MyMouseLeave(this.Name, e); } } } } }