private bool CheckTextIfEmpty(string text, TextBoxType type) { if (text.Replace(" ", "").Length <= 0) { ShowWarningMessage($"{type.ToString()}을(를) 다시 입력해주세요. 원인 : {ErrorType.공란}", "틀렸다 닝겐"); return(false); } else { return(true); } }
private bool CheckTextIfValid(string text, TextBoxType type) { bool isTextValid = true; switch (type) { case TextBoxType.잔여금액: if (text.Equals("") || int.Parse(text) < 0) { ShowWarningMessage($"{type.ToString()}을(를) 다시 입력해주세요. 원인 : {ErrorType.유효하지않음}", "틀렸다 닝겐"); isTextValid = false; } break; case TextBoxType.핸드폰번호: if (text.Length > 11) { ShowWarningMessage($"{type.ToString()}을(를) 다시 입력해주세요. 원인 : {ErrorType.유효하지않음}", "틀렸다 닝겐"); isTextValid = false; } break; } return(isTextValid); }
public int AddHudText(TextBoxType boxType, string text) { HudTextBox theBox = GetHudTextOfType(boxType); //TODO: DANGEROUS HARD-CODED NUMBER //TODO: DANGEROUS HARD-CODED NUMBER if (theBox == null) { Debug.LogError("Attempted AddHudText but could not find requested HudTextBoxType: " + boxType.ToString()); //TODO: DANGEROUS HARD-CODED NUMBER return(int.MaxValue); } //TODO: DANGEROUS HARD-CODED NUMBER //TODO: DANGEROUS HARD-CODED NUMBER int ID = _nextHudTextID; _nextHudTextID++; theBox.AddText(ID, text); return(ID); }