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; } }
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; } }
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(); }); }
public FileExplorer(string name, RootFolderType type) { Type = type; Name = name; }