Esempio n. 1
0
		public static void Main ()
		{
			MainLoopDemo demo = new MainLoopDemo ();

			ThreadStart thread_start = new ThreadStart (demo.UpdateLabel);	
			Thread worker = new Thread (thread_start);
			worker.IsBackground = true;
			worker.Start();

			Timer t = new Timer ();
			t.Interval = 250;
			t.Tick += new EventHandler (demo.TimerUpdater);
			t.Enabled = true;

			Application.Idle += new EventHandler (demo.IdleHandler);

			Application.Run (demo);
		}
Esempio n. 2
0
        public static void Main()
        {
            MainLoopDemo demo = new MainLoopDemo();

            ThreadStart thread_start = new ThreadStart(demo.UpdateLabel);
            Thread      worker       = new Thread(thread_start);

            worker.IsBackground = true;
            worker.Start();

            Timer t = new Timer();

            t.Interval = 250;
            t.Tick    += new EventHandler(demo.TimerUpdater);
            t.Enabled  = true;

            Application.Idle += new EventHandler(demo.IdleHandler);

            Application.Run(demo);
        }