public MultiTaskDialogProgressMonitor(bool showProgress, bool allowCancel, bool showDetails, IDictionary <string, string> taskLabelAliases)
 {
     if (showProgress)
     {
         dialog = new MultiTaskProgressDialog(allowCancel, showDetails, taskLabelAliases);
         MessageService.PlaceDialog(dialog, MessageService.RootWindow);
         dialog.Show();
         dialog.AsyncOperation = AsyncOperation;
         DispatchService.RunPendingEvents();
         this.showDetails = showDetails;
     }
 }
Beispiel #2
0
 public MultiTaskDialogProgressMonitor(bool showProgress, bool allowCancel, bool showDetails, IDictionary <string, string> taskLabelAliases)
 {
     if (showProgress)
     {
         var parent = MessageService.GetDefaultModalParent();
         dialog = new MultiTaskProgressDialog(allowCancel, showDetails, taskLabelAliases)
         {
             DestroyWithParent = true,
             Modal             = true,
             TransientFor      = parent,
         };
         MessageService.PlaceDialog(dialog, parent);
         Mono.TextEditor.GtkWorkarounds.PresentWindowWithNotification(dialog);
         dialog.AsyncOperation = AsyncOperation;
         DispatchService.RunPendingEvents();
         this.showDetails = showDetails;
     }
 }
 public MultiTaskDialogProgressMonitor(bool showProgress, bool allowCancel, bool showDetails, IDictionary <string, string> taskLabelAliases) : base(Runtime.MainSynchronizationContext)
 {
     if (showProgress)
     {
         var parent = MessageService.GetDefaultModalParent();
         dialog = new MultiTaskProgressDialog(allowCancel, showDetails, taskLabelAliases)
         {
             DestroyWithParent = true,
             Modal             = true,
             TransientFor      = parent,
         };
         MessageService.PlaceDialog(dialog, parent);
         GtkWorkarounds.PresentWindowWithNotification(dialog);
         dialog.CancellationTokenSource = CancellationTokenSource;
         DispatchService.RunPendingEvents();
         this.showDetails = showDetails;
     }
 }