Пример #1
0
    private static string GetNeptuneErrorTitle(string errorCode)
    {
        string empty = string.Empty;

        GameWebAPI.RespDataMA_MessageM.MessageM alert = AlertMaster.GetAlert(errorCode);
        if (alert != null)
        {
            return(empty);
        }
        return(StringMaster.GetString("ShopFailedTitle"));
    }
Пример #2
0
 public static bool CheckDialogMessage(string errorCode)
 {
     if (string.IsNullOrEmpty(errorCode))
     {
         return(false);
     }
     if (errorCode == "LOCAL_ERROR_TIMEOUT" || errorCode == "LOCAL_ERROR_WWW" || errorCode == "LOCAL_ERROR_JSONPARSE" || errorCode == "LOCAL_ERROR_ASSET_DATA" || errorCode == "LOCAL_ERROR_SAVE_DATA_IO" || errorCode == "LOCAL_ERROR_SAVE_DATA_OTHER" || errorCode == "LOCAL_ERROR_SAVE_DATA_SECURITY" || errorCode == "E-AL09" || errorCode == "E-AL10")
     {
         return(true);
     }
     if (!string.IsNullOrEmpty(AlertManager.GetNeptuneErrorString(errorCode)))
     {
         return(true);
     }
     GameWebAPI.RespDataMA_MessageM.MessageM alert = AlertMaster.GetAlert(errorCode);
     return(null != alert);
 }
Пример #3
0
    protected override void Start()
    {
        this.userID.text        = string.Empty;
        this.userCode.text      = string.Empty;
        this.appVersion.text    = string.Empty;
        this.buildNumLabel.text = string.Empty;
        this.NpVersion.text     = string.Empty;
        this.userID.gameObject.SetActive(false);
        this.userCode.gameObject.SetActive(false);
        this.appVersion.gameObject.SetActive(false);
        this.buildNumLabel.gameObject.SetActive(false);
        this.NpVersion.gameObject.SetActive(false);
        this.cacheClearButtonLabel.text = StringMaster.GetString("TitleCacheButton");
        this.takeoverButtonLabel.text   = StringMaster.GetString("TakeOverTitle");
        this.optionButtonLabel.text     = StringMaster.GetString("TitleOptionButton");
        this.inquiryButtonLabel.text    = StringMaster.GetString("InquiryTitle");
        this.infomationMessage          = AlertMaster.GetAlert("E-AL80");
        UILabel componentInChildren = this.infomationBtn.GetComponentInChildren <UILabel>();

        if (componentInChildren != null)
        {
            componentInChildren.text = this.infomationMessage.messageTitle;
        }
        UILabel componentInChildren2 = this.contactBtn.GetComponentInChildren <UILabel>();

        if (componentInChildren2 != null)
        {
            componentInChildren2.text = StringMaster.GetString("InquiryTitle");
        }
        base.Start();
        base.gameObject.SetActive(true);
        if (!global::Debug.isDebugBuild || this.buildNumLabel != null)
        {
        }
        base.StartCoroutine(this.StartEvent());
    }
