Ejemplo n.º 1
0
 protected void NavigateToInfo(MediaToolItem filePath)
 {
     if (filePath != null)
     {
         NavigationProvider.Navigate(NavigationSource.InfoPage, filePath);
     }
 }
Ejemplo n.º 2
0
        protected virtual async void ItemClickExecute(MediaToolItem item)
        {
            if (item != null && !item.IsEmpty)
            {
                await RecentProvider.Instance.AddToRecentAsync(item);

                this.NavigateToInfo(item);
            }
        }
Ejemplo n.º 3
0
        public async Task DeleteFromRecentAsync(MediaToolItem item)
        {
            var items = await this.GetRecentFilesAsync();

            if (item != null && items.Count > 0)
            {
                items.Remove(item);
            }
            this.recentItems = items;
            await this.WriteToFileAsync();
        }
Ejemplo n.º 4
0
        public async Task DeleteFromFavoriteAsync(MediaToolItem item)
        {
            var items = await this.GetFavoriteFilesAsync();

            if (item != null && items.Count > 0)
            {
                items.Remove(item);
            }
            this.favoriteItems = items;
            await this.WriteToFileAsync();
        }
Ejemplo n.º 5
0
        public async Task AddToRecentAsync(MediaToolItem item)
        {
            var items = await this.GetRecentFilesAsync();

            var file = items.FirstOrDefault(x => x.FilePath == item.FilePath);

            if (file == null)
            {
                this.recentItems.Add(item);
                await this.WriteToFileAsync();
            }
        }
Ejemplo n.º 6
0
        protected override async void ItemClickExecute(MediaToolItem item)
        {
            if (item != null && item.IsEmpty)
            {
                this.AddFilesExecuteAsync();
            }
            else
            {
                await RecentProvider.Instance.AddToRecentAsync(item);

                this.NavigateToInfo(item);
            }
        }