public static PlaylistsPage GetInstance() { if (instance == null) { instance = new PlaylistsPage(); } return(instance); }
private void AddToFavs_Click(object sender, RoutedEventArgs e) { if (_currentAudio == null) { addToFavs.IsChecked = false; } else if (PlaylistLibrary.CurrentPlaylist == null) { addToFavs.IsChecked = false; MainFrame.Content = PlaylistsPage.GetInstance(); } else { if (addToFavs.IsChecked == false) { PlaylistLibrary.CurrentPlaylist.RemoveTrack(_currentAudio); } else { PlaylistLibrary.CurrentPlaylist.AddTrack(_currentAudio); } } }
private void Window_Closed(object sender, EventArgs e) { PlaylistsPage.GetInstance().ClosePlaylistAdd(); SystemState.Serialize(); PlaylistLibrary.Serialize(); }
private void Button_ClickToPlaylists(object sender, RoutedEventArgs e) { MainFrame.Content = PlaylistsPage.GetInstance(); }
private void Window_Closed(object sender, System.EventArgs e) { PlaylistsPage.GetInstance().PlaylistAddClosed(); }