Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            int min, max, total = 0;
            var player = new Player();
            var songs  = CreateSongs(out min, out max, ref total);

            player.Songs = songs;
            Console.WriteLine($"TotalDuration: {total}, max duration: {max}, min duration: {min}");

            while (true)
            {
                switch (ReadLine())
                {
                case "Up":
                {
                    player.VolumeUp();
                }
                break;

                case "Down":
                {
                    player.VolumeDown();
                }
                break;

                case "P":
                {
                    player.Play();
                }
                break;

                case "step1":
                {
                    player.VolumeChange1();
                }
                break;

                case "step2":
                {
                    player.VolumeChange2();
                }
                break;

                case "Lock":
                {
                    player.Lock();
                }
                break;

                case "Unlock":
                {
                    player.Unlock();
                }
                break;

                case "Stop":
                {
                    player.Stop();
                }
                break;

                case "Start":
                {
                    player.Start();
                }
                break;

                case "CreateDS":
                {
                    CreateDefaultSong();
                }
                break;
                }
            }
        }