protected BaseShotter() { try { _keyboard = KeyboardListenerFactory.Get(); _keyboard.WatchFor(Keys.Escape); _keyboard.KeyUp += OnKeyUp; } catch (Exception e) { AcToolsLogging.Write("Can’t set listener: " + e); } }
public MemoryListener() { try { _keyboard = KeyboardListenerFactory.Get(); _keyboard.WatchFor(Keys.Escape); _keyboard.PreviewKeyDown += OnKeyDown; _keyboard.PreviewKeyUp += OnKeyUp; } catch (Exception e) { Logging.Error(e); } }
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; }