private async void Search(object param) { m_searchResults.Clear(); m_searchContext = null; IsFavouritesMode = false; Searching = true; m_filteredResults.SortDescriptions.Clear(); m_filteredResults.Refresh(); try { ActionsCount++; AllDataSheetSearchResult result = await AllDataSheetPart.SearchAsync(m_searchField); m_searchContext = result.SearchContext; AddResults(result.Parts); } catch { Global.MessageBox(this, Global.GetStringResource("StringSearchError"), MessageBoxExPredefinedButtons.Ok); } finally { ActionsCount--; } Searching = false; }
private async void LoadMoreResults(object param) { Searching = true; try { ActionsCount++; AllDataSheetSearchResult result = await AllDataSheetPart.SearchAsync(m_searchContext); m_searchContext = result.SearchContext; AddResults(result.Parts); } catch { Global.MessageBox(this, Global.GetStringResource("StringSearchError"), MessageBoxExPredefinedButtons.Ok); } finally { ActionsCount--; } Searching = false; }