private bool ShouldQueryAutoCompleteMask( MaskedTextProvider provider, char ch, int startPosition )
{
if( provider.IsEditPosition( startPosition ) )
{
int nextSeparatorIndex = provider.FindNonEditPositionFrom( startPosition, true );
if( nextSeparatorIndex != -1 )
{
if( provider[ nextSeparatorIndex ].Equals( ch ) )
{
int previousSeparatorIndex = provider.FindNonEditPositionFrom( startPosition, false );
if( provider.FindUnassignedEditPositionInRange( previousSeparatorIndex, nextSeparatorIndex, true ) != -1 )
{
return true;
}
}
}
}
return false;
}