Esempio n. 1
0
        public static void Main()
        {
            ConsoleRender cr = new ConsoleRender();

            Console.WriteLine(cr.header());
            do
            {
                string suspend = "";
                try
                {
                    do
                    {
                        Console.WriteLine("Press 'x' to pause.");
                        ThreadHandler thread = new ThreadHandler();
                        thread.Start();

                        suspend = Console.ReadLine();
                        if (suspend == "x")
                        {
                            thread.Pause();
                            Console.WriteLine("Suspended!");
                            Console.WriteLine("Press 'y' to start again.");
                            if (Console.ReadLine() == "y")
                            {
                                Console.Clear();
                                Console.WriteLine(cr.header());
                                Console.WriteLine("Started");
                                thread.Resume();
                            }
                        }
                    } while (suspend != "y" && suspend != "n");
                }
                catch (Exception)
                {
                }
            } while (true);
        }