Esempio n. 1
0
        private string Write1_CustomMenuKey(CustomMenuKey v)
        {
            string result;

            switch (v)
            {
            case CustomMenuKey.InvalidKey:
                result = "InvalidKey";
                break;

            case CustomMenuKey.One:
                result = "One";
                break;

            case CustomMenuKey.Two:
                result = "Two";
                break;

            case CustomMenuKey.Three:
                result = "Three";
                break;

            case CustomMenuKey.Four:
                result = "Four";
                break;

            case CustomMenuKey.Five:
                result = "Five";
                break;

            case CustomMenuKey.Six:
                result = "Six";
                break;

            case CustomMenuKey.Seven:
                result = "Seven";
                break;

            case CustomMenuKey.Eight:
                result = "Eight";
                break;

            case CustomMenuKey.Nine:
                result = "Nine";
                break;

            case CustomMenuKey.NotSpecified:
                result = "NotSpecified";
                break;

            case CustomMenuKey.Timeout:
                result = "Timeout";
                break;

            default:
                throw base.CreateInvalidEnumValueException(((long)v).ToString(CultureInfo.InvariantCulture), "Microsoft.Exchange.Data.CustomMenuKey");
            }
            return(result);
        }
Esempio n. 2
0
 private static string MapKeyToString(CustomMenuKey key)
 {
     if (key == CustomMenuKey.Timeout)
     {
         return("-");
     }
     if (key != CustomMenuKey.InvalidKey)
     {
         return(Convert.ToString((int)key));
     }
     return(null);
 }