3
// GNOME Do is the legal property of its developers, whose names are too numerous
4
// to list here. Please refer to the COPYRIGHT file distributed with this
5
// source distribution.
7
// This program is free software: you can redistribute it and/or modify
8
// it under the terms of the GNU General Public License as published by
9
// the Free Software Foundation, either version 3 of the License, or
10
// (at your option) any later version.
12
// This program is distributed in the hope that it will be useful,
13
// but WITHOUT ANY WARRANTY; without even the implied warranty of
14
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
// GNU General Public License for more details.
17
// You should have received a copy of the GNU General Public License
18
// along with this program. If not, see <http://www.gnu.org/licenses/>.
21
using System.Collections.Generic;
28
public abstract class MusicItem : Item
30
protected string name, artist, year, cover;
36
public MusicItem (string name, string artist, string year, string cover):
45
public override string Name { get { return name; } }
46
public override string Description { get { return artist; } }
47
public override string Icon { get { return Cover ?? "gtk-cdrom"; } }
49
public virtual string Artist { get { return artist; } }
50
public virtual string Year { get { return year; } }
51
public virtual string Cover { get { return cover; } }
55
public class AlbumMusicItem : MusicItem
57
public AlbumMusicItem (string name, string artist, string year, string cover):
58
base (name, artist, year, cover)
63
public class ArtistMusicItem : MusicItem
65
public ArtistMusicItem (string artist, string cover):
68
this.artist = this.name = artist;
72
public override string Description
75
return string.Format ("All music by {0}", artist);
80
public class SongMusicItem : MusicItem
85
public SongMusicItem (string name, string artist, string album, string cover, string file, int number):
86
base (name, artist, "", cover)
93
public override string Icon { get { return "gnome-mime-audio"; } }
94
public override string Description
97
return string.Format ("{0} - {1}", artist, album);
100
public virtual string Album { get { return album; } }
101
public virtual string File { get { return file; } }
102
public virtual int Number { get {return number; } }