예제 #1
0
        public UserControlGenres(MainWindow mainWindow)
        {
            InitializeComponent();
            _mainWindow = mainWindow;

            var genres = _connectionManager.GetDataTable(CommandFactory.GetGenres());

            DataGridGenres.ItemsSource = genres.DefaultView;
        }
        public UserControlUploadGenre(MainWindow mainWindow, int genreId)
            : this(mainWindow)
        {
            _genreId = genreId;

            LabelHeaderTitle.Content = "Edit genre";
            ButtonAddGenre.Content = "Save";
            IsEditMode = true;
        }
        public UserControlUploadSong(MainWindow mainWindow, int songId)
            : this(mainWindow)
        {
            _songId = songId;

            LabelHeaderTitle.Content = "Edit song";
            ButtonAddSong.Content = "Save";
            IsEditMode = true;
        }
예제 #4
0
        public UserControlAlbums(MainWindow mainWindow)
        {
            InitializeComponent();
            _mainWindow = mainWindow;

            var albums = _connectionManager.GetDataTable(CommandFactory.GetAlbums());

            DataGridAlbums.ItemsSource = albums.DefaultView;
        }
        public UserControlUploadAlbum(MainWindow mainWindow, int albumId)
            : this(mainWindow)
        {
            _albumId = albumId;

            LabelHeaderTitle.Content = "Edit album";
            ButtonAddAlbum.Content = "Save";
            IsEditMode = true;
        }
        public UserControlCreatePlaylist(MainWindow mainWindow)
        {
            InitializeComponent();
            _mainWindow = mainWindow;

            var songs = _connectionManager.GetDataTable(CommandFactory.GetSongs());

            DataGridSongs.ItemsSource = songs.DefaultView;

            InitializeComponent();
        }
예제 #7
0
        public UserControlSongs(MainWindow mainWindow)
        {
            InitializeComponent();
            _mainWindow = mainWindow;

            var songs = _connectionManager.GetDataTable(CommandFactory.GetSongs());

            DataGridSongs.ItemsSource = songs.DefaultView;
            DataGridSongs.SelectedIndex = -1;

            MarkCurrentSong();
        }
        public UserControlPlaylists(MainWindow mainWindow, int playlistId)
        {
            InitializeComponent();

            _mainWindow = mainWindow;
            _playlistId = playlistId;

            var information = _connectionManager.GetDataTable(CommandFactory.GetPlaylistInformation(playlistId)).Rows[0];

            LabelHeaderTitle.Content = "Playlist " + information["name"];
            LabelPlaylistDescription.Content = "Description: " + information["description"];

            var songs = _connectionManager.GetDataTable(CommandFactory.GetSongsForPlaylist(playlistId));

            DataGridSongs.ItemsSource = songs.DefaultView;
        }
 public UserControlUploadGenre(MainWindow mainWindow)
 {
     _mainWindow = mainWindow;
     InitializeComponent();
 }
 public UserControlUploadSong(MainWindow mainWindow)
 {
     InitializeComponent();
     _mainWindow = mainWindow;
 }
 public UserControlUploadAlbum(MainWindow mainWindow)
 {
     _mainWindow = mainWindow;
     InitializeComponent();
     TextBoxName.Focus();
 }
예제 #12
0
 public UserControlSongs(MainWindow mainWindow, int song_id)
     : this(mainWindow)
 {
     _recentlyAddedSong = song_id;
 }