コード例 #1
0
 private bool CanRemoveAlbumHistory(object obj)
 {
     if (ActiveTracks == null ||
         ActiveTracks.Count == 0 ||
         SelectedAlbum == null ||
         SelectedAlbum.ID != ActiveTracks.First().AlbumID)
     {
         return(false);
     }
     return(true);
 }
コード例 #2
0
 private bool CanMarkAlbumListened(object obj)
 {
     if (ActiveTracks == null ||
         ActiveTracks.Count == 0 ||
         SelectedAlbum == null ||
         SelectedAlbum.ID != ActiveTracks.First().AlbumID)
     {
         return(false);
     }
     return(true);
 }
コード例 #3
0
        private void AddCustomTrack(object obj)
        {
            var dialog = new TextBoxWindow();

            if (dialog.ShowDialog() == true)
            {
                var track = new CustomTrack()
                {
                    Name    = dialog.ResponseText,
                    TrackNo = _musicLog.GetTracks(SelectedAlbum.Album).Count() + 1
                };

                _musicLog.AddTrack(track, SelectedAlbum.Album);
                ActiveTracks.Add(new CustomTrackViewModel(track));
            }
        }