void SubmitRegister()
        {
            if (IsFirstInput)
            {
                noPass.gameObject.SetActive(true);
                MsgInfoManager.Instance.ShowMsg((int)ERROR_TYPE.eT_FillInNiceName);
                return;
            }
            if (!CheckNameInput())
            {
                noPass.gameObject.SetActive(true);
                MsgInfoManager.Instance.ShowMsg((int)ERROR_TYPE.eT_FillInNiceName);
                return;
            }



            List <string> split   = GameMethod.GetSplit();
            string        currStr = nickNameInput.value;

            foreach (string item in split)
            {
                int currPos = currStr.IndexOf(item, StringComparison.OrdinalIgnoreCase);
                if (currPos > -1)
                {
                    MsgInfoManager.Instance.ShowMsg(-130861);
                    return;
                }
            }
            IGuideTaskManager.Instance().SendTaskEnd(EGameEvent.eGameEvent_UIGuideCommitRegisterEnd);

            byte[] bytes = Encoding.UTF8.GetBytes(nickNameInput.label.text);
            CGLCtrl_GameLogic.Instance.GameCompleteBaseInfo(SelectServerData.Instance.serverUin, bytes, Convert.ToInt32(spriteHead.spriteName), isBoy);
        }
Ejemplo n.º 2
0
        private void SureClickBtn(GameObject go)
        {
            if (string.Compare(mNewTemp.value.Trim(), "请输入要更换的昵称") == 0 || string.Compare(mNewTemp.value.Trim(), "输入新的昵称") == 0)
            {
                return;
            }
            if (mNewTemp == null || mNewTemp.value.Trim() == "" || string.IsNullOrEmpty(mNewTemp.value.Trim()))
            {
                MsgInfoManager.Instance.ShowMsg(-130977);
                return;
            }
            if (string.Compare(mNewTemp.value, GameUserModel.Instance.GameUserNick) == 0)
            {
                MsgInfoManager.Instance.ShowMsg(10032);
                return;
            }
            List <string> split   = GameMethod.GetSplit();
            string        currStr = mNewTemp.value;

            foreach (string item in split)
            {
                int currPos = currStr.IndexOf(item, StringComparison.OrdinalIgnoreCase);
                if (currPos > -1)
                {
                    MsgInfoManager.Instance.ShowMsg(-130861);
                    return;
                }
            }
            PresonInfoCtrl.Instance.ChangeNickName(mNewTemp.value);
            mNewTemp.value = "输入新的昵称";
        }