Exemplo n.º 1
0
        /// <summary>
        /// Shows or sets the focus to the Properties Window dock, depending on its current state.
        /// </summary>
        private void ShowPropertiesWindow()
        {
            if (propertiesWindow != null)
            {
                propertiesWindow.Show();
                return;
            }

            propertiesWindow = new PropertiesWindow();

            if (projectExplorer != null)
            {
                if (projectExplorer.DockState == DockState.DockRight)
                {
                    propertiesWindow.Show(projectExplorer.Pane, DockAlignment.Bottom, 0.5);
                    return;
                }
            }

            propertiesWindow.Show(dockPanel, DockState.DockRight);
        }
Exemplo n.º 2
0
        private void dockPanel_ContentRemoved(object sender, DockContentEventArgs e)
        {
            if (e.Content.GetType() == typeof(ProjectExplorer))
            {
                projectExplorer = null;
            }
            else if (e.Content.GetType() == typeof(PropertiesWindow))
            {
                propertiesWindow = null;
            }
            else if (e.Content.GetType() == typeof(CodeEditor))
            {
                CodeEditor codeEditor = (CodeEditor)e.Content;

                if (codeEditor.EditorFile != "Untitled")
                {
                    editorDictionary.Remove(codeEditor.EditorFile.ToLower());
                }
            }
        }