WaitForCompleted() public method

public WaitForCompleted ( ) : void
return void
        void Install()
        {
            btnPrev.Sensitive = false;
            btnNext.Sensitive = false;

            string txt;
            string okmessage;
            string errmessage;

            installMonitor = new InstallMonitor(progressLabel, progressBar, mainProgressBar);
            ThreadStart oper;

            if (uninstallId == null)
            {
                oper       = new ThreadStart(RunInstall);
                okmessage  = Catalog.GetString("The installation has been successfully completed.");
                errmessage = Catalog.GetString("The installation failed!");
            }
            else
            {
                oper       = new ThreadStart(RunUninstall);
                okmessage  = Catalog.GetString("The uninstallation has been successfully completed.");
                errmessage = Catalog.GetString("The uninstallation failed!");
            }

            Thread t = new Thread(oper);

            t.Start();

            installing = true;
            installMonitor.WaitForCompleted();
            installing = false;

            wizardNotebook.NextPage();

            if (installMonitor.Success)
            {
                imageError.Visible = false;
                imageInfo.Visible  = true;
                txt = "<b>" + okmessage + "</b>\n\n";
            }
            else
            {
                imageError.Visible = true;
                imageInfo.Visible  = false;
                txt = "<span foreground=\"red\"><b>" + errmessage + "</b></span>\n\n";
                foreach (string s in installMonitor.Errors)
                {
                    txt += s + "\n";
                }
            }

            labelResult.Markup = txt;
            OnPageChanged();
        }
		void Install ()
		{
			btnPrev.Sensitive = false;
			btnNext.Sensitive = false;
			
			string txt;
			string okmessage;
			string errmessage;
			
			installMonitor = new InstallMonitor (progressLabel, progressBar, mainProgressBar);
			ThreadStart oper;
				
			if (uninstallId == null) {
				oper = new ThreadStart (RunInstall);
				okmessage = Catalog.GetString ("The installation has been successfully completed.");
				errmessage = Catalog.GetString ("The installation failed!");
			} else {
				oper = new ThreadStart (RunUninstall);
				okmessage = Catalog.GetString ("The uninstallation has been successfully completed.");
				errmessage = Catalog.GetString ("The uninstallation failed!");
			}
			
			Thread t = new Thread (oper);
			t.Start ();
			
			installing = true;
			installMonitor.WaitForCompleted ();
			installing = false;
			
			wizardNotebook.NextPage ();

			if (installMonitor.Success) {
				imageError.Visible = false;
				imageInfo.Visible = true;
				txt = "<b>" + okmessage + "</b>\n\n";
			} else {
				imageError.Visible = true;
				imageInfo.Visible = false;
				txt = "<span foreground=\"red\"><b>" + errmessage + "</b></span>\n\n";
				foreach (string s in installMonitor.Errors)
					txt += s + "\n";
			}
			
			labelResult.Markup = txt;
			OnPageChanged ();
		}