예제 #1
0
        public Editor()
        {
            InitializeComponent();

            // load up the maps

            this.components = new Container();
            dm = new DockManager(this.components);
            dm.Dock = DockStyle.Fill;

            DockManager.FastMoveDraw = false;
            DockManager.Style = DockVisualStyle.VS2005;

            toolStripContainer1.ContentPanel.Controls.Add(this.dm);

            mes.dm = dm;
            mes.coordlabel = status_Coords;

            mes.Init();
        }
        ///<summary>
        /// Does all the necessary work to set up docking in the application.
        /// Docks all the main controls.
        ///</summary>
        ///<remarks>
        /// Ferda is using DockDotNET as its docking library.
        ///</remarks>
        protected void SetupDocking()
        {
            Ferda.FrontEnd.Constants constants;
            constants = new Constants();

            //initializing the dockManager class
            dockingManager = new DockManager();

            dockingManager.DockBorder = 20;
            dockingManager.DockPadding.Bottom = 2;
            dockingManager.DockPadding.Left = 2;
            dockingManager.DockPadding.Right = 2;
            dockingManager.DockPadding.Top = 24;
            dockingManager.DockType = DockDotNET.DockContainerType.Document;
            dockingManager.ShowIcons = true;
            dockingManager.SplitterWidth = 4;
            dockingManager.TabIndex = 0;
            dockingManager.Size = new System.Drawing.Size(500, 300);

            //adjusting the location of the dockingManager according to
            //the preset Contants
            dockingManager.Location =
                new System.Drawing.Point(0, 2 * constants.StripWidth);

            Controls.Add(dockingManager);

            //docking the archive
            dockingManager.AddForm(archiveContent);
            AddOwnedForm(archiveContent); //required process by the DockDotNET
            dockingManager.DockWindow(archiveContent, DockStyle.Left);

            //docking the view
            foreach (DockWindow viewContent in viewContents)
            {
                dockingManager.AddForm(viewContent);
                AddOwnedForm(viewContent); //required process by the DockDotNET
                dockingManager.DockWindow(viewContent, DockStyle.Fill);
            }

            //docking the property grid
            dockingManager.AddForm(propertyGridContent);
            AddOwnedForm(propertyGridContent);
            dockingManager.DockWindow(propertyGridContent, DockStyle.Right);

            //docking the user note
            dockingManager.AddForm(userNoteContent);
            AddOwnedForm(userNoteContent);
            DockContainer cont = propertyGridContent.HostContainer;
            cont.DockWindow(userNoteContent, DockStyle.Bottom);

            //docking the context help
            dockingManager.AddForm(contextHelpContent);
            AddOwnedForm(contextHelpContent);
            cont = userNoteContent.HostContainer;
            cont.DockWindow(contextHelpContent, DockStyle.Fill);

            //docking the newBox
            dockingManager.AddForm(newBoxContent);
            AddOwnedForm(newBoxContent);
            cont = archiveContent.HostContainer;
            cont.DockWindow(newBoxContent, DockStyle.Bottom);
        }