Esempio n. 1
0
        public virtual void ShowPad(PadDescriptor content)
        {
            PadContentCollection.Add(content);

            if (layout != null)
            {
                layout.ShowPad(content);
            }
        }
Esempio n. 2
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();
        }
Esempio n. 3
0
        public void ShowPad(PadDescriptor content)
        {
            if (content == null)
            {
                throw new ArgumentNullException("content");
            }
            PadContentCollection.Add(content);

            if (layout != null)
            {
                layout.ShowPad(content);
            }
        }
Esempio n. 4
0
        public virtual void ShowPad(PadDescriptor content)
        {
            PadDescriptor hasPad = GetPad(content.GetType());

            if (hasPad == null)
            {
                PadContentCollection.Add(content);
            }
            if (layout != null)
            {
                layout.ShowPad(content);
            }
        }
Esempio n. 5
0
        private void InitDockForm()
        {
            FormProperties formProperties = new FormProperties();

            formProperties.Show(dockPanel, DockState.DockRight);
            PadContentCollection.Add(formProperties);
            FormsDesignerViewContent formsDVC = WorkbenchSingleton.Workbench.ActiveContent as FormsDesignerViewContent;

            if (formsDVC != null)
            {
                ToolboxService toolboxService = formsDVC.DesignSurface.GetService(typeof(IToolboxService)) as ToolboxService;
                FormToolBox    formTool       = new FormToolBox(toolboxService);
                formTool.Show(dockPanel, DockState.DockLeft);
                formTool.DockPanel.DockLeftPortion = 0.15;
                formTool.AutoHidePortion           = 0.15;
                PadContentCollection.Add(formTool);
            }
            dockPanel.Documents.First().DockHandler.Activate();
        }
Esempio n. 6
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();
        }