예제 #1
0
        /// <summary>
        /// Closes and disposes a <see cref="IPadContent"/>.
        /// </summary>
        public void UnloadPad(PadDescriptor content)
        {
            PadContentCollection.Remove(content);

            if (layout != null)
            {
                layout.UnloadPad(content);
            }
            content.Dispose();
        }
예제 #2
0
        public void UnloadPad(FormsDesigner.IPadContent content)
        {
            if (content == null)
            {
                return;
            }
            DockContent dockContent = content.Control as DockContent;

            if (dockContent == null)
            {
                dockContent = content.Control.Parent as DockContent;
            }

            dockContent.Close();

            PadContentCollection.Remove(content);

            if (_layout != null)
            {
                _layout.UnloadPad(content);
            }

            content.Dispose();
        }