public HookManager(ServerEventDispatcher dispatcher, VirtualScreenManager screen)
 {
     _dispatcher = dispatcher;
     _screen     = screen;
     Hook        = new WindowsGlobalHook();
     ClientState = screen.State;
 }
Пример #2
0
 public ServerEventReceiver(VirtualScreenManager screen, IDeviceOption device)
 {
     this.option = device;
     _hook       = new WindowsGlobalHook();
     _screen     = screen;
     cts         = new CancellationTokenSource();
     state       = screen.State;
 }
Пример #3
0
 public ServerEventReceiver(VirtualScreenManager screen)
 {
     _hook         = new WindowsGlobalHook();
     _screen       = screen;
     messageHandle = new EventWaitHandle(false, EventResetMode.AutoReset, null);
     messages      = new System.Collections.Concurrent.ConcurrentQueue <IMessage>();
     cts           = new CancellationTokenSource();
     state         = screen.State;
 }
Пример #4
0
 public HookManager(ServerEventDispatcher dispatcher, VirtualScreenManager screen)
 {
     _dispatcher = dispatcher;
     _screen     = screen;
     if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
     {
         Hook = new WindowsGlobalHook();
     }
     if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
     {
         Hook = new OsxGlobalHook();
     }
 }