Exemple #1
0
        private static void Main()
        {
            var output          = new ConsoleOutput();
            var mobileOptions   = new MobileOptions(output);
            var playbackOptions = mobileOptions.PlaybackOptions;
            var displayOptions  = mobileOptions.DisplayOptions;

            var playbackChoice = playbackOptions[ChooseFromList("playback components", playbackOptions, output)];
            var displayChoice  = displayOptions[ChooseFromList("display component", displayOptions, output)];

            output.WriteLine($"{ playbackChoice.GetName()}, {displayChoice.GetName()} selected.");

            var mobile = new SimCorpMobile {
                PlaybackComponent = playbackChoice,
                DisplayComponent  = displayChoice
            };

            mobile.Play("");
            mobile.Display("");
            Console.ReadLine();
        }