void OnLabelClick(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { Label label = sender as Label; LabelClickEventArgs ce = new LabelClickEventArgs((int)label.Tag); OnLabelClick(ce); } }
protected virtual void OnLabelClick(LabelClickEventArgs e) { if (LabelClick != null) LabelClick(this, e); }