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

CreateSimpleProgressState() public static method

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