SIL.FieldWorks.XWorks.FwXWindow.CreatePredictiveProgressState C# (CSharp) Method

CreatePredictiveProgressState() public static method

factory method for getting a progress state which is already hooked up to the correct progress panel
public static CreatePredictiveProgressState ( XCore.Mediator mediator, string taskLabel ) : SIL.FieldWorks.Common.Controls.ProgressState
mediator XCore.Mediator
taskLabel string
return SIL.FieldWorks.Common.Controls.ProgressState
		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>
FwXWindow