Пример #1
0
        private static void SortAndShuffleExample()
        {
            var player = new PlayerInstance();

            Song currentPlayingSong = null;

            Song[] songs  = null;
            Album  album  = null;
            Artist artist = null;

            CreatePlayerItems(out songs, out artist, out album);
            player.Add(songs);

            Console.WriteLine("-- Playing Songs --");
            System.Threading.Thread.Sleep(3000);
            player.Play(out currentPlayingSong);

            Console.WriteLine("-- Suffle Songs --");
            System.Threading.Thread.Sleep(3000);
            player.Shuffle();
            player.Play(out currentPlayingSong);

            Console.WriteLine("-- Sort Songs --");
            System.Threading.Thread.Sleep(3000);
            player.SortByTitle();
            player.Play(out currentPlayingSong);
        }
Пример #2
0
        static void Main(string[] args)
        {
            var player = new PlayerInstance();

            player.Load(@"d:\Dropbox\HrueSpace\IT Academy\C#\Resources\mp3\");
            player.Play();

            Console.ReadLine();
        }
Пример #3
0
        private static void VolumeExample()
        {
            var player = new PlayerInstance();

            Console.WriteLine(player.Volume);

            player.Volume = 300;
            player.VolumeUp();
            player.VolumeUp();
            player.VolumeUp();

            player.VolumeChange(int.Parse(Console.ReadLine()));

            Console.WriteLine(player.Volume);
        }
Пример #4
0
        private static void ClassicUsagePlayerExample()
        {
            var player = new PlayerInstance();

            Song currentPlayingSong = null;

            Song[] songs  = null;
            Album  album  = null;
            Artist artist = null;

            CreatePlayerItems(out songs, out artist, out album);

            player.Add(songs);
            player.Play(out currentPlayingSong);
        }
Пример #5
0
        private static void ClassicUsagePlayerExample()
        {
            var player = new PlayerInstance(new ColorSkin2());

            Song currentPlayingSong = null;

            Song[]        songs         = null;
            Album         album         = null;
            Artist        artist        = null;
            XmlSerializer xmlSerializer = new XmlSerializer(typeof(Song[]));

            // SerializeSongs(out songs, out album, out artist, xmlSerializer);
            songs = DeserializeSongs(xmlSerializer);
            player.Add(songs);
            player.Play(out currentPlayingSong);
        }
Пример #6
0
        private static void AddOverloadingExample()
        {
            Song currentPlayingSong = null;

            Song[] songs  = null;
            Album  album  = null;
            Artist artist = null;

            var player = new PlayerInstance();

            CreatePlayerItems(out songs, out artist, out album);

            Console.WriteLine("-- Playing Album --");
            player.Add(album);
            Console.WriteLine(player.Play(out currentPlayingSong));

            Console.WriteLine("-- Playing Artist --");
            player.Add(artist);
            Console.WriteLine(player.Play(out currentPlayingSong));
        }