예제 #1
0
        static void Main()
        {
            // Read the config file
            Initilizing.ReadConfigFile();

            // Read the pricelist file
            Initilizing.ReadPriceFile();

            // Read the parkinglist file
            ParkingHouse.ReadParkingFile();

            // Goes into the main menu
            Mainmenu.MainMenu();
        }
예제 #2
0
        /// <summary>
        /// This method re-reads the pricelist if the user wants it.
        /// </summary>
        private static void PriceList()
        {
            Console.WriteLine($"The current prices for each new hour are {Initilizing.CarCost} CZK/car" +
                              $"\nand { Initilizing.McCost } CZK/Motorcycles. The number of free minutes before the parking starts to cost is { Initilizing.FreeMinutes }." +
                              $"\nWould you like to re-read the pricelist?");
            string confirm = Console.ReadLine();

            if (confirm == "yes" || confirm == "YES" || confirm == "y")
            {
                Initilizing.ReadPriceFile();

                Console.WriteLine($"Ok! The pricefile has been re-read! The prices for each new hour are {Initilizing.CarCost} CZK/car" +
                                  $"\nand { Initilizing.McCost } CZK/Motorcycles. The free minutes value is { Initilizing.FreeMinutes }" +
                                  "\nPress any key to return to the main menu");
                Console.ReadKey();
                Mainmenu.MainMenu();
            }
            else
            {
                Console.WriteLine("Press any key to return to the main menu");
                Console.ReadKey();
                Mainmenu.MainMenu();
            }
        }