Пример #1
0
        private void InitializePanels()
        {
            _dockPanel        = new DockPanel();
            _vS2015LightTheme = new VS2015LightTheme();
            _vS2015BlueTheme  = new VS2015BlueTheme();
            _vS2015DarkTheme  = new VS2015DarkTheme();

            _currentTheme = _optionSettings.Theme;

            ThemeBase currentTheme = _vS2015LightTheme;

            switch (_currentTheme)
            {
            case DockingTheme.LightTheme:
                currentTheme = _vS2015LightTheme;
                break;

            case DockingTheme.BlueTheme:
                currentTheme = _vS2015BlueTheme;
                break;

            case DockingTheme.DarkTheme:
                currentTheme = _vS2015DarkTheme;
                break;
            }

            _dockPanel.Dock                       = DockStyle.Fill;
            _dockPanel.DockBackColor              = Color.White;
            _dockPanel.DockBottomPortion          = 300D;
            _dockPanel.DockLeftPortion            = 350D;
            _dockPanel.DockRightPortion           = 300D;
            _dockPanel.DockTopPortion             = 150D;
            _dockPanel.Font                       = new Font("Tahoma", 12F, FontStyle.Regular, GraphicsUnit.World, 0);
            _dockPanel.Location                   = new Point(0, 49);
            _dockPanel.Name                       = "dockPanel";
            _dockPanel.Padding                    = new Padding(6);
            _dockPanel.RightToLeftLayout          = true;
            _dockPanel.ShowAutoHideContentOnHover = true;
            _dockPanel.Size                       = new Size(this.Width - 10, this.Height - 10);
            _dockPanel.TabIndex                   = 0;
            _dockPanel.Theme                      = currentTheme;
            _dockPanel.DocumentStyle              = DocumentStyle.DockingWindow;
            _dockPanel.ShowDocumentIcon           = true;
            _dockPanel.AllowEndUserDocking        = false;
            _dockPanel.AllowEndUserNestedDocking  = false;

            this.Controls.Add(_dockPanel);

            _vS2015LightTheme.Skin.DockPaneStripSkin.TextFont = new Font("Segoe UI", 16F, FontStyle.Regular, GraphicsUnit.World, 0);
            _vS2015BlueTheme.Skin.DockPaneStripSkin.TextFont  = new Font("Segoe UI", 16F, FontStyle.Regular, GraphicsUnit.World, 0);
            _vS2015DarkTheme.Skin.DockPaneStripSkin.TextFont  = new Font("Segoe UI", 16F, FontStyle.Regular, GraphicsUnit.World, 0);

            _testViewPanel      = new TestViewDockPanel();
            _testViewPanel.Text = "W3C SVG Test Suite";
            _testViewPanel.Show(_dockPanel, DockState.DockLeft);

            _debugPanel      = new DebugDockPanel();
            _debugPanel.Text = "Debugging";
            _debugPanel.Show(_dockPanel, DockState.DockBottomAutoHide);

            _testPanel      = new TestDockPanel();
            _testPanel.Text = "Test";
            _testPanel.Show(_dockPanel, DockState.Document);

            _aboutTestPanel      = new AboutTestDockPanel();
            _aboutTestPanel.Text = "About Test";
            _aboutTestPanel.Show(_testPanel.Pane, null);

            _inputPanel      = new SvgInputDockPanel();
            _inputPanel.Text = "Svg Input";
            _inputPanel.Show(_testPanel.Pane, null);

            _settingsPanel      = new SettingsDockPanel();
            _settingsPanel.Text = "Settings";
            _settingsPanel.Show(_testPanel.Pane, null);

            _resultsPanel      = new ResultsDockPanel();
            _resultsPanel.Text = "Test Results";
            _resultsPanel.Show(_testPanel.Pane, null);

            _testViewPanel.Pages.Add(_aboutTestPanel);
            _testViewPanel.Pages.Add(_inputPanel);
            _testViewPanel.Pages.Add(_testPanel);

            var dockPanels = new DockPanelContent[]
            {
                _testViewPanel,
                _debugPanel,
                _testPanel,
                _aboutTestPanel,
                _inputPanel,
                _settingsPanel,
                _resultsPanel
            };

            foreach (var dockPanel in dockPanels)
            {
                dockPanel.InitializePanel(this, _optionSettings, currentTheme);
            }

            _dockPanel.ActiveContentChanged  += OnDockPanelActiveContentChanged;
            _dockPanel.ActiveDocumentChanged += OnDockPanelActiveDocumentChanged;
            _dockPanel.ActivePaneChanged     += OnDockPanelActivePaneChanged;

            _testPanel.Activate();
        }