public async void OpenFile(Downloads download) { try { StorageFile file = await StorageFile.GetFileFromPathAsync(download.Path); await Launcher.LaunchFileAsync(file); } catch (Exception ex) { MessageDialog m = new MessageDialog("The file may be move or deleted.", "File not found"); Debug.WriteLine("exception" + ex.ToString()); await m.ShowAsync(); } }
private async void OpenFolder(Downloads download) { try { StorageFile file = await StorageFile.GetFileFromPathAsync(download.Path); StorageFolder folder = await file.GetParentAsync(); await Launcher.LaunchFolderAsync(folder); } catch (Exception ex) { MessageDialog m = new MessageDialog("Folder Not Found"); await m.ShowAsync(); } }