Example #1
0
        /// <summary>
        /// Open or show the entity references window
        /// </summary>
        /// <param name="sender">The sender of the event</param>
        /// <param name="e">The event arguments</param>
        private void miEntityReferences_Click(object sender, EventArgs e)
        {
            if(entityReferencesWindow == null)
            {
                entityReferencesWindow = new EntityReferenceWindow();
                entityReferencesWindow.CurrentProject = project;
                entityReferencesWindow.Show(dockPanel);
            }
            else
            {
                if(entityReferencesWindow.CurrentProject != project)
                    entityReferencesWindow.CurrentProject = project;

                entityReferencesWindow.Activate();
            }
        }
Example #2
0
        //=====================================================================

        /// <summary>
        /// Deserialize the state of a content pane.
        /// </summary>
        /// <param name="persistString">The name of the item being deserialized</param>
        /// <returns>The dock content if deserialized or null if not.</returns>
        private IDockContent DeserializeState(string persistString)
        {
            if(persistString == typeof(ProjectExplorerWindow).FullName)
                return projectExplorer;

            if(persistString == typeof(ProjectPropertiesWindow).FullName)
                return projectProperties;

            if(persistString == typeof(OutputWindow).FullName)
            {
                if(outputWindow == null)
                    outputWindow = new OutputWindow();

                return outputWindow;
            }

            if(persistString == typeof(EntityReferenceWindow).FullName)
            {
                if(entityReferencesWindow == null)
                {
                    entityReferencesWindow = new EntityReferenceWindow();
                    entityReferencesWindow.CurrentProject = project;
                }

                return entityReferencesWindow;
            }

            // Ignore the preview window
            if(persistString == typeof(PreviewTopicWindow).FullName)
                return null;

            string[] parsedStrings = persistString.Split(new char[] { ',' });

            if(projectExplorer == null || parsedStrings.Length != 2 || parsedStrings[1].Length == 0)
                return null;

            // Try for a built-in editor
            return projectExplorer.CreateFileEditor(parsedStrings[1], null);
        }
Example #3
0
        //=====================================================================
        /// <summary>
        /// Deserialize the state of a content pane.
        /// </summary>
        /// <param name="persistString">The name of the item being deserialized</param>
        /// <returns>The dock content if deserialized or null if not.</returns>
        private IDockContent DeserializeState(string persistString)
        {
            if(persistString == typeof(ProjectExplorerWindow).FullName)
                return projectExplorer;

            if(persistString == typeof(ProjectPropertiesWindow).FullName)
                return projectProperties;

            if(persistString == typeof(OutputWindow).FullName)
            {
                outputWindow = new OutputWindow();
                return outputWindow;
            }

            if(persistString == typeof(EntityReferenceWindow).FullName)
            {
                entityReferencesWindow = new EntityReferenceWindow(tsslStatusText);
                return entityReferencesWindow;
            }

            if(persistString == typeof(PreviewTopicWindow).FullName)
            {
                previewWindow = new PreviewTopicWindow();
                return previewWindow;
            }

            return null;
        }