Example #1
0
    //新版本:强制用户登录版使用函数
    public void Refresh2()
    {
        loginBtn.gameObject.SetActive(false);
        Debug.Log("***		Jack Wen		***");
#if UNITY_ANDROID
        if (AndroidConfig.isLogin())
#else
        if (AccountManager.Instance.CurAccount != null)
#endif
        {
            //loginBtn.gameObject.SetActive(false);
            AccountManager.Instance.HideLoginUI();

            //小米渠道隐藏注销按钮  lihao_yd  2013-12-12
#if UNITY_ANDROID
            if (AndroidConfig.isXiaoMiChannel() || AndroidConfig.isSogouChannel())
            {
                Debug.Log("----Refresh-UI-xiaomi-hide-logoutBtn");
                logoutBtn.gameObject.SetActive(false);
            }
            else
            {
                logoutBtn.gameObject.SetActive(true);
            }
#else
            logoutBtn.gameObject.SetActive(true);
#endif
            accountBtn.gameObject.SetActive(true);
#if UNITY_ANDROID
            if (hideAccountBtn())
            {
                return;
            }
#endif
            string email = AccountManager.Instance.CurAccount.email;
            email = AccountInfo.Base64Decode(email);

            userName.text = email;

            Debug.Log("userName: "******"userName: NULL");
        }

        Debug.Log("***		End		***");
    }
    void OnEnable()
    {
        mainUILogic = GameObject.Find("MainUILogic");
        UILabel account = transform.FindChild("Label").GetComponent <UILabel>();

#if UNITY_ANDROID
        account.text = AndroidConfig.getBindAccount();
#else
        account.text = AccountInfo.Base64Decode(AccountManager.Instance.CurAccount.email);
#endif
    }
    public string GetCurEmail()
    {
        string email = "";

        if (null != mCurAccount)
        {
            email = mCurAccount.email;
        }
        else
        {
            email = PlayerPrefs.GetString(AccountEmailKey + "Cur");
        }
        return(AccountInfo.Base64Decode(email));
    }
Example #4
0
    public void Refresh()
    {
#if UNITY_ANDROID
        if (AndroidConfig.isLogin())
#else
        if (AccountManager.Instance.CurAccount != null && !string.IsNullOrEmpty(AccountManager.Instance.CurAccount.email))
#endif
        {
            loginBtn.gameObject.SetActive(false);
            //小米渠道隐藏注销按钮  lihao_yd  2013-12-12
#if UNITY_ANDROID
            if (AndroidConfig.isXiaoMiChannel() || AndroidConfig.isSogouChannel())
            {
                Debug.Log("----Refresh-UI-xiaomi-hide-logoutBtn");
                logoutBtn.gameObject.SetActive(false);
            }
            else
            {
                logoutBtn.gameObject.SetActive(true);
            }
#else
            logoutBtn.gameObject.SetActive(true);
#endif
            accountBtn.gameObject.SetActive(true);

#if UNITY_ANDROID
            if (hideAccountBtn())
            {
                return;
            }
#endif
            string email = AccountManager.Instance.CurAccount.email;
            email = AccountInfo.Base64Decode(email);

            userName.text = email;
        }
        else
        {
            loginBtn.gameObject.SetActive(true);

#if UNITY_ANDROID
            AndroidConfig.channelLogin();
            showLoginBtn();
#endif
            logoutBtn.gameObject.SetActive(false);
            accountBtn.gameObject.SetActive(false);
        }
    }
Example #5
0
    void OnEnable()
    {
        buttonForget.SetActive(false);
        passwordInput.text = "";
        userNameList.items.Clear();
        foreach (AccountInfo info in AccountManager.Instance.AccountList)
        {
            if (string.IsNullOrEmpty(info.email))
            {
                continue;
            }
            string email = info.email;
            email = AccountInfo.Base64Decode(email);

            userNameList.items.Add(email);
            if (info.listIndex == 0)
            {
                ChangeUserName(email);
            }
        }
        AccountManager.Instance.lastWindow = AccountManager.WindowType.MANAGER;
    }