private void ItemCollect_Click(object sender, System.Windows.RoutedEventArgs e) { if (ResultList.SelectedItem == null) { return; } var ok = (BeatmapDataModel)ResultList.SelectedItem; var page = new DiffSelectPage(ParentWindow, App.Beatmaps.GetBeatmapsetsByFolder(ok.GetIdentity().FolderName)); page.Callback = () => { ParentWindow.FramePop.Navigate(new SelectCollectionPage(ParentWindow, App.Beatmaps.GetBeatmapsetsByFolder(page.SelectedMap.FolderName) .FirstOrDefault(k => k.Version == page.SelectedMap.Version))); }; ParentWindow.FramePop.Navigate(page); }
private void ItemPlay_Click(object sender, System.Windows.RoutedEventArgs e) { if (ResultList.SelectedItem == null) { return; } var ok = (BeatmapDataModel)ResultList.SelectedItem; var page = new DiffSelectPage(ParentWindow, App.Beatmaps.GetBeatmapsetsByFolder(ok.GetIdentity().FolderName)); page.Callback = async() => { await ParentWindow.PlayNewFile(Path.Combine(Domain.OsuSongPath, page.SelectedMap.FolderName, page.SelectedMap.BeatmapFileName)); App.PlayerList.RefreshPlayList(PlayerList.FreshType.All, PlayListMode.RecentList); ParentWindow.FramePop.Navigate(null); }; ParentWindow.FramePop.Navigate(page); }