Ejemplo n.º 1
0
        private void DockSavingLoading_Mainform_Load(object sendr, EventArgs e)
        {
            //Setup DockPanelSuite theme.
            //Has to be here so its applied before anything.
            VS2015LightTheme theme = new VS2015LightTheme();

            MainDock.Theme = theme;

            try
            {
                _mDeserlise = GetContentFromPersistString;
                try
                {
                    if (File.Exists(ApplicationFiles + "/configs/docksInfo.xml"))
                    {
                        MainDock.LoadFromXml(ApplicationFiles + "/configs/docksInfo.xml", _mDeserlise);
                    }
                }
                catch (Exception)
                {
                    //None.
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(Convert.ToString("Error Loading Docks: " + "\r\n" + ex.Message));
            }
        }
Ejemplo n.º 2
0
        private void SetupDockSize()
        {
            DockPanelState State = MainDock.GetDockPanelState();

            State.Regions.Add(new DockRegionState(DarkDockArea.Document));
            State.Regions.Add(new DockRegionState(DarkDockArea.Left, new Size(492, 811)));
            State.Regions.Add(new DockRegionState(DarkDockArea.Right, new Size(200, 100)));
            State.Regions.Add(new DockRegionState(DarkDockArea.Bottom, new Size(1040, 270)));
        }
Ejemplo n.º 3
0
 private void SetWindowButtons()
 {
     //Button_ConsoleWindow.Checked = MainDock.ContainsContent(_ConsoleWindow);
     //Button_RegisterWindow.Checked = MainDock.ContainsContent(_RegisterWindow);
     //Button_ProcessWatchpointsWindow.Checked = MainDock.ContainsContent(_WatchpointWindow);
     //Button_ProcessBreakpointWindow.Checked = MainDock.ContainsContent(_BreakpointWindow);
     //Button_ProcessInfoWindow.Checked = MainDock.ContainsContent(_ProcessInfoWindow);
     Button_ScratchWindow.Checked = MainDock.ContainsContent(ScratchPadWindow);
     //Button_ProcessCallStackWindow.Checked = MainDock.ContainsContent(_CallStackWindow);
 }
Ejemplo n.º 4
0
        private void GenerateLayout()
        {
            MainDock.BringToFront();
            MainDock.DockRightPortion = 310;
            MainDock.DockLeftPortion  = 310;
            String LibPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "/Engineer/";

            this._GameW      = new GameWindow(this._Interface);
            this._World      = new GlobalAssets(this._Interface);
            this._Library    = new ContentLibrary(_Interface, LibPath + "Library");
            this._Scene      = new SceneWindow(_Interface, _Properties);
            this._Properties = new PropertiesWindow(_Interface, MainDock, OpenForms);
            this._View       = new ViewWindow(_Interface);
        }
Ejemplo n.º 5
0
        private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            //Save all open docs and the current pos
            string data = "";

            foreach (var doc in MainDock.Documents)
            {
                Scintilla editor = (doc.DockHandler.Form as EditorDock)?.Editor;
                if (editor != null)
                {
                    data += editor.Tag + "|" + editor.CurrentPosition + '\n';
                }
            }
            CurrentProject.LastOpenFiles = data;
            CurrentProject.SaveInfo();
            MainDock.SaveAsXml(ApplicationFiles + "/configs/docksInfo.xml");
        }
Ejemplo n.º 6
0
        void CloseAllWindows()
        {
            SetWindowButtons();

            foreach (DarkDockContent Content in MainDock.GetContent(DarkDockArea.Document))
            {
                MainDock.RemoveContent(Content);
            }

            foreach (DarkDockContent Content in MainDock.GetContent(DarkDockArea.Left))
            {
                MainDock.RemoveContent(Content);
            }

            foreach (DarkDockContent Content in MainDock.GetContent(DarkDockArea.Bottom))
            {
                MainDock.RemoveContent(Content);
            }

            //foreach (var toolWindow in _toolWindows)
            //    MainDock.RemoveContent(toolWindow);
        }
Ejemplo n.º 7
0
        private void AddBottomcontent(DarkToolWindow toolWindow)
        {
            DarkDockGroup          Group         = null;
            List <DarkDockContent> BottomContent = MainDock.GetContent(DarkDockArea.Bottom);

            foreach (DarkDockContent Content in BottomContent)
            {
                if ((Content != null))
                {
                    Group = Content.DockGroup;
                    break;
                }
            }

            if (Group != null)
            {
                MainDock.AddContent(toolWindow, Group);
            }
            else
            {
                MainDock.AddContent(toolWindow);
            }
        }
Ejemplo n.º 8
0
 bool AnyWindowsOpen()
 {
     return((MainDock.GetContent(DarkDockArea.Document).Count > 0) || (MainDock.GetContent(DarkDockArea.Left).Count > 0) || (MainDock.GetContent(DarkDockArea.Bottom).Count > 0));
 }