static void Main(string[] args) { /* * MUSIC */ Mp3Tag.InitTags(); Mp3Tag MusicTag = new Mp3Tag("../../audio.mp3"); Mp3Tag MusicTag2 = new Mp3Tag("../../audio3.mp3"); if (MusicTag.ReadData()) { PrintInfo(MusicTag); } if (MusicTag2.ReadData()) { PrintInfo(MusicTag2); } /* * PICTURE */ JPGTag PicTag = new JPGTag("../../picture.jpg"); JPGTag PicTag2 = new JPGTag("../../lol.jpg"); if (PicTag.ReadData()) { PrintInfo(PicTag); } if (PicTag.ReadData()) { PrintInfo(PicTag2); } }
static private void PrintInfo(JPGTag tag) { Console.WriteLine("========= Picture ========="); Console.WriteLine("Width: " + tag.ImageWidth); Console.WriteLine("Height: " + tag.ImageHeight); Console.WriteLine("Artist: " + tag.ImageArtist); Console.WriteLine("Title: " + tag.ImageTitle); Console.WriteLine("Copyright: " + tag.Copyright); Console.WriteLine("Date: " + tag.ImageDate); }
static void Main(string[] args) { /* * MUSIC */ Mp3Tag.InitTags(); Mp3Tag MusicTag = new Mp3Tag("../../audio.mp3"); Mp3Tag MusicTag2 = new Mp3Tag("../../audio3.mp3"); if (MusicTag.ReadData()) PrintInfo(MusicTag); if (MusicTag2.ReadData()) PrintInfo(MusicTag2); /* * PICTURE */ JPGTag PicTag = new JPGTag("../../picture.jpg"); JPGTag PicTag2 = new JPGTag("../../lol.jpg"); if (PicTag.ReadData()) PrintInfo(PicTag); if (PicTag.ReadData()) PrintInfo(PicTag2); }