public void WriteSpecialKey(KeyLogEntry keyLogEntry) { lock (_logEntriesLock) { if (_stringBuilder != null && _stringBuilder.Length > 0) { ((NormalText)_currentEntry).Text = _stringBuilder.ToString(); _stringBuilder.Length = 0; } _currentEntry = keyLogEntry; LogEntries.Add(keyLogEntry); } CheckForWrite(); }
public void WindowChanged(string title) { lock (_logEntriesLock) { if (_stringBuilder != null && _stringBuilder.Length > 0) { ((NormalText)_currentEntry).Text = _stringBuilder.ToString(); _stringBuilder.Length = 0; } var entry = new WindowChanged(title); _currentEntry = entry; LogEntries.Add(entry); } CheckForWrite(); }
public void WriteString(string s) { lock (_logEntriesLock) { if (_stringBuilder == null) { _stringBuilder = new StringBuilder(); } var textEntry = _currentEntry as NormalText; if (textEntry == null) { _currentEntry = new NormalText(); LogEntries.Add(_currentEntry); _stringBuilder.Length = 0; } _stringBuilder.Append(s); } CheckForWrite(); }