public void Register() { _folderChanged = SelectedFolderChanged; _fileRenamed = SelectedFolderRenamed; RegisterTypes(); IUIManager uiMgr = Core.UIManager; OptionsPaneCreator filePaneCreator = SetFoldersForm.SetFoldersFormCreator; uiMgr.RegisterOptionsGroup("Folders & Files", "The Folders & Files options enable you to control the indexing of folders and files."); uiMgr.RegisterOptionsPane("Folders & Files", "Indexed Folders", filePaneCreator, "The Indexed Folders options enable you to specify what folders on your computer should be indexed by [product name], or specifically excluded from indexing."); uiMgr.RegisterWizardPane("Indexed Folders", filePaneCreator, 0); uiMgr.RegisterOptionsPane("Folders & Files", "File Options", FileOptionsPane.FileOptionsPaneCreator, "The File Options enable you to control the indexing and display of hidden files, and to specify the extensions of files that [product name] should treat as plain text files."); uiMgr.RegisterResourceSelectPane(_folderResourceType, typeof(FileFoldersSelectorPane)); Core.TabManager.RegisterResourceTypeTab("Files", "Files", new[] { _folderResourceType }, _propParentFolder, 5); IResource filesRoot = FoldersCollection.Instance.FilesRoot; Image img = Utils.TryGetEmbeddedResourceImageFromAssembly(Assembly.GetExecutingAssembly(), "FilePlugin.Icons.Folders24.png"); _pane = Core.LeftSidebar.RegisterResourceStructureTreePane("FileFolders", "Files", "Indexed Folders", img, filesRoot); _pane.ParentProperty = _propParentFolder; _pane.AddNodeFilter(new FoldersFilter()); _pane.WorkspaceFilterTypes = new[] { _folderResourceType }; Core.ResourceTreeManager.SetResourceNodeSort(filesRoot, "DisplayName"); Core.LeftSidebar.RegisterViewPaneShortcut("FileFolders", Keys.Control | Keys.Alt | Keys.I); IPluginLoader loader = Core.PluginLoader; loader.RegisterStreamProvider(_folderResourceType, this); loader.RegisterResourceUIHandler(_folderResourceType, this); loader.RegisterResourceDragDropHandler(_folderResourceType, new DragDropLinkAdapter(this)); Core.UIManager.RegisterResourceLocationLink(_folderResourceType, 0, _folderResourceType); Core.ResourceIconManager.RegisterPropTypeIcon(_propParentFolder, LoadIconFromAssembly("file.ico")); Core.ResourceIconManager.RegisterResourceIconProvider(_folderResourceType, this); Core.ResourceBrowser.RegisterLinksPaneFilter("FileFolder", new FileFolderLinksFilter()); ((FileResourceManager)Core.FileResourceManager).RegisterFileTypeColumns(_folderResourceType); LoadResourceIcons(); _filesProcessor = new FileAsyncProcessor(); _filesProcessor.ThreadName = "Files AsyncProcessor"; Core.UIManager.RegisterIndicatorLight("Files Processor", _filesProcessor, 60, LoadIconFromAssembly("files_idle.ico"), LoadIconFromAssembly("files_busy.ico"), LoadIconFromAssembly("files_stuck.ico")); Core.ResourceStore.LinkAdded += ResourceStore_LinkAdded; Core.ResourceBrowser.ContentChanged += ResourceBrowser_ContentChanged; }
public void WaitUntilFinished() { if (Application.MessageLoop) { FileAsyncProcessor.MsgWaitForSingleObject(_enumSignal, System.Threading.Timeout.Infinite); } else { _enumSignal.WaitOne(); } }