Пример #1
0
 public static void ShowProgressDialog(IBackgroundTask handler)
 {
     if (IsConfig)
     {
         using (Conf_ProgressDialog dialog = new Conf_ProgressDialog(handler))
             dialog.ShowDialog();
     }
     else
     {
         GUIProgressDialogHandler guiDlg = new GUIProgressDialogHandler(handler);
         guiDlg.ShowDialog();
     }
 }
Пример #2
0
 protected override void OnPageLoad()
 {
     base.OnPageLoad();
     if (dbUpgradeNeeded)
     {
         dbUpgradeNeeded = false;
         GUIProgressDialogHandler guiDlg = new GUIProgressDialogHandler(new DatabaseUpgrader(new MP1DataProvider(oldDbPath)));
         guiDlg.OnCompleted += (o, e) => { doLoad(); };
         guiDlg.ShowDialog();
     }
     else
     {
         doLoad();
     }
 }