コード例 #1
0
        public void InitializeViewModels()
        {
            HomeViewModel            = new HomeViewModel(this);
            CurrentViewModel         = HomeViewModel;
            AllPlaylistsViewModel    = new AllPlaylistsViewModel(this);
            MyQueueViewModel         = new MyQueueViewModel(this);
            MyQueueScreenToViewModel = (MyQueueViewModel)MyQueueViewModel;

            Navigation.CurrentViewModel = CurrentViewModel; //Sets the CurrentViewModel to the Navigation class
        }
コード例 #2
0
        // gets called when you want to delete a playlist
        public PopUpWindowViewModel(AllPlaylistsViewModel viewModel, int playlistID)
        {
            ButtonContent  = "Delete playlist";
            TextMessage    = "Are you sure you want to delete this playlist?";
            Title          = "Delete playlist";
            OkButtonWidth  = 110;
            OkButtonHeight = 30;

            AllPlaylistViewModel = viewModel;
            OnOkayCommand        = new RelayCommand <object>(DeletePlaylistOnAllPlaylistsClick);
            PlaylistID           = playlistID;
        }
コード例 #3
0
        // gets called when you want to add a new playlist
        public PopUpWindowViewModel(AllPlaylistsViewModel viewModel, MainWindowViewModel mainWindow)
        {
            TextBoxHeight  = 25;
            ButtonContent  = "Add playlist";
            TextMessage    = "Give the new playlist a name:";
            Title          = "Add playlist";
            OkButtonWidth  = 110;
            OkButtonHeight = 30;

            OnOkayCommand        = new RelayCommand <object>(AddNewPlaylistClick);
            AllPlaylistViewModel = viewModel;
            MainWindow           = mainWindow;
        }