예제 #1
0
        /// <summary>
        /// map tethering errors to strings
        /// </summary>
        /// <param name="error"></param>
        public string GetTetheringErrorString(TetheringOperationStatus error)
        {
            var errorString = "";

            switch (error)
            {
            case TetheringOperationStatus.Success:
                errorString = "No error";
                break;

            case TetheringOperationStatus.Unknown:
                errorString = "Unknown error has occurred.";
                break;

            case TetheringOperationStatus.MobileBroadbandDeviceOff:
                errorString = "Please make sure your MB device is turned on.";
                break;

            case TetheringOperationStatus.WiFiDeviceOff:
                errorString = "Please make sure your WiFi device is turned on.";
                break;

            case TetheringOperationStatus.EntitlementCheckTimeout:
                errorString = "We coudn't contact your Mobile Broadband operator to verify your ability to enable tethering, please contact your Mobile Operator.";
                break;

            case TetheringOperationStatus.EntitlementCheckFailure:
                errorString = "You Mobile Broadband operator does not allow tethering on this device.";
                break;

            case TetheringOperationStatus.OperationInProgress:
                errorString = "The system is busy, please try again later.";
                break;
            }
            return(errorString);
        }
예제 #2
0
 /// <summary>
 /// map tethering errors to strings
 /// </summary>
 /// <param name="error"></param>
 public string GetTetheringErrorString(TetheringOperationStatus error)
 {
     var errorString = "";
     switch (error)
     {
         case TetheringOperationStatus.Success:
             errorString = "No error";
             break;
         case TetheringOperationStatus.Unknown:
             errorString = "Unknown error has occurred.";
             break;
         case TetheringOperationStatus.MobileBroadbandDeviceOff:
             errorString = "Please make sure your MB device is turned on.";
             break;
         case TetheringOperationStatus.WiFiDeviceOff:
             errorString = "Please make sure your WiFi device is turned on.";
             break;
         case TetheringOperationStatus.EntitlementCheckTimeout:
             errorString = "We coudn't contact your Mobile Broadband operator to verify your ability to enable tethering, please contact your Mobile Operator.";
             break;
         case TetheringOperationStatus.EntitlementCheckFailure:
             errorString = "You Mobile Broadband operator does not allow tethering on this device.";
             break;
         case TetheringOperationStatus.OperationInProgress:
             errorString = "The system is busy, please try again later.";
             break;
     }
     return errorString;
 }