ComponentFactory.Krypton.Toolkit.KryptonContextMenuItemsDesigner.Initialize C# (CSharp) Метод

Initialize() публичный Метод

Initializes the designer with the specified component.
public Initialize ( IComponent component ) : void
component IComponent The IComponent to associate the designer with.
Результат void
        public override void Initialize(IComponent component)
        {
            // Validate the parameter reference
            if (component == null) throw new ArgumentNullException("component");

            // Let base class do standard stuff
            base.Initialize(component);

            // Cast to correct type
            _contextMenuItems = component as KryptonContextMenuItems;

            // Get access to the services
            _changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService));

            // We need to know when we are being removed
            _changeService.ComponentRemoving += new ComponentEventHandler(OnComponentRemoving);
        }
KryptonContextMenuItemsDesigner