當前位置: 首頁>>代碼示例>>C#>>正文


C# DockPanel.LoadFromXml方法代碼示例

本文整理匯總了C#中WeifenLuo.WinFormsUI.Docking.DockPanel.LoadFromXml方法的典型用法代碼示例。如果您正苦於以下問題:C# DockPanel.LoadFromXml方法的具體用法?C# DockPanel.LoadFromXml怎麽用?C# DockPanel.LoadFromXml使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在WeifenLuo.WinFormsUI.Docking.DockPanel的用法示例。


在下文中一共展示了DockPanel.LoadFromXml方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: InitializeDocking

        private void InitializeDocking()
        {
            Controls.Remove(DirectionSplitter);

            SpriteDrawer.Dock = DockStyle.Fill;
            _drawContent = new DockContent { Text = @"Sprite Drawer", DockAreas = DockAreas.Document };
            _drawContent.DockHandler.CloseButtonVisible = false;
            _drawContent.Controls.Add(SpriteDrawer);

            DirectionHolder.Dock = DockStyle.Fill;
            _directionContent = new DockContent { Text = @"Sprite Directions", DockAreas = DockAreas.Document };
            _directionContent.DockHandler.CloseButtonVisible = false;
            _directionContent.Controls.Add(DirectionHolder);

            ImagePanel.Dock = DockStyle.Fill;
            _imageContent = new DockContent
                {
                    Text = @"Spriteset Images",
                    DockAreas = DockAreas.DockLeft | DockAreas.DockRight | DockAreas.Float
                };
            _imageContent.DockHandler.CloseButtonVisible = false;
            _imageContent.Controls.Add(ImagePanel);

            AnimPanel.Dock = DockStyle.Fill;
            _animContent = new DockContent
                {
                    Text = @"Direction Animation",
                    DockAreas =
                        DockAreas.DockLeft | DockAreas.DockRight | DockAreas.Float | DockAreas.DockBottom |
                        DockAreas.DockTop
                };
            _animContent.DockHandler.CloseButtonVisible = false;
            _animContent.Controls.Add(AnimPanel);

            BasePanel.Dock = DockStyle.Fill;
            _baseContent = new DockContent
                {
                    Text = @"Base Editor",
                    DockAreas =
                        DockAreas.Document | DockAreas.DockTop | DockAreas.DockBottom | DockAreas.DockLeft |
                        DockAreas.DockRight
                };
            _baseContent.DockHandler.CloseButtonVisible = false;
            _baseContent.Controls.Add(BasePanel);

            _mainDockPanel = new DockPanel { DocumentStyle = DocumentStyle.DockingWindow, Dock = DockStyle.Fill };
            if (File.Exists("SpriteEditor.xml"))
            {
                DeserializeDockContent dc = GetContent;
                _mainDockPanel.LoadFromXml("SpriteEditor.xml", dc);
            }
            else
            {
                _directionContent.Show(_mainDockPanel, DockState.Document);
                _baseContent.Show(_directionContent.Pane, DockAlignment.Bottom, 0.40);
                _drawContent.Show(_baseContent.PanelPane, _baseContent);
                _imageContent.Show(_mainDockPanel, DockState.DockRight);
                _animContent.Show(_imageContent.Pane, DockAlignment.Bottom, 0.40);
            }

            Controls.Add(_mainDockPanel);
        }
開發者ID:Radnen,項目名稱:spherestudio,代碼行數:62,代碼來源:SpritesetEditView.cs

示例2: LoadDockingSettings

        private void LoadDockingSettings()
        {
            ConfigHelper.RestoreWindowSettings(this);

            var dockLayout = Settings.Default.DockingLayout;

            if (dockLayout.IsNotNull())
            {
                toolStripContainer1.ContentPanel.Controls.Remove(DockingPanel);
                DockingPanel = new DockPanel
                   {
                       DocumentStyle = DocumentStyle.DockingWindow,
                       ActiveAutoHideContent = null,
                       Dock = DockStyle.Fill,
                       Font = new Font("Tahoma", 11F, FontStyle.Regular, GraphicsUnit.World),
                       Location = Point.Empty,
                       Name = "DockingPanel",
                       TabStop = false
                   };
                toolStripContainer1.ContentPanel.Controls.Add(DockingPanel);

                var m = new MemoryStream(dockLayout.Length);
                m.Write(Encoding.ASCII.GetBytes(dockLayout), 0, dockLayout.Length);
                m.Position = 0;
                DockingPanel.LoadFromXml(m, GetContentFromPersistString, true);
            }
        }
