Exemplo n.º 1
0
 private async void LoginOnLoginStateChanged(object sender, bool b)
 {
     if (b && Login.IsEnabled && !Bookmarks.Any())
     {
         await LoadBookmarks();
     }
 }
Exemplo n.º 2
0
 void Command_Edit_Bookmarks_NextPreviousBookmark(bool next, bool selecting)
 {
     if (!Bookmarks.Any())
     {
         return;
     }
     SetSelections(Selections.AsParallel().AsOrdered().Select(range => GetNextPrevBookmark(range, next, selecting)).ToList());
 }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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");
        }
Exemplo n.º 5
0
 public bool HasRouteInBookmarks(int routeId)
 {
     return(Bookmarks.Any(x => x.RouteId == routeId));
 }