private async Task PerformSearch(string query) { IImmutableList <SearchItem> searchResults = await TimeEditWrapper.Search(query, 1); IList searchList = searchResults.Select(x => $"{x.Name} ({x.Id})").ToList(); Application.MainLoop.Invoke(() => { searchItems = searchResults; resultsView.SetSource(searchList); resultsFrame.Title = reulstsTitle + " - " + query; resultsView.FocusFirst(); }); }
private async Task DoFetch(int scheduleId) { Schedule schedule = await TimeEditWrapper.GetSchedule(scheduleId); Application.MainLoop.Invoke(() => { if (schedule.Entries.Count > 0) { this.schedule = schedule; IList <DateTime> dates = GetDates(); SelectDate(dates); dateListView.FocusFirst(); } else { this.schedule = null; ShowErrorBox("Could not find any schedule."); } }); }