public static void EnsureProperSearchComponent(IFolderSystem folderSystem)
        {
            Platform.CheckForNullReference(folderSystem, "folderSystem");

            // do nothing if there is no search component open
            if (ActiveSearchComponent == ActiveSearchComponentContext.None)
            {
                return;
            }

            // if the folder system does not support searching, do nothing (the search component shelf will be disabled)
            if (!folderSystem.AdvancedSearchEnabled)
            {
                return;
            }

            // close the open shelf and open the folder system's search component
            if (folderSystem.SearchComponentType != ActiveSearchComponent.Type)
            {
                ActiveSearchComponent.Close();
                folderSystem.LaunchSearchComponent();
            }
        }
Esempio n. 2
0
 void IFolderExplorerComponent.LaunchAdvancedSearchComponent()
 {
     _folderSystem.LaunchSearchComponent();
 }