コード例 #1
0
        public override async Task DeleteSelectedFile(Thumbnail item)
        {
            var cds = UpnpDevice.Services[URN.ContentDirectory];

            await DeleteDlnaContentAsync(cds, (item.Source as DlnaContentInfo)?.Id);

            ContentsCollection.Remove(item);
        }
コード例 #2
0
        public override Task DeleteSelectedFiles(IEnumerable <Thumbnail> items)
        {
            foreach (var item in items)
            {
                ContentsCollection.Remove(item);
            }

            return(Task.Delay(1000));
        }
コード例 #3
0
        public override async Task DeleteSelectedFile(Thumbnail item)
        {
            var data     = item.Source as RemoteApiContentInfo;
            var contents = new TargetContents();

            contents.ContentUris = new List <string>();
            contents.ContentUris.Add(data.Uri);

            await DeleteRemoteApiContents(contents);

            ContentsCollection.Remove(item);
        }
コード例 #4
0
        public override async Task DeleteSelectedFiles(IEnumerable <Thumbnail> items)
        {
            var uris = items
                       .Select(item => item.Source as RemoteApiContentInfo)
                       .Where(info => info != null)
                       .Select(info => info.Uri).ToList();

            await DeleteRemoteApiContents(new TargetContents { ContentUris = uris });

            foreach (var item in items)
            {
                ContentsCollection.Remove(item);
            }
        }
コード例 #5
0
        private async Task TryDeleteLocalFile(Thumbnail data)
        {
            try
            {
                DebugUtil.Log(() => "Delete " + data.CacheFile?.DisplayName);
                await data.CacheFile?.DeleteAsync();

                ContentsCollection.Remove(data);
            }
            catch (Exception ex)
            {
                DebugUtil.Log(() => "Failed to delete file: " + ex.StackTrace);
            }
        }
コード例 #6
0
        public override async Task DeleteSelectedFiles(IEnumerable <Thumbnail> items)
        {
            DebugUtil.Log("DeleteSelectedImages");

            var dlna = items
                       .Select(item => item.Source as DlnaContentInfo)
                       .Where(info => info != null)
                       .Select(info => info.Id).ToList();

            await DeleteDlnaContentsAsync(dlna);

            foreach (var item in items)
            {
                ContentsCollection.Remove(item);
            }
        }
コード例 #7
0
        public override Task DeleteSelectedFile(Thumbnail item)
        {
            ContentsCollection.Remove(item);

            return(Task.Delay(100));
        }