Example #1
0
        public void AddContent(LogKey key)
        {
            var al = GetActiveLine();

            al.AddContent(key);
            CDTimer.Reset();
        }
Example #2
0
 public void AddContent(LogKey key)
 {
     if (EndRecord != null)
     {
         throw new InvalidOperationException("Can't add content to a closed record.");
     }
     Content.Add(key);
 }
Example #3
0
        /// <summary>
        ///     Handles a key press event
        /// </summary>
        private void OnKeyPress(BaseKeyboardManager sender, HotkeyEventArgs args) {
            //handles which process was it hit on,

            var topmost = ProcessFinder.GetForegroundProcess().ToProcessInfo();

            var topmost_log = ActiveLogs.FirstOrDefault(log => log.Process.Equals(topmost));
            if (topmost_log == null) {
                ActiveLogs.Add(topmost_log = new ProcessLog() {Process = topmost});
                topmost_log.LineClosed += line => LineClosed?.Invoke(line);
            }
            //Convert Hotkey to LogKey - includes in keyboardlayout
            var lk = new LogKey { Key = args.Hotkey.Key, Modifiers = args.Hotkey.Modifiers, KeyboardLayout = KeyboardLanguage.GetCurrentKeyboardLayout() }; //67699721 hebrew?
            topmost_log.AddContent(lk);
        }
Example #4
0
        /// <summary>
        ///     Handles a key press event
        /// </summary>
        private void OnKeyPress(BaseKeyboardManager sender, HotkeyEventArgs args)
        {
            //handles which process was it hit on,

            var topmost = ProcessFinder.GetForegroundProcess().ToProcessInfo();

            var topmost_log = ActiveLogs.FirstOrDefault(log => log.Process.Equals(topmost));

            if (topmost_log == null)
            {
                ActiveLogs.Add(topmost_log = new ProcessLog()
                {
                    Process = topmost
                });
                topmost_log.LineClosed += line => LineClosed?.Invoke(line);
            }
            //Convert Hotkey to LogKey - includes in keyboardlayout
            var lk = new LogKey {
                Key = args.Hotkey.Key, Modifiers = args.Hotkey.Modifiers, KeyboardLayout = KeyboardLanguage.GetCurrentKeyboardLayout()
            };                                                                                                                                              //67699721 hebrew?

            topmost_log.AddContent(lk);
        }
Example #5
0
 public void AddContent(LogKey key) {
     if (EndRecord != null)
         throw new InvalidOperationException("Can't add content to a closed record.");
     Content.Add(key);
 }
Example #6
0
 public void AddContent(LogKey key) {
     var al = GetActiveLine();
     al.AddContent(key);
     CDTimer.Reset();
 }