private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { var image = e.AddedItems[0] as ComboBoxItem; string currentOperation = image.Content.ToString(); var ttp = sender as ComboBox; Playlists playlists = null; if (image != null && ttp.Tag is Playlists) { playlists = (Playlists)ttp.Tag; } if (playlists != null) { Create_Playlist create_Playlist = new Create_Playlist(); Global_Log.pID = playlists.PID; Global_Log.playlistName = playlists.Name; if (currentOperation == "Update") { create_Playlist.SetProperty(playlists.Name.ToString()); } else if (currentOperation == "Delete") { create_Playlist.deletePlaylist(playlists.PID); } else if (currentOperation == "View") { currentPlaylist = playlists.PID; loadPlaylistSong(playlists.SortId, Global_Log.pID); } else if (currentOperation == "Schedule") { currentPlaylist = playlists.PID; Schedular schedular = new Schedular(); schedular.ShowDialog(); //loadPlaylistSong(Global_Log.pID, playlists.SortId); } } loadPlaylist(); }