Ejemplo n.º 1
0
        private void LoadViewport()
        {
            ViewportDock    = new DockContent();
            Viewport2D      = new MuuntEditor2D(this);
            Viewport2D.Dock = DockStyle.Fill;
            ViewportDock.Controls.Add(Viewport2D);

            ViewportDock.Show(dockPanel1, DockState.Document);
            ViewportDock.DockHandler.AllowEndUserDocking = false;
        }
Ejemplo n.º 2
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            if (Runtime.MuuntEditor.Enable3DViewport)
            {
                Runtime.MuuntEditor.Enable3DViewport = false;
                toolStripButton1.Image = Properties.Resources.ViewportIconDisable;
            }
            else
            {
                toolStripButton1.Image = Properties.Resources.ViewportIcon;
                Runtime.MuuntEditor.Enable3DViewport = true;
            }

            if (ViewportDock != null)
            {
                ViewportDock.Controls.Clear();
                if (Runtime.MuuntEditor.Enable3DViewport)
                {
                    if (Viewport3D == null)
                    {
                        Viewport3D      = new MuuntEditor3D(this);
                        Viewport3D.Dock = DockStyle.Fill;
                    }
                    ViewportDock.Controls.Add(Viewport3D);
                }
                else
                {
                    if (Viewport2D == null)
                    {
                        Viewport2D      = new MuuntEditor2D(this);
                        Viewport2D.Dock = DockStyle.Fill;
                    }
                    ViewportDock.Controls.Add(Viewport2D);
                }
            }
        }