Beispiel #1
0
        /// <summary>
        /// Creates a new instance of <see cref="MouseKeyHook"/>.
        /// </summary>
        public MouseKeyOverlay(IMouseKeyHook Hook,
                               MouseClickSettings MouseClickSettings,
                               KeymapViewModel Keymap,
                               string FileName,
                               Func <TimeSpan> Elapsed)
        {
            _keymap = Keymap;

            _hook = Hook;
            _mouseClickOverlay = new MouseClickOverlay(_hook, MouseClickSettings);
            _scrollOverlay     = new ScrollOverlay(_hook, MouseClickSettings);
        }
Beispiel #2
0
        /// <summary>
        /// Creates a new instance of <see cref="MouseKeyHook"/>.
        /// </summary>
        public MouseKeyOverlay(IMouseKeyHook Hook,
                               MouseClickSettings MouseClickSettings,
                               KeystrokesSettings KeystrokesSettings,
                               KeymapViewModel Keymap,
                               string FileName,
                               Func <TimeSpan> Elapsed)
        {
            _keystrokesSettings = KeystrokesSettings;
            _keymap             = Keymap;

            _hook = Hook;
            _mouseClickOverlay = new MouseClickOverlay(_hook, MouseClickSettings);
            _scrollOverlay     = new ScrollOverlay(_hook, MouseClickSettings);

            if (KeystrokesSettings.SeparateTextFile)
            {
                _textWriter = InitKeysToTextFile(FileName, Elapsed);
            }
            else
            {
                _keyOverlay = new KeyOverlay(_hook, KeystrokesSettings, Keymap);
            }
        }