public static ProgressState CreatePredictiveProgressState(Mediator mediator, string taskLabel)
{
if (mediator == null || mediator.PropertyTable == null)
return new NullProgressState();//not ready to be doing progress bars
StatusBarProgressPanel panel = mediator.PropertyTable.GetValue("ProgressBar") as StatusBarProgressPanel;
if (panel == null)
return new NullProgressState();//not ready to be doing progress bars
IApp app = (IApp)mediator.PropertyTable.GetValue("App");
PredictiveProgressState s = new PredictiveProgressState(panel, app.SettingsKey, taskLabel);
return s;
}
/// <summary>