private IOperation BuildKeyboardInterceptorOperation()
        {
            var keyboardInterceptor = new KeyboardInterceptor(ModuleLogger(nameof(KeyboardInterceptor)), nativeMethods, context.Settings.Keyboard);
            var operation           = new KeyboardInterceptorOperation(context, keyboardInterceptor, logger);

            return(operation);
        }
示例#2
0
        private IOperation BuildKeyboardInterceptorOperation()
        {
            var keyboardInterceptor = new KeyboardInterceptor(configuration.Settings.Keyboard, new ModuleLogger(logger, nameof(KeyboardInterceptor)));
            var operation           = new KeyboardInterceptorOperation(keyboardInterceptor, logger, nativeMethods);

            return(operation);
        }
示例#3
0
 static void Main()
 {
     KeyboardInterceptor.Start();
     MouseInterceptor.Start();
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Application.Run(new Form1());
     KeyboardInterceptor.Stop();
     MouseInterceptor.Stop();
 }
示例#4
0
        protected override void Initialize()
        {
            keyboardInterceptor              = new KeyboardInterceptor();
            keyboardInterceptor.OnKeyAction += OnKeyboardIntercept;
#if RELEASE
            graphics.PreferredBackBufferWidth  = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width;
            graphics.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height;
            graphics.ToggleFullScreen();
#endif

            base.Initialize();
        }
示例#5
0
        public void Start()
        {
            key = new KeyboardInterceptor();

            key.KeyDown  += key_KeyDown;
            key.KeyUp    += key_KeyUp;
            key.KeyPress += key_KeyPress;

            key.StartCapturing();

            Console.WriteLine("[Hooky] Started Hooky.");
            Application.Run();
        }
示例#6
0
        public void Start()
        {
            _key = new KeyboardInterceptor();

            _key.KeyDown  += Key_KeyDown;
            _key.KeyUp    += Key_KeyUp;
            _key.KeyPress += Key_KeyPress;

            _key.StartCapturing();

            _logger.LogInformation("Started.");
            Application.Run();
        }
        public WindowsEnhancementApplicationContext()
        {
            // Hotkeys initialisieren
            this.keyboadHook          = new KeyboardInterceptor();
            this.keyboadHook.KeyDown += keyboadHookOnKeyDown;

            this.keyboadHook.StartCapturing();

            // Services initialisieren
            this.fileAndImageSaveService = new FileAndImageSaveService();
            this.fileCreateService       = new FileCreateService();
            this.fileAndImageViewService = new FileAndImageViewService();
            this.explorerBrowserService  = new ExplorerBrowserService();

            // TrayIcon etc. initalisieren
            this.initializeComponents();

            // Events hinzufügen
            Application.ApplicationExit += this.applicationOnApplicationExit;
        }
示例#8
0
 public static void SetupKeyboardHook()
 {
     _interceptor          = new KeyboardInterceptor();
     _interceptor.KeyDown += VirtualKeyboardOnKeyDown;
     _interceptor.StartCapturing();
 }
示例#9
0
 public KeyboardHookClass(ILoger Loger)
 {
     this.Loger        = Loger;
     Capturer          = new KeyboardInterceptor();
     Capturer.KeyDown += Capturer_KeyDown;
 }
示例#10
0
        static void SetupKeyboardInterceptor()
        {
            KeyboardInterceptor keyboardInterceptor = new KeyboardInterceptor();

            keyboardInterceptor.Start();
        }