Example #1
0
        /// <summary>
        /// Updates the caption text, depending on the currently selected dock window.
        /// </summary>
        protected void UpdateCaptionText()
        {
            TabPanel selected = this.SelectedTab;

            if (selected != null && this.captionText != null)
            {
                ToolWindow window = selected as ToolWindow;
                if (window != null && !string.IsNullOrEmpty(window.Caption))
                {
                    this.captionText.Text = window.Caption;
                }
                else
                {
                    this.captionText.Text = selected.Text;
                }
            }
        }
Example #2
0
        internal void RemovePlaceHolders()
        {
            foreach (DockWindowPlaceholder holder in ControlHelper.GetChildControls <DockWindowPlaceholder>(this.dockContainer, true))
            {
                DockTabStrip parent = holder.DockTabStrip;
                Debug.Assert(parent != null, "Invalid parent for a DockWindowPlaceHolder");
                if (parent == null)
                {
                    continue;
                }

                int index = parent.TabPanels.IndexOf(holder);

                ToolWindow actualWindow = new ToolWindow(holder.DockWindowText);
                actualWindow.Name = holder.DockWindowName;

                holder.Dispose();

                parent.TabPanels.Insert(index, actualWindow);
            }
        }
Example #3
0
        private void CreateVisualStyleBuilderMocks()
        {
            this.settings             = new QuickNavigatorSettings();
            this.settings.ShowPreview = false;
            this.dockWindows          = new SortedList <string, DockWindow>(5);

            //add 5 tool windows
            for (int i = 1; i < 6; i++)
            {
                ToolWindow tool = new ToolWindow("Tool Window " + i);
                this.dockWindows.Add(tool.Text, tool);
            }

            //add 5 document windows
            for (int i = 1; i < 6; i++)
            {
                DocumentWindow doc = new DocumentWindow("Document Window " + i);
                this.dockWindows.Add(doc.Text, doc);
            }

            this.activeWindow = this.dockWindows.Values[0];
        }