SIL.FieldWorks.IText.MatchingConcordanceItems.ReloadList C# (CSharp) Method

ReloadList() public method

Override to force recomputing the list. This is tricky because LoadMatches calls a Clerk routine which recursively calls ReloadList. Therefore if we call LoadMatches, we don't need to call the base routine. If we're in the middle of loading a list, though, we want to only do the base thing. Finally, if the OwningControl has never been loaded (user hasn't yet selected option), just load the (typically empty) list.
public ReloadList ( ) : void
return void
		public override void ReloadList()
		{
			if (OwningControl != null && OwningControl.HasLoadedMatches)
			{
				if (OwningControl.IsLoadingMatches)
				{
					// calling from inside the call to LoadMatches, we've already rebuild the main list,
					// just need to do the rest of the normal reload.
					base.ReloadList();
					return;
				}
				OwningControl.LoadMatches();
				// Fall through to base impl.
			}
			else
			{
				// It's in a disposed state...make it empty for now.
				((ObjectListPublisher) VirtualListPublisher).SetOwningPropValue(new int[0]);
				ConcDecorator concSda = GetConcDecorator();
				if (concSda != null)
					concSda.UpdateOccurrences(new int[0]);
			}
			base.ReloadList();
		}