public void Stop(string operationId) { WpfUtilities.Post(new DispatchAction { Dispatcher = _progressBar.Dispatcher, Delay = TimeSpan.FromSeconds(0.1), Action = () => StopWorker(operationId) }); }
/// <summary> /// Enqueue a progress bar request for the given operation id. /// The progress bar will be shown only after a short delay (.5 sec). /// </summary> public void Start(string operationId, string toolTipText) { var item = AddOrUpdateOperation(operationId, toolTipText); // Start a new one WpfUtilities.Post(new DispatchAction { Dispatcher = _progressBar.Dispatcher, Delay = TimeSpan.FromSeconds(0.3), Action = () => StartWorker(item) }); }