System.ComponentModel.MaskedTextProvider.IsEditPosition C# (CSharp) Method

IsEditPosition() private static method

private static IsEditPosition ( CharDescriptor charDescriptor ) : bool
charDescriptor CharDescriptor
return bool
        private static bool IsEditPosition(CharDescriptor charDescriptor)
        {
            return (charDescriptor.CharType == CharType.EditRequired || charDescriptor.CharType == CharType.EditOptional);
        }

Same methods

MaskedTextProvider::IsEditPosition ( int position ) : bool

Usage Example

Esempio n. 1
0
        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;
        }