Beispiel #1
0
        public Control CreateDocument(Control pane, WinForm.ServiceInterfaces.DockAlignment dockAlignment, string tabText, string metadata = "", double portion = 0.25)
        {
            DockContent dockContent = new GenericDockContent(metadata);
            dockContent.DockAreas = DockAreas.Float | DockAreas.DockBottom | DockAreas.DockLeft | DockAreas.DockRight | DockAreas.DockTop | DockAreas.Document;
            dockContent.TabText = tabText;
            dockContent.Show(((DockContent)pane).Pane, (WeifenLuo.WinFormsUI.Docking.DockAlignment)dockAlignment, portion);

            return dockContent;
        }
Beispiel #2
0
        public Control CreateDocument(WinForm.ServiceInterfaces.DockState dockState, string tabText, string metadata = "")
        {
            DockContent dockContent = new GenericDockContent(metadata);
            dockContent.DockAreas = DockAreas.Float | DockAreas.DockBottom | DockAreas.DockLeft | DockAreas.DockRight | DockAreas.DockTop | DockAreas.Document;
            dockContent.TabText = tabText;
            dockContent.Show(dockPanel, (WeifenLuo.WinFormsUI.Docking.DockState)dockState);

            return dockContent;
        }
        protected IDockContent GetContentFromPersistString(string persistString)
        {
            string             metadata = persistString.RightOf(',').Trim();
            GenericDockContent content  = new GenericDockContent();

            content.Metadata = metadata;

            return(content);
        }
        /// <summary>
        /// Create a document relative to specified pane, in a new container.
        /// </summary>
        public Control CreateDocument(Control pane, WinForm.ServiceInterfaces.DockAlignment dockAlignment, string tabText, string metadata = "", double portion = 0.25)
        {
            DockContent dockContent = new GenericDockContent(metadata);

            dockContent.DockAreas = DockAreas.Float | DockAreas.DockBottom | DockAreas.DockLeft | DockAreas.DockRight | DockAreas.DockTop | DockAreas.Document;
            dockContent.TabText   = tabText;
            dockContent.Show(((DockContent)pane).Pane, (WeifenLuo.WinFormsUI.Docking.DockAlignment)dockAlignment, portion);
            dockContent.FormClosing += (sndr, args) => DocumentClosing.Fire(dockContent, EventArgs.Empty);

            return(dockContent);
        }
        /// <summary>
        /// Create a document in the active document panel.
        /// </summary>
        public Control CreateDocument(WinForm.ServiceInterfaces.DockState dockState, string tabText, string metadata = "")
        {
            DockContent dockContent = new GenericDockContent(metadata);

            dockContent.DockAreas = DockAreas.Float | DockAreas.DockBottom | DockAreas.DockLeft | DockAreas.DockRight | DockAreas.DockTop | DockAreas.Document;
            dockContent.TabText   = tabText;
            dockContent.Show(dockPanel, (WeifenLuo.WinFormsUI.Docking.DockState)dockState);
            dockContent.FormClosing += (sndr, args) => DocumentClosing.Fire(dockContent, EventArgs.Empty);

            return(dockContent);
        }
Beispiel #6
0
        protected IDockContent GetContentFromPersistString(string persistString)
        {
            string metadata = persistString.RightOf(',').Trim();
            GenericDockContent content = new GenericDockContent();
            content.Metadata = metadata;

            return content;
        }