private async void OnImportLyricsClick(Hyperlink sender, HyperlinkClickEventArgs args) { var picker = new FileOpenPicker(); picker.FileTypeFilter.Add(CommonSharedStrings.LrcFileSuffix); picker.FileTypeFilter.Add(CommonSharedStrings.TxtFileSuffix); picker.CommitButtonText = CommonSharedStrings.ManualSelectLyricButtonText; var lyricFile = await picker.PickSingleFileAsync(); if (lyricFile == null) { return; } var lrc = await LyricsAgent.ImportLyricsAsync( _vm.NowPlayingTitle, _vm.NowPlayingArtist, lyricFile); _vm.LrcMissing = lrc == null; LrcPresenter.Lyrics = lrc; }
public async Task <ParsedLrc> ImportAsync(StorageFile file) { return(await LyricsAgent.ImportLyricsAsync(_originalTitle, _originalArtist, file)); }