Пример #1
0
        static void Main(string[] args)
        {
            Console.CursorVisible = false;
            //Task a = new Task(() => Update());
            //a.Start();
            KeyListener();
            MemoryControl.Initialization();

            //y = true;

            while (!y)
            {
                Update();
                Thread.Sleep(20);
            }



            Console.WriteLine("Hello World!");
            Console.ReadKey();
        }
Пример #2
0
        private static async Task KeyListener()
        {
            await Task.Run(() =>
            {
                while (true)
                {
                    switch (Console.ReadKey().KeyChar)
                    {
                    case (char)ConsoleKey.Backspace:
                        y = true;
                        break;

                    case '\\':

                        break;

                    case (char)ConsoleKey.Enter:

                        break;

                    case (char)ConsoleKey.D0:
                        Environment.Exit(0);
                        break;

                    case ' ':
                        try
                        {
                            MemoryControl.Program_Loading_To_RAM(32768);
                            //Console.BackgroundColor = ConsoleColor.Black;
                        }
                        catch (Exception e)
                        {
                            Console.WriteLine(e);
                            throw;
                        }
                        break;
                    }
                }
            });
        }