Ejemplo n.º 1
0
        private void CreateGarage()
        {
            ui.Clear();
            ui.DisplayInputHeader("Search for vehicles");
            ui.WriteWarning("\nThis will demolish the existing garage!!\n");
            ui.WriteLine("(just press ENTER to keep the garage)");
            int size = ui.GetIntegerFromUser("Number of parking stalls in garage: ", Const.AcceptEmptyString);

            if (size != -1)
            {
                garage = new Garage <Vehicle>(size);
                log.Add("Demolished old garage...");
                string msg = $"New garage created: {garage.Capacity} stalls";
                log.Add(msg);
                ui.WriteSuccess(msg);
                ui.PromptUserForKey();
                ui.Clear();
            }
        }