public static void Main(string[] args)
        {
            LcdDisplay lcdDisplay = new LcdDisplay(                                        //
                new DigitsSplitter(new NumeralSystem(), new DigitFactory(new Patterns())), //
                new DigitScaler(new ScalingRepeater()),                                    //
                new DigitPrinter(new Zipper()));

            int     number  = Convert.ToInt32(args[0]);
            Scaling scaling = Scaling.Of(Convert.ToInt32(args[1]));

            Console.WriteLine(lcdDisplay.ToLcd(number, scaling));
            Console.ReadKey();
        }
Example #2
0
        public override void Run(string[] args)
        {
            if (arguments.IsHelpRequired())
            {
                Console.WriteLine("Run this class to see LCD Numbers working:");
                Console.WriteLine("\nRunning the generated exe:");
                Console.WriteLine("LcdNumbers\\bin\\Debug\\netcoreapp3.0\\LcdNumbers.exe 12345 2");
                Console.WriteLine("\nRunning via dotnet:");
                Console.WriteLine("dotnet run --project LcdNumbers 12345 2");
                return;
            }

            int number  = arguments.GetNumberToDisplay();
            var scaling = arguments.GetScaling();

            Console.Write(lcdDisplay.ToLcd(number, scaling));
        }