async Task CreateFolderCategory(RootFolderType type)
 {
     var category = new GroupItemList <FileExplorer>()
     {
         Key = type
     };
     await DispatchHelper.InvokeAsync(CoreDispatcherPriority.Normal, () => FileExplorersGrouped.Add(category));
 }
 public LocalFileExplorerViewModel(StorageFolder root, RootFolderType ftype, string id = null)
     : base(root.DisplayName, ftype)
 {
     BackStack.Add(new VLCStorageFolder(root));
     if (id != null)
     {
         Id = id;
     }
 }
示例#3
0
        public VLCFileExplorerViewModel(Media media, RootFolderType ftype)
            : base(media.meta(MediaMeta.Title), ftype)
        {
            BackStack.Add(new VLCStorageFolder(media));
            var mrl       = media.mrl();
            var schemeEnd = mrl.IndexOf("://");

            if (schemeEnd > -1)
            {
                var scheme = mrl.Substring(0, schemeEnd);
                base.RootMediaType = scheme;
            }
        }
示例#4
0
        public VLCFileExplorerViewModel(Media media, RootFolderType ftype)
            : base(media.meta(MediaMeta.Title), ftype)
        {
            BackStack.Add(new VLCStorageFolder(media));
            Task.Run(async() =>
            {
                var url         = await Locator.VLCService.GetArtworkUrl(media, false);
                base.ArtworkUrl = url;
            });

            var mrl       = media.mrl();
            var schemeEnd = mrl.IndexOf("://");

            if (schemeEnd > -1)
            {
                var scheme = mrl.Substring(0, schemeEnd);
                base.RootMediaType = scheme;
            }
        }
 async Task CleanAllFromType(RootFolderType type)
 {
     var key = FileExplorersGrouped.FirstOrDefault(x => (RootFolderType)x.Key == type);
     await DispatchHelper.InvokeAsync(CoreDispatcherPriority.Normal, () => { key.Clear(); });
 }
示例#6
0
 public FileExplorer(string name, RootFolderType type)
 {
     Type = type;
     Name = name;
 }