private void TextBoxKeyUp(object sender, KeyEventArgs e) { DetermineTextColor(); if (string.IsNullOrEmpty(_logEntryTextBox.Text)) { ResetHotKeyState(); } if (e.KeyCode != Keys.Enter) { return; } var input = _logEntryTextBox.Text; if (_inputParser.TryParse(input, out var logEntry)) { _timeLoggedHandler.HandleTimeLogged(logEntry); ClearTextBox(); ResetHotKeyState(); } }
public void wrong_input_input_layouts(string input) { Assert.IsFalse(_logEntryInputParser.TryParse(input, out _)); }