示例#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);
            }
        }
示例#2
0
文件: TouchTone.cs 项目: avs009/gsf
        // 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;
            }
        }
示例#3
0
文件: TouchTone.cs 项目: avs009/gsf
 /// <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;
 }
示例#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;
 }