예제 #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
파일: Program.cs 프로젝트: romaklayt/Player
        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));
        }