public static ProgressState CreateSimpleProgressState(Mediator mediator)
{
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
return new ProgressState(panel);
}