Exemplo n.º 1
0
        static void Main(string[] args)
        {
            var windowWidth = Console.WindowWidth;
            var programName = new[]
            {
                @"  ____                _         _     ____   _                                  ",
                @" / ___|  _ __   _ __ (_) _ __  | |_  |  _ \ | |  __ _  _ __   _ __    ___  _ __ ",
                @" \___ \ | '_ \ | '__|| || '_ \ | __| | |_) || | / _` || '_ \ | '_ \  / _ \| '__|",
                @"  ___) || |_) || |   | || | | || |_  |  __/ | || (_| || | | || | | ||  __/| |   ",
                @" |____/ | .__/ |_|   |_||_| |_| \__| |_|    |_| \__,_||_| |_||_| |_| \___||_|   ",
                @"        |_|                                                                     "
            };

            Console.ForegroundColor = ConsoleColor.Magenta;
            foreach (var line in programName)
            {
                Console.WriteLine(Formatter.AlignTextCenter(line, windowWidth));
            }
            Console.ForegroundColor = ConsoleColor.White;

            Console.WriteLine(Formatter.AlignTextCenter("This program is designed to create a sprint plan", windowWidth));
            while (true)
            {
                Console.WriteLine();
                Console.WriteLine("Would you like to generate new sprint plan? y/n");
                var answer = Console.ReadKey();
                if (answer.Key == ConsoleKey.Y)
                {
                    Console.WriteLine();
                    Console.WriteLine(Formatter.AlignTextCenter("******************** Sprint Planning ********************", windowWidth));
                    Console.WriteLine();
                    var sprintService   = new SprintPlanService();
                    var sprintPlan      = sprintService.GenerateSprintPlan();
                    var documentService = new DocumentService();
                    documentService.GenerateSprintPlanDocX(sprintPlan);
                }
                else
                {
                    Environment.Exit(0);
                }
            }
        }