Exemple #1
0
        /// <summary>
        /// Shows a special tab
        /// </summary>
        /// <param name="specialTab">The special tab to open</param>
        public void ShowSpecialTab(SpecialTab specialTab)
        {
            if (IsSpecialTabShown(specialTab))
                return;

            switch (specialTab.Type)
            {
                case TabType.ObjectBrowser:
                    ShowObjectBrowser();
                    break;
                case TabType.ProjectInfo:
                    ShowProjectInfo();
                    break;
            }
        }
Exemple #2
0
 /// <summary>
 /// Checks if a special tab is open, such as the Object Browser
 /// </summary>
 /// <param name="tab">The special tab to check</param>
 /// <returns>True if the tab is shown, otherwise false</returns>
 public bool IsSpecialTabShown(SpecialTab tab)
 {
     foreach (DockableWindow tp in Manager.Documents)
     {
         if (!IsSpecialTab(tp)) continue;
         if (((SpecialTab) tp.Tag).Type == tab.Type)
             return true;
     }
     return false;
 }