public void ShowDialog()
 {
     if (handler == null)
     {
         return;
     }
     handler.OnTaskProgress += new BackgroundTaskProgress(setProgress);
     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("");
         dlgPrgrs.SetLine(1, "");
         dlgPrgrs.StartModal(GUIWindowManager.ActiveWindow);
     }
     else
     {
         GUIWaitCursor.Init(); GUIWaitCursor.Show();
     }
     if (!handler.Start())
     {
         closeProgDialog();
         return;
     }
 }
Beispiel #2
0
 void Conf_ProgressDialog_Load(object sender, EventArgs e)
 {
     if (handler == null)
     {
         Close();
     }
     handler.OnTaskProgress += new BackgroundTaskProgress(updateStatusInfo);
     if (!handler.Start())
     {
         Close();
     }
 }