当前位置: 首页>>代码示例>>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;未经允许,请勿转载。