Cornerstone.GUI.Dialogs.ProgressPopup.startProcessing C# (CSharp) Method

startProcessing() private method

private startProcessing ( ) : void
return void
        private void startProcessing()
        {
            if (working)
                return;

            working = true;

            // try setting up the vanilla worker / progress bar
            if (worker != null) {
                workerThread = new Thread(new ThreadStart(worker));
                workerThread.IsBackground = true;
                workerThread.Start();
                checkDoneTimer = new System.Threading.Timer(new TimerCallback(checkDoneTimer_Tick), null, 100, 100);
            }

            // try to setup the trackable worker / progress bar
            else if (trackableWorker != null) {
                progressBar.Style = ProgressBarStyle.Blocks;
                workerThread = new Thread(new ThreadStart(paramThreadWrapper));
                workerThread.IsBackground = true;
                workerThread.Start();
                checkDoneTimer = new System.Threading.Timer(new TimerCallback(checkDoneTimer_Tick), null, 100, 100);
            }

            // if both are null, then just shut down
            else {
                this.Close();
                return;
            }
        }