Exemple #1
0
        static void Main(string[] args)
        {
            LPRServiceCore.LPRServiceEntryPoint m_LPRService;

            m_LPRService = new LPRServiceEntryPoint();


            Console.CancelKeyPress += delegate(object sender, ConsoleCancelEventArgs e) { m_LPRService.Stop(); }; // shutdown all threads on control-c event

            m_LPRService.OnSelfDestruct += Stop;

            m_LPRService.Start(true);


            while (!m_Stop)
            {
                Thread.Sleep(1);/// the console app stays alive until a control-C event kills this thread
            }
        }