예제 #1
0
    private void handleSubmit(string value)
    {
        currentString = "";

        OnStringChanged?.Invoke(currentString);

        target?.StringSubmitted(value);
    }
예제 #2
0
    private void handleKeyPressed(char c)
    {
        if (char.IsWhiteSpace(c) && c != ' ')
        {
            return;
        }

        currentString += c;

        OnStringChanged?.Invoke(currentString);

        target?.KeyPressed(c);
    }
예제 #3
0
    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();
    }
예제 #4
0
 public void Clear()
 {
     currentString = "";
     OnStringChanged?.Invoke(currentString);
 }