Beispiel #1
0
        public static void Main(string[] args)
        {
            Thread.CurrentThread.Name = "Main";
            BeginInvokeDemo demo = new BeginInvokeDemo();

            demo.CreateHandle();

            ThreadStart thread_start = new ThreadStart(demo.UpdateLabelDeny);

            if (args.Length > 0)
            {
                debug = true;
                if (args [0] == "allow")
                {
                    thread_start = new ThreadStart(demo.UpdateLabelAllow);
                }
            }
            Thread worker = new Thread(thread_start);

            worker.Name         = "Updater";
            worker.IsBackground = true;
            worker.Start();

            Application.Run(demo);
        }
Beispiel #2
0
		public static void Main ()
		{
			BeginInvokeDemo demo = new BeginInvokeDemo ();

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

			Application.Run (demo);
		}
Beispiel #3
0
        public static void Main()
        {
            BeginInvokeDemo demo = new BeginInvokeDemo();

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

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

            Application.Run(demo);
        }
Beispiel #4
0
		public static void Main (string[] args)
		{
			Thread.CurrentThread.Name = "Main";
			BeginInvokeDemo demo = new BeginInvokeDemo ();
			demo.CreateHandle ();

			ThreadStart thread_start = new ThreadStart (demo.UpdateLabelDeny);
			if (args.Length > 0) {
				debug = true;
				if (args [0] == "allow") {
					thread_start = new ThreadStart (demo.UpdateLabelAllow);
				}
			}
			Thread worker = new Thread (thread_start);
			worker.Name = "Updater";
			worker.IsBackground = true;
			worker.Start ();

			Application.Run (demo);
		}