public void FacebookLoginCallBack()
    {
        string fbuserid = AccountInfo.Base64Encode(FB.UserId);
        string fbtoken  = AccountInfo.Base64Encode(FB.AccessToken);

        NetworkSender.Instance().BindCyouAccount(FacebookBindDone, -1, fbuserid, fbtoken, PlayerPrefs.GetString("ACCOUNT_ID"));
    }
Пример #2
0
    public void Login()
    {
        string userName = AccountInfo.Base64Encode("*****@*****.**");
        string password = AccountInfo.Base64Encode("123456");

        NetworkSender.Instance().CyouLogin(ProvingPasswordRet, 1, userName, password, PlayerPrefs.GetString("ACCOUNT_ID"));
    }
Пример #3
0
    public void GameLoginCallBack(bool issuccess)
    {
        string fbuserid  = AccountInfo.Base64Encode(FB.UserId);
        string fbtoken   = AccountInfo.Base64Encode(FB.AccessToken);
        string accountID = PlayerPrefs.GetString(HTTPClientAPI.uri.ToString() + "_Guest");

        NetworkSender.Instance().BindCyouAccount(FacebookBindDone, -1, fbuserid, fbtoken, accountID);
    }
    void FacebookLoginCallBack()
    {
        Debug.Log("fb OnGameLogin");
        string email = AccountInfo.Base64Encode(FB.UserId);

        NetworkSender.Instance().CyouLogin(OnGameLoginDone,
                                           -1, email, FB.AccessToken,
                                           PlayerPrefs.GetString("ACCOUNT_ID"));
    }
Пример #5
0
 public void OnGuestLoginDone(bool bSuccess)
 {
     if (bSuccess)
     {
         if (Obj_MyselfPlayer.GetMe().cyouCode == 0)
         {
             userName = userNameInput.text;                 //WML MARK
             password = passwordInput.text;
             userName = AccountInfo.Base64Encode(userName);
             password = AccountInfo.Base64Encode(password);
             string accountID = PlayerPrefs.GetString(HTTPClientAPI.uri.ToString() + "_Guest");
             NetworkSender.Instance().BindCyouAccount(OnLoginRet, 1, userName, password, accountID);
         }
     }
 }
    public void OnLoginBtn()
    {
        if (string.IsNullOrEmpty(userNameInput.text))
        {
            //BoxManager.showMessage("用户名不能为空");
            BoxManager.showMessageByID((int)MessageIdEnum.Msg22);
            return;
        }
        if (string.IsNullOrEmpty(passwordInput.text))
        {
            //BoxManager.showMessage("密码不能为空");
            BoxManager.showMessageByID((int)MessageIdEnum.Msg23);
            return;
        }
        userName = userNameInput.text;         //WML MARK
        password = passwordInput.text;

        userName = AccountInfo.Base64Encode(userName);
        password = AccountInfo.Base64Encode(password);

        FbHelper.CallFBLogout();

        NetworkSender.Instance().BindCyouAccount(OnLoginRet, 1, userName, password, PlayerPrefs.GetString("ACCOUNT_ID"));
    }
Пример #7
0
    public void OnLoginBtn()
    {    /*
          *     if(string.IsNullOrEmpty(userNameList.selection))
          *     {
          * //			BoxManager.showMessage("用户名不能为空");
          *             BoxManager.showMessageByID((int)MessageIdEnum.Msg22);
          *             return;
          *     }
          *     if(string.IsNullOrEmpty(passwordInput.text))
          *     {
          * //			BoxManager.showMessage("密码不能为空");
          *             BoxManager.showMessageByID((int)MessageIdEnum.Msg23);
          *             return;
          *     }*/
        AccountManager.AccountState usernameState;
        AccountManager.AccountState passwordState;
        usernameState = AccountManager.CheckUsername(userNameList.selection);
        passwordState = AccountManager.CheckPassword(passwordInput.text);
        switch (usernameState)
        {
        case AccountManager.AccountState.NONE:
            break;

        case AccountManager.AccountState.NULLOREMPTY:
            BoxManager.showMessageByID((int)MessageIdEnum.Msg22);
            return;

        case AccountManager.AccountState.TOOSHORT:
            BoxManager.showMessageByID((int)MessageIdEnum.Msg29);
            return;

        case AccountManager.AccountState.TOOLONG:
            BoxManager.showMessageByID((int)MessageIdEnum.Msg30);
            return;

        case AccountManager.AccountState.NOTEMAIL:
            BoxManager.showMessage("请使用正确的邮箱格式", "账号格式错误");
            return;

        default:
            BoxManager.showMessage("账号应为5-16位小写字母、数字、下划线组成", "账号格式错误");           //WML MARK
            return;
        }
        switch (passwordState)
        {
        case AccountManager.AccountState.NONE:
            break;

        case AccountManager.AccountState.NULLOREMPTY:
            BoxManager.showMessageByID((int)MessageIdEnum.Msg23);
            return;

        case AccountManager.AccountState.TOOSHORT:
            BoxManager.showMessageByID((int)MessageIdEnum.Msg33);
            return;

        case AccountManager.AccountState.TOOLONG:
            BoxManager.showMessageByID((int)MessageIdEnum.Msg34);
            return;

        default:
            BoxManager.showMessage("密码应为4-16位,且不包含空格、逗号、单双引号", "密码格式错误");           //WML MARK
            return;
        }

        userName = AccountInfo.Base64Encode(sUserName);
        password = AccountInfo.Base64Encode(passwordInput.text);

        //注销fb信息;
        FbHelper.CallFBLogout();

        Debug.Log("cyouLogin loginBtn *** username = "******"; password = "******"ACCOUNT_ID"));
    }