Пример #1
0
        public void DestroyComponent(System.ComponentModel.IComponent component)
        {
            DesignerTransaction t = null;

            // Create transaction
            t = CreateTransaction("Destroy Component");

            // Destroy component
            if (component.Site.Container == this)
            {
                OnComponentChanging(component, null);
                Remove(component);
                component.Dispose();
                OnComponentChanged(component, null, null, null);
            }

            // Commit transaction
            t.Commit();
        }