public void ClearAll() //call when Catalog is closed { resultsPanel.Clear(); keywordsListView.VirtualListSize = 0; indexCache.Clear(); _helpKeywords = null; }
/// <summary> /// Compare our current children (presumably just read from the repo) with the current state of the file system and adjust for any changes /// ***Currently does not contain logic to maintain items that are unavailable in the file system*** /// </summary> /// <param name="progress">The progress.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <param name="recursive">if set to <c>true</c> [recursive].</param> /// <param name="forceRefreshMetadata">if set to <c>true</c> [force refresh metadata].</param> /// <returns>Task.</returns> protected override Task ValidateChildrenInternal(IProgress <double> progress, CancellationToken cancellationToken, bool?recursive = null, bool forceRefreshMetadata = false) { //we don't directly validate our children //but we do need to clear out the index cache... if (IndexCache != null) { IndexCache.Clear(); } ResetDynamicChildren(); return(NullTaskResult); }
// -------------------------------------------------------------------------------------------------- // Open/Close Catalog // -------------------------------------------------------------------------------------------------- private void CloseCatalog() { try { if (_catalog.IsOpen) { _catalog.Close(); } } finally { this.Text = formTitle; CheckCatalogMnu(-1); webBrowser1.Navigate("about:blank"); //Clear browser richTextBoxCodeView.Text = ""; indexListView.VirtualListSize = 0; //Clear Index & cache indexCache.Clear(); resultsListView.Items.Clear(); searchListView.VirtualListSize = 0; //Clear Search SearchInit(); tocPanel.HelpCatalog = _catalog; //Clear TOC MsxhelpProtocol.UserTopicText = ""; } }