Esempio n. 1
0
 protected BaseShotter()
 {
     try {
         _keyboard = KeyboardListenerFactory.Get();
         _keyboard.WatchFor(Keys.Escape);
         _keyboard.KeyUp += OnKeyUp;
     } catch (Exception e) {
         AcToolsLogging.Write("Can’t set listener: " + e);
     }
 }
Esempio n. 2
0
 public MemoryListener()
 {
     try {
         _keyboard = KeyboardListenerFactory.Get();
         _keyboard.WatchFor(Keys.Escape);
         _keyboard.PreviewKeyDown += OnKeyDown;
         _keyboard.PreviewKeyUp   += OnKeyUp;
     } catch (Exception e) {
         Logging.Error(e);
     }
 }
Esempio n. 3
0
            public MemoryListener(CancellationTokenSource sharedCancellationTokenSource)
            {
                _sharedCancellationTokenSource = sharedCancellationTokenSource;

                try {
                    _keyboard = KeyboardListenerFactory.Get();
                    _keyboard.WatchFor(Keys.Escape);
                    _keyboard.KeyUp += OnKeyUp;
                } catch (Exception e) {
                    Logging.Error(e);
                }

                AcSharedMemory.Instance.Start += OnStart;
            }