Exemple #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);
        }
Exemple #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);
		}
Exemple #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);
        }
Exemple #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);
		}