[SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers")] //full trust anyway protected virtual void OnComponentsCreated(ToolboxComponentsCreatedEventArgs args) { if (componentsCreatedEvent != null) { componentsCreatedEvent(this, args); } }
protected void ComponentsCreated(Object sender, ToolboxComponentsCreatedEventArgs e) { foreach (IComponent c in e.Components) { if (c == null) continue; ObjectBrowser.GetTopLevelObjectNode().AddNewObject(c, null); } }
protected virtual void OnComponentsCreated(ToolboxComponentsCreatedEventArgs args) { // TODO }
protected virtual void OnComponentsCreated (ToolboxComponentsCreatedEventArgs args) { if (ComponentsCreated != null) this.ComponentsCreated (this, args); }
/// <summary> /// Raises the OnComponentsCreated event. This /// will be called when this <see cref='System.Drawing.Design.ToolboxItem'/> creates a component. /// </summary> protected virtual void OnComponentsCreated(ToolboxComponentsCreatedEventArgs args) { _componentsCreatedEvent?.Invoke(this, args); }
/// <summary> /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed. /// <example> /// toolboxcomponentscreatedeventhandler.BeginInvoke(sender, e, callback); /// </example> /// </summary> public static IAsyncResult BeginInvoke(this ToolboxComponentsCreatedEventHandler toolboxcomponentscreatedeventhandler, Object sender, ToolboxComponentsCreatedEventArgs e, AsyncCallback callback) { if(toolboxcomponentscreatedeventhandler == null) throw new ArgumentNullException("toolboxcomponentscreatedeventhandler"); return toolboxcomponentscreatedeventhandler.BeginInvoke(sender, e, callback, null); }
protected virtual void OnComponentsCreated(ToolboxComponentsCreatedEventArgs args) { throw null; }