Esempio n. 1
0
    public IEnumerator OpenAlert(PersistentFile.ErrorType error)
    {
        string errorCode = AlertManager.GetErrorCode(error);

        this.isOpen = AlertManager.ShowAlertDialog(new Action <int>(this.OnClose), errorCode);
        while (this.isOpen)
        {
            yield return(null);
        }
        yield break;
    }
Esempio n. 2
0
 public static string GetErrorCode(PersistentFile.ErrorType errorType)
 {
     if (errorType == PersistentFile.ErrorType.IO)
     {
         return("LOCAL_ERROR_SAVE_DATA_IO");
     }
     if (errorType == PersistentFile.ErrorType.OTHER)
     {
         return("LOCAL_ERROR_SAVE_DATA_OTHER");
     }
     if (errorType != PersistentFile.ErrorType.SECURITY)
     {
         return(string.Empty);
     }
     return("LOCAL_ERROR_SAVE_DATA_SECURITY");
 }
        public PersistentFile.ErrorType GetErrorType()
        {
            Type type = null;

            if (this.isException)
            {
                type = this.exceptionType;
            }
            PersistentFile.ErrorType result = PersistentFile.ErrorType.NONE;
            if (typeof(IOException) == type)
            {
                result = PersistentFile.ErrorType.IO;
            }
            else if (typeof(Exception) == type)
            {
                result = PersistentFile.ErrorType.OTHER;
            }
            else if (type != null)
            {
                result = PersistentFile.ErrorType.SECURITY;
            }
            return(result);
        }