private void BuildProject() { // Create a progress window and disable the current window. this.Enabled = false; _progressWindow = new BuildProjectLogWindow("Building project", "Copying system files"); _progressWindow.Show(this); Thread thread = new Thread(new ThreadStart(BuildProjectThread)); thread.IsBackground = true; thread.Start(); while (thread != null && thread.IsAlive == true) { Application.DoEvents(); if (_subTask != "") { _progressWindow.UpdateSubTaskProgress(_subTaskProgress, _subTask); _subTask = ""; } if (_task != "") { _progressWindow.UpdateTaskProgress(_taskProgress, _task); _task = ""; } if (_logStack.Count > 0) { _progressWindow.AddLog((string)_logStack.Pop()); } } // Enable current window and destroy the progress window. _progressWindow.Close(); this.Enabled = true; }
private void BuildProject() { // Create a progress window and disable the current window. this.Enabled = false; _progressWindow = new BuildProjectLogWindow("Building project", "Copying system files"); _progressWindow.Show(this); Thread thread = new Thread(new ThreadStart(BuildProjectThread)); thread.IsBackground = true; thread.Start(); while (thread != null && thread.IsAlive == true) { Application.DoEvents(); if (_subTask != "") { _progressWindow.UpdateSubTaskProgress(_subTaskProgress, _subTask); _subTask = ""; } if (_task != "") { _progressWindow.UpdateTaskProgress(_taskProgress, _task); _task = ""; } if (_logStack.Count > 0) _progressWindow.AddLog((string)_logStack.Pop()); } // Enable current window and destroy the progress window. _progressWindow.Close(); this.Enabled = true; }