public IProgressVisualizer CreateVisualizer(bool allowCancel) { DefaultProgressVisualizer visualizer = null; _asyncOp.Send( () => { visualizer = new DefaultProgressVisualizer(allowCancel); _flowLayoutPanel.Controls.Add(visualizer); }); _asyncOp.Post( () => { if (!Visible) { ShowDialog( _serviceProvider .GetRequiredService <IUIShell>() .GetMainWindowParent()); } }); return(visualizer); }
public IProgressVisualizer CreateVisualizer(bool allowCancel) { DefaultProgressVisualizer visualizer = null; _asyncOp.Send( () => { visualizer = new DefaultProgressVisualizer(allowCancel); _flowLayoutPanel.Controls.Add(visualizer); }); _asyncOp.Post( () => { if (!Visible) ShowDialog( _serviceProvider .GetRequiredService<IUIShell>() .GetMainWindowParent()); }); return visualizer; }