Esempio n. 1
0
        private static void Exit(object o)
        {
            int  start       = Environment.TickCount;
            bool consoleRead = true;

            if (consoleRead)
            {
                Thread.Sleep(1000);
                Console.Out.WriteLine("Press ENTER to exit the Service Layer.");
                Console.In.ReadLine();
            }
            Application2.Exit();
        }
Esempio n. 2
0
        public void AddMessageFilterTest()
        {
            AutoResetEvent filterEvent = new AutoResetEvent(false);
            TestFilter     filter      = new TestFilter(filterEvent);

            Application2.AddMessageFilter(filter);

            Form f = new Form();

            f.Visible = true;
            Application2.DoEvents();

            Assert.IsTrue(filterEvent.WaitOne(1000, false), "Filter PreFilterMessage was not called");

            filterEvent.Close();
            f.Dispose();
            Application2.Exit();
        }
Esempio n. 3
0
 private void mnuExit_Click(object sender, EventArgs e)
 {
     Application2.Exit();
 }