private async void LoginOnLoginStateChanged(object sender, bool b) { if (b && Login.IsEnabled && !Bookmarks.Any()) { await LoadBookmarks(); } }
void Command_Edit_Bookmarks_NextPreviousBookmark(bool next, bool selecting) { if (!Bookmarks.Any()) { return; } SetSelections(Selections.AsParallel().AsOrdered().Select(range => GetNextPrevBookmark(range, next, selecting)).ToList()); }
private void GotoPreviousBookMark() { var pos = videoPlayer.GetPosition(); if (!Bookmarks.Any(t => t < pos)) { return; } TimeSpan bookmark = Bookmarks.FindLast(t => t < pos); lstBookmarks.SelectedItem = bookmark; videoPlayer.SetPosition(bookmark); }
public async Task BookmarksSearch(string filter) { IsBusy = true; IEnumerable <Bookmark> bookmarks = await bookmarkService.Search(filter); while (Bookmarks.Any()) { Bookmarks.RemoveAt(Bookmarks.Count - 1); } foreach (Bookmark f in bookmarks) { Bookmarks.Add(f); } IsBusy = false; OnPropertyChanged("SelectedMenuItem"); OnPropertyChanged("Bookmarks"); }
public bool HasRouteInBookmarks(int routeId) { return(Bookmarks.Any(x => x.RouteId == routeId)); }