Ejemplo n.º 1
0
        // Convert character into touch tone key enumeration
        private static bool TryParseKey(char key, out TouchToneKey result)
        {
            int index = ValidTouchTones.IndexOf(key);

            if (index > -1)
            {
                result = (TouchToneKey)index;
                return(true);
            }
            else
            {
                result = default(TouchToneKey);
                return(false);
            }
        }
Ejemplo n.º 2
0
        // Convert character into touch tone key enumeration
        private static bool TryParseKey(char key, out TouchToneKey result)
        {
            int index = ValidTouchTones.IndexOf(key);

            if (index > -1)
            {
                result = (TouchToneKey)index;
                return true;
            }
            else
            {
                result = default(TouchToneKey);
                return false;
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Constructs a new <see cref="TouchTone"/> for specified touch tone key.
 /// </summary>
 /// <param name="key">Touch tone to create.</param>
 public TouchTone(TouchToneKey key)
 {
     Key = key;
     Duration = DefaultKeyDuration;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Constructs a new <see cref="TouchTone"/> for specified touch tone key.
 /// </summary>
 /// <param name="key">Touch tone to create.</param>
 public TouchTone(TouchToneKey key)
 {
     Key      = key;
     Duration = DefaultKeyDuration;
 }