開發者ID:supermuk,項目名稱:iudico,代碼行數:27,代碼來源:MainForm.cs

示例3: InitializeDocking

        private void InitializeDocking()
        {
            Controls.Remove(MainSplitter);

            WindowHolder.Dock = DockStyle.Fill;
            StyleDrawer.Dock = DockStyle.Fill;
            _styleContent = new DockContent { Text = @"WindowStyle Preview" };
            _styleContent.Controls.Add(WindowHolder);
            _styleContent.Controls.Add(StyleStatusStrip);
            _styleContent.Controls.Add(StyleToolStrip);
            StyleStatusStrip.SendToBack();
            StyleToolStrip.BringToFront();

            _imageContent = new DockContent { Text = @"WindowStyle Image Editor" };
            _imageContent.Controls.Add(StyleDrawer);
            _styleContent.CloseButtonVisible = _imageContent.CloseButtonVisible = false;

            _styleDockPanel = new DockPanel { Dock = DockStyle.Fill, DocumentStyle = DocumentStyle.DockingWindow };
            if (File.Exists("WindowEditor.xml"))
            {
                DeserializeDockContent dc = GetContent;
                _styleDockPanel.LoadFromXml("WindowEditor.xml", dc);
            }
            else
            {
                _styleContent.Show(_styleDockPanel, DockState.Document);
                _imageContent.Show(_styleContent.Pane, DockAlignment.Bottom, 0.40);
            }

            Controls.Add(_styleDockPanel);
            _styleDockPanel.BringToFront();
        }
開發者ID:Radnen,項目名稱:spherestudio,代碼行數:32,代碼來源:WindowstyleEditView.cs

示例4: Initialize

        // 初始化
        public bool Initialize(DockPanel dockPanel)
        {
            // 加載配置界麵
            String applicationPath = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
            String configFile = Path.Combine(Path.GetDirectoryName(applicationPath), "WorldEditor.DockPanel.config");
            if (File.Exists(configFile))
            {
                DeserializeDockContent mDeserializeDockContent = new DeserializeDockContent(GetDockContentFromPersistString);
                dockPanel.LoadFromXml(configFile, mDeserializeDockContent);
            }
            else
            {
                dockPanel.SuspendLayout(true);
                this.mMainForm.Show(dockPanel, DockState.Document);
                this.mWorldForm.Show(dockPanel, DockState.DockRight);
                this.mSceneForm.Show(dockPanel, DockState.DockRight);
                this.mEntityForm.Show(dockPanel, DockState.DockRight);
                this.mTerrainForm.Show(dockPanel, DockState.DockRight);
                this.mSettingForm.Show(dockPanel, DockState.DockRight);
                this.mPropertyForm.Show(dockPanel, DockState.DockRight);
                this.mOutputForm.Show(dockPanel, DockState.DockBottom);
                dockPanel.ResumeLayout(true, true);
            }

            // 初始化操作接口
            this.mWorldEditor = new WorldEditorFramework.MWorldEditor();
            this.mWorldEditor.Initialize(this.mMainForm.Handle);

            //***********
            // 場景加載
            this.mTerrainForm.OnSceneLoad();
            this.mSettingForm.OnSceneLoad();
            this.mSceneForm.OnSceneLoad();
            //***********

            return true;
        }
開發者ID:arundev,項目名稱:dev-code,代碼行數:38,代碼來源:SceneModule.cs

示例5: LoadDockSettings

 public void LoadDockSettings(DockPanel dockPanel)
 {
     if (File.Exists(kDockSettingsFile))
     {
         dockPanel.LoadFromXml(kDockSettingsFile, GetContentFromPersistantString);
     }
 }
開發者ID:hekar,項目名稱:UnScripter,代碼行數:7,代碼來源:MainFormDocks.cs


注:本文中的WeifenLuo.WinFormsUI.Docking.DockPanel.LoadFromXml方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。