Example #1
0
        static void Main(string[] args)
        {
            bool result  = false;
            bool isSpare = false;

            try
            {
                LPG.RedefinedConsole();

                result = Program.Init();
                if (ERROR(result))
                {
                    goto Exit0;
                }

                LP.Logger.IMP("program start...");

                //test case
                result = Test_LuaInterface();
                if (ERROR(result))
                {
                    goto Exit0;
                }

                while (!Program.IsClosed)
                {
                    isSpare = Program.MainLoop();
                    if (isSpare)
                    {
                        Thread.Sleep(1);
                    }
                }

                //Program.Close();
            }
            catch (Exception e)
            {
                LPMiniDump.GenerateNormalDump(e);
            }

            LP.Logger.IMP("program exit...");

Exit0:

            result = Program.UnInit();
            PTF_ERROR(result);

            Console.WriteLine("\nenter any key to quit");

            return;
        }