示例#1
0
    // 利用 ID 去取得描述的中文字
    public static string GetEnumAttribute(ErrorID reportType)
    {
        var members     = typeof(ErrorID).GetMember(reportType.ToString());
        var attributes  = members[0].GetCustomAttributes(typeof(ErrorIDMapAttribute), false);
        var description = ((ErrorIDMapAttribute)attributes[0]).Description;

        return(description);
    }
示例#2
0
    public static LuaComponent ShowErrorMsg(ErrorID code, Transform parent, UIEventListener.VoidDelegate onOKClick)
    {
        string message = ErrorMessage.Instance.GetMessage(code);

        if (message == null || message == string.Empty)
        {
            message = string.Format(CommonFunction.GetConstString(code.ToString()), code);
        }

        if (parent == null)
        {
            parent = UIManager.Instance.m_uiRootBasePanel.transform;
        }

        return(ShowPopupMsg(message, parent, onOKClick, null, CommonFunction.GetConstString("BUTTON_OK"), ""));
    }