示例#1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            m_MainWindow = new FormMain();
            m_EmulatorWorker = new EmulatorWorker();
            System.Threading.Thread workerThread = new System.Threading.Thread(m_EmulatorWorker.DoWork);
            workerThread.Priority = System.Threading.ThreadPriority.AboveNormal;
            workerThread.Start();

            Application.Run(m_MainWindow);

            m_EmulatorWorker.StopWorker();
            while (!workerThread.IsAlive) ;
        }
示例#2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            m_MainWindow     = new FormMain();
            m_EmulatorWorker = new EmulatorWorker();
            System.Threading.Thread workerThread = new System.Threading.Thread(m_EmulatorWorker.DoWork);
            workerThread.Priority = System.Threading.ThreadPriority.AboveNormal;
            workerThread.Start();

            Application.Run(m_MainWindow);

            m_EmulatorWorker.StopWorker();
            while (!workerThread.IsAlive)
            {
                ;
            }
        }