protected internal virtual void OnItemRemoved(ToolStripItemEventArgs e) { ToolStripItemEventHandler eh = (ToolStripItemEventHandler)(Events [ItemRemovedEvent]); if (eh != null) { eh(this, e); } }
/// <summary> /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed. /// <example> /// toolstripitemeventhandler.BeginInvoke(sender, e, callback); /// </example> /// </summary> public static IAsyncResult BeginInvoke(this ToolStripItemEventHandler toolstripitemeventhandler, Object sender, ToolStripItemEventArgs e, AsyncCallback callback) { if (toolstripitemeventhandler == null) { throw new ArgumentNullException("toolstripitemeventhandler"); } return(toolstripitemeventhandler.BeginInvoke(sender, e, callback, null)); }
protected internal virtual void OnItemAdded(ToolStripItemEventArgs e) { if (e.Item.InternalVisible) { e.Item.Available = true; } m_helper.AddItem(e.Item); //(e.Item.Text,0); //e.Item.SetPlacement (ToolStripItemPlacement.Main); if (this.Created) { this.PerformLayout(); } ToolStripItemEventHandler eh = (ToolStripItemEventHandler)(Events [ItemAddedEvent]); if (eh != null) { eh(this, e); } }