Esempio n. 1
0
 public override void ClosePanel(bool animation = true)
 {
     this.inputNickName.value = this.TrimmingSpaceChar(this.inputNickName.value, "[ \n]");
     this.inputComment.value  = this.TrimmingSpaceChar(this.inputComment.value, "[\n]");
     CMD_Profile.CheckInputCharResult checkInputCharResult = this.CheckInputChar(this.inputComment.value, 0, CMD_Profile.COMMENT_LENGTH_MAX);
     checkInputCharResult = ((checkInputCharResult != CMD_Profile.CheckInputCharResult.OK) ? checkInputCharResult : this.CheckInputChar(this.inputNickName.value, CMD_Profile.NICK_NAME_LENGTH_MIN, CMD_Profile.NICK_NAME_LENGTH_MAX));
     if (checkInputCharResult != CMD_Profile.CheckInputCharResult.OK)
     {
         this.ShowErrorPopUp(checkInputCharResult);
         this.RefreshComponents();
     }
     else
     {
         bool flag  = this.IsUpdateNickName();
         bool flag2 = this.IsUpdateComment();
         if (flag || flag2)
         {
             this.OpenDialogSubmitConfirm(flag, flag2, new Action <int>(this.OnCloseNicknameUpdate));
         }
         else
         {
             CMD_Profile.instance = null;
             base.ClosePanel(animation);
         }
     }
 }
Esempio n. 2
0
 public void OnDecisionNickname()
 {
     this.inputNickName.value = this.TrimmingSpaceChar(this.inputNickName.value, "[ \n]");
     CMD_Profile.CheckInputCharResult checkInputCharResult = this.CheckInputChar(this.inputNickName.value, CMD_Profile.NICK_NAME_LENGTH_MIN, CMD_Profile.NICK_NAME_LENGTH_MAX);
     if (checkInputCharResult != CMD_Profile.CheckInputCharResult.OK)
     {
         this.ShowErrorPopUp(checkInputCharResult);
         this.inputNickName.value = this.inputTextBackup;
     }
 }
Esempio n. 3
0
 public void OnDecisionComment()
 {
     this.inputComment.value = this.TrimmingSpaceChar(this.inputComment.value, "[\n]");
     CMD_Profile.CheckInputCharResult checkInputCharResult = this.CheckInputChar(this.inputComment.value, 0, CMD_Profile.COMMENT_LENGTH_MAX);
     if (checkInputCharResult != CMD_Profile.CheckInputCharResult.OK)
     {
         this.ShowErrorPopUp(checkInputCharResult);
         this.inputComment.value = this.inputTextBackup;
     }
 }
Esempio n. 4
0
 private CMD_Profile.CheckInputCharResult CheckInputChar(string text, int min, int limit)
 {
     CMD_Profile.CheckInputCharResult result = CMD_Profile.CheckInputCharResult.OK;
     if (TextUtil.SurrogateCheck(text))
     {
         result = CMD_Profile.CheckInputCharResult.FORBIDDEN_CHAR;
     }
     else if (limit < text.Length)
     {
         result = CMD_Profile.CheckInputCharResult.LIMIT_OVER;
     }
     else if (min > text.Length)
     {
         result = CMD_Profile.CheckInputCharResult.FEW_CHAR;
     }
     return(result);
 }
Esempio n. 5
0
 private void ShowErrorPopUp(CMD_Profile.CheckInputCharResult checkResult)
 {
     if (checkResult != CMD_Profile.CheckInputCharResult.FORBIDDEN_CHAR)
     {
         if (checkResult != CMD_Profile.CheckInputCharResult.LIMIT_OVER)
         {
             if (checkResult == CMD_Profile.CheckInputCharResult.FEW_CHAR)
             {
                 AlertManager.ShowAlertDialog(null, "E-US07");
             }
         }
         else
         {
             AlertManager.ShowAlertDialog(null, "E-US18");
         }
     }
     else
     {
         AlertManager.ShowAlertDialog(null, "E-US17");
     }
 }