//Constructor to set the Add Playlist functionality public PopUpWindowViewModel(PlaylistViewModel viewModel) { ButtonContent = "Change name"; TextMessage = "What name do you want to give the playlist"; Title = "Change playlist name"; TextBoxHeight = 40; OkButtonWidth = 110; OkButtonHeight = 35; PlayListViewModel = viewModel; PlaylistID = viewModel.PlaylistController.Playlist.TrackListID; OnOkayCommand = new RelayCommand <object>(ChangePlaylistNameClick); }
//Constructor to set the Delete Playlist functionality public PopUpWindowViewModel(PlaylistViewModel viewModel, Playlist playlist, MainWindowViewModel mainwindow) // used when deleting a playlist from the inside of the playlist { ButtonContent = "Delete this playlist"; Title = "Delete playlist"; TextMessage = "Are you sure you want to delete this playlist?"; PlayListViewModel = viewModel; Playlist = playlist; MainWindow = mainwindow; PlaylistID = viewModel.PlaylistController.Playlist.TrackListID; OkButtonWidth = 140; OkButtonHeight = 30; OnOkayCommand = new RelayCommand <object>(DeleteThisPlaylistClick); }
} // album image property #endregion public MainWindowViewModel(Login loggedInUser) { User = loggedInUser; PlayQueue = PlayQueueController.PQ; AllPlaylistsController = new AllPlaylistsController(User.User.ConsumerID); InitializeCommands(); InitializeViewModels(); Navigation.InitializeViewModelNavigation(); Navigation.ViewModelChanged += ChangeViewModel; InitializeCurrentTrackElement(); TestTrackMethod(); PlaylistViewModel = new PlaylistViewModel(this, PlaylistController.Playlist); }