public void ShowDialog()
 {
     if (handler == null)
         return;
     handler.OnTaskProgress += setProgress;
     handler.OnTaskCompleted += handler_OnTaskCompleted;
     closeProgDialog();
     dlgPrgrs = (GUIDialogProgress)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_PROGRESS);
     if (dlgPrgrs != null)
     {
         dlgPrgrs.Reset();
         dlgPrgrs.DisplayProgressBar = true;
         dlgPrgrs.ShowWaitCursor = false;
         dlgPrgrs.DisableCancel(true);
         dlgPrgrs.SetHeading(string.IsNullOrEmpty(handler.TaskName) ? MP1Utils.Options.ReadOption(o => o.PluginDisplayName) : handler.TaskName);
         dlgPrgrs.SetLine(1, "");
         dlgPrgrs.StartModal(GUIWindowManager.ActiveWindow);
     }
     else
     {
         GUIWaitCursor.Init(); GUIWaitCursor.Show();
     }
     if (!handler.Start())
     {
         closeProgDialog();
         return;
     }
 }