private void handleSubmit(string value) { currentString = ""; OnStringChanged?.Invoke(currentString); target?.StringSubmitted(value); }
private void handleKeyPressed(char c) { if (char.IsWhiteSpace(c) && c != ' ') { return; } currentString += c; OnStringChanged?.Invoke(currentString); target?.KeyPressed(c); }
private void handleBackspace() { if (currentString.Length == 0) { return; } if (currentString.Length == 1) { currentString = ""; } else { currentString = currentString.Substring(0, currentString.Length - 2); } OnStringChanged?.Invoke(currentString); target?.Backspace(); }
public void Clear() { currentString = ""; OnStringChanged?.Invoke(currentString); }