Пример #4
0
 public static bool ShowAlertDialog(Action <int> action, string errorCode)
 {
     AlertManager.lastErrorCode = errorCode;
     if (errorCode == "LOCAL_ERROR_TIMEOUT")
     {
         string @string = StringMaster.GetString("AlertNetworkErrorTitle");
         string string2 = StringMaster.GetString("AlertNetworkErrorTimeOut");
         return(AlertManager.ShowAlertDialog(action, @string, string2, AlertManager.ButtonActionType.Retry, true));
     }
     if (errorCode == "LOCAL_ERROR_WWW")
     {
         string string3 = StringMaster.GetString("AlertDataErrorTitle");
         string string4 = StringMaster.GetString("AlertDataErrorInfo");
         return(AlertManager.ShowAlertDialog(action, string3, string4, AlertManager.ButtonActionType.Retry, true));
     }
     if (errorCode == "LOCAL_ERROR_JSONPARSE")
     {
         string string5 = StringMaster.GetString("SaveFailedTitle");
         string string6 = StringMaster.GetString("AlertJsonErrorInfo");
         return(AlertManager.ShowAlertDialog(action, string5, string6, AlertManager.ButtonActionType.Title, true));
     }
     if (errorCode == "LOCAL_ERROR_ASSET_DATA")
     {
         string string7 = StringMaster.GetString("AlertNetworkErrorTitle");
         string string8 = StringMaster.GetString("AlertNetworkErrorRetry");
         return(AlertManager.ShowAlertDialog(action, string7, string8, AlertManager.ButtonActionType.Retry, true));
     }
     if (errorCode == "LOCAL_ERROR_SAVE_DATA_IO")
     {
         string string9  = StringMaster.GetString("SaveFailedTitle");
         string string10 = StringMaster.GetString("SaveFailed-02");
         return(AlertManager.ShowAlertDialog(action, string9, string10, AlertManager.ButtonActionType.Close, true));
     }
     if (errorCode == "LOCAL_ERROR_SAVE_DATA_OTHER")
     {
         string string11 = StringMaster.GetString("SaveFailedTitle");
         string string12 = StringMaster.GetString("SaveFailed-01");
         return(AlertManager.ShowAlertDialog(action, string11, string12, AlertManager.ButtonActionType.Close, true));
     }
     if (errorCode == "LOCAL_ERROR_SAVE_DATA_SECURITY")
     {
         string string13 = StringMaster.GetString("SaveFailedTitle");
         string string14 = StringMaster.GetString("SaveFailed-03");
         return(AlertManager.ShowAlertDialog(action, string13, string14, AlertManager.ButtonActionType.Close, true));
     }
     if (errorCode == "E-AL09")
     {
         string string15 = StringMaster.GetString("TakeOver-12");
         string string16 = StringMaster.GetString("TakeOver-13");
         return(AlertManager.ShowAlertDialog(action, string15, string16, AlertManager.ButtonActionType.Close, true));
     }
     if (errorCode == "E-AL10")
     {
         string string17 = StringMaster.GetString("TakeOver-12");
         string string18 = StringMaster.GetString("TakeOver-13");
         return(AlertManager.ShowAlertDialog(action, string17, string18, AlertManager.ButtonActionType.Close, true));
     }
     if (!string.IsNullOrEmpty(AlertManager.GetNeptuneErrorString(errorCode)))
     {
         return(AlertManager.ShowAlertDialog(action, AlertManager.GetNeptuneErrorTitle(errorCode), AlertManager.GetNeptuneErrorString(errorCode), AlertManager.ButtonActionType.Close, true));
     }
     GameWebAPI.RespDataMA_MessageM.MessageM alert = AlertMaster.GetAlert(errorCode);
     if (alert == null)
     {
         alert = AlertMaster.GetAlert("E-GP01");
     }
     if (alert == null)
     {
         return(AlertManager.ErrorCallback(action, errorCode));
     }
     AlertManager.ButtonActionType actionType = (AlertManager.ButtonActionType) int.Parse(alert.actionType);
     AlertManager.DialogType       dialogType = (AlertManager.DialogType) int.Parse(alert.actionValue);
     if (dialogType == AlertManager.DialogType.Alert)
     {
         return(AlertManager.ShowAlertDialog(action, alert.messageTitle, alert.messageText, actionType, true));
     }
     if (dialogType != AlertManager.DialogType.Modal)
     {
         return(AlertManager.ShowAlertDialog(action, alert.messageTitle, alert.messageText, actionType, true));
     }
     return(AlertManager.ShowModalMessage(action, alert.messageTitle, alert.messageText, actionType, true));
 }
Пример #5
0
    private static string GetNeptuneErrorString(string errorCode)
    {
        string result = string.Empty;

        GameWebAPI.RespDataMA_MessageM.MessageM alert = AlertMaster.GetAlert(errorCode);
        if (alert != null)
        {
            return(result);
        }
        string text = errorCode.Replace("C-NP", string.Empty);

        switch (text)
        {
        case "100":
            result = StringMaster.GetString("AlertJsonErrorInfo");
            break;

        case "101":
            result = StringMaster.GetString("ShopFailed-01");
            break;

        case "102":
            result = StringMaster.GetString("ShopFailed-06");
            break;

        case "103":
            result = StringMaster.GetString("ShopFailed-07");
            break;

        case "104":
            result = StringMaster.GetString("ShopFailed-05");
            break;

        case "105":
            result = StringMaster.GetString("ShopFailed-08");
            break;

        case "106":
            result = StringMaster.GetString("ShopFailed-10");
            break;

        case "107":
            result = StringMaster.GetString("ShopFailed-02");
            break;

        case "120":
            result = StringMaster.GetString("ShopFailed-11");
            break;

        case "199":
            result = StringMaster.GetString("ShopFailed-04");
            break;

        case "200":
            result = StringMaster.GetString("ShopFailed-03");
            break;

        case "201":
            result = StringMaster.GetString("ShopFailed-13");
            break;

        case "203":
            result = StringMaster.GetString("ShopFailed-12");
            break;
        }
        return(result);
    }