The Labs \ Source Viewer \ SSCLI \ System.ComponentModel \ MaskedTextResultHint

  1. //------------------------------------------------------------------------------
  2. // <copyright file="TextBoxBase.cs" company="Microsoft">
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. // </copyright>
  14. //------------------------------------------------------------------------------
  15. namespace System.ComponentModel
  16. {
  17.     /// <devdoc>
  18.     /// Enum defining hints about the reason of the result of a particular operation.
  19.     /// </devdoc>
  20.     public enum MaskedTextResultHint
  21.     {
  22.         // Unknown/Uninitialized
  23.         Unknown = 0,
  24.        
  25.         ////////// Success (positive values, excluded). /////////
  26.         /// WARNING: Do NOT modify the order of the success enum values, they are ordered the way TestString give precedence
  27.         /// to the result hint when multiple chars tested giving different success hints.
  28.        
  29.         // The operation Succeeded because a literal, prompt or space char was escaped.
  30.         CharacterEscaped = 1,
  31.         // The primary operation was not performed because it was not needed and no side effect generated.
  32.         NoEffect = 2,
  33.         // The primary operation was not performed but had a side effect (e.g. Delete at an unassigned edit pos produces left-shifting of chars).
  34.         SideEffect = 3,
  35.         // The primary operation succeeded.
  36.         Success = 4,
  37.        
  38.        
  39.         ///////// Failure values (negative values). /////////
  40.        
  41.         // Failure due to mask violation. (values in the range of [-1, -49]
  42.        
  43.         // Input character not ascii.
  44.         AsciiCharacterExpected = -1,
  45.         // Input character not alpha-numeric ascii.
  46.         AlphanumericCharacterExpected = -2,
  47.         // Input character not a digit.
  48.         DigitExpected = -3,
  49.         // Input character not a letter.
  50.         LetterExpected = -4,
  51.         // Input character not a signed digit.
  52.         SignedDigitExpected = -5,
  53.        
  54.         // Other failures. (values < -50)
  55.        
  56.         // Invalid input
  57.         InvalidInput = -51,
  58.         // Prompt not allowed as input.
  59.         PromptCharNotAllowed = -52,
  60.         // No more room.
  61.         UnavailableEditPosition = -53,
  62.         // Literal or separator position.
  63.         NonEditPosition = -54,
  64.         // Position not in the range of indexes.
  65.         PositionOutOfRange = -55
  66.     }
  67. }

Developer Fusion