/// <summary> /// Handles the Click event of the c control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="CrumbClickEventArgs"/> instance containing the event data.</param> static void c_Click(object sender, CrumbClickEventArgs e) { if ((sender as ZeroitBreadCrumb).Parent is ZeroitBreadCrumb) { ((sender as ZeroitBreadCrumb).Parent as ZeroitBreadCrumb).OnCrumbClick(e); } }
/// <summary> /// Handles the <see cref="E:CrumbClick" /> event. /// </summary> /// <param name="e">The <see cref="CrumbClickEventArgs"/> instance containing the event data.</param> protected void OnCrumbClick(CrumbClickEventArgs e) { if (CrumbClick != null) { CrumbClick.Invoke(this, e); } }
/// <summary> /// Raises the <see cref="E:System.Windows.Forms.Control.MouseUp" /> event. /// </summary> /// <param name="e">A <see cref="T:System.Windows.Forms.MouseEventArgs" /> that contains the event data.</param> protected override void OnMouseUp(MouseEventArgs e) { base.OnMouseUp(e); clicked = false; var ea = new CrumbClickEventArgs(Index, this.chk, this.chkclk, this); OnCrumbClick(ea); if (chkclk) { Checked = !Checked; } else { Checked = ea.CheckedAfter; } }