示例#1
0
        public static string ToString(MessengerDotNet.MessengerStatus status)
        {
            switch (status)
            {
            case MessengerDotNet.MessengerStatus.Invisible:
            case MessengerDotNet.MessengerStatus.Offline: return("Offline");

            case MessengerDotNet.MessengerStatus.Online: return("Online");

            case MessengerDotNet.MessengerStatus.Busy: return("Busy");

            case MessengerDotNet.MessengerStatus.BeRightBack: return("Be right back");

            case MessengerDotNet.MessengerStatus.Away: return("Away");

            case MessengerDotNet.MessengerStatus.OnThePhone: return("On the phone");

            case MessengerDotNet.MessengerStatus.OutToLunch: return("Out to lunch");

            default: return(null);
            }
        }
示例#2
0
        public static string ToKey(MessengerDotNet.MessengerStatus status)
        {
            switch (status)
            {
            default:
            case MessengerDotNet.MessengerStatus.Invisible:
            case MessengerDotNet.MessengerStatus.Offline:
            case MessengerDotNet.MessengerStatus.Unknown:
                return("offline");

            case MessengerDotNet.MessengerStatus.Online:
                return("online");

            case MessengerDotNet.MessengerStatus.Away:
            case MessengerDotNet.MessengerStatus.OutToLunch:
            case MessengerDotNet.MessengerStatus.BeRightBack:
                return("away");

            case MessengerDotNet.MessengerStatus.Busy:
            case MessengerDotNet.MessengerStatus.OnThePhone:
                return("busy");
            }
        }