public void StartJob()
        {
            SelectInstance();

            Views.ProgressStatusUI progressBarUI = new Views.ProgressStatusUI();
            progressBarUI.ContentRendered += ProgressBarUI_ContentRendered;
            progressBarUI.ShowDialog();
        }
        private void ProgressBarUI_ContentRendered(object sender, EventArgs e)
        {
            Views.ProgressStatusUI progressBarUI = sender as Views.ProgressStatusUI;

            if (progressBarUI == null)
            {
                throw new Exception("Error trying to create progress bar window");
            }

            for (int i = 1; i <= 100; i++)
            {
                ChangeParameter(i.ToString());
                progressBarUI.UpdateStatus(string.Format("Update parameter {0}", i.ToString()), i);
                if (progressBarUI.ProcessCancelled)
                {
                    break;
                }
            }

            progressBarUI.JobCompleted();
        }