internal static void Init(AnonIpcClient client) { ISLogger.SetLogFileName("InputshareSP_DefaultHost.log"); ISLogger.Write("Starting SP default host"); iClient = client; outMan = new WindowsOutputManager(); outMan.Start(); deskThread = new ActiveDesktopThread(); deskThread.Invoke(() => { Desktop.SwitchDesktop(Desktop.InputDesktop); }); outputDeskThread = new ActiveDesktopThread(); outputDeskThread.Invoke(() => { Desktop.SwitchDesktop(Desktop.InputDesktop); }); hWindow = new HookWindow("SPDesktopWatcher"); hWindow.InitWindow(); hWindow.InstallDesktopMonitor(); hWindow.DesktopSwitchEvent += HWindow_DesktopSwitchEvent; iClient.Disconnected += IClient_Disconnected; iClient.InputReceived += IClient_InputReceived; deskThread.Invoke(() => { GetDisplayConfig(); }); cursorPosUpdateTimer = new Timer((object o) => { CheckCursorPosition(); }, 0, 0, 50); displayCheckTimer = new Timer((object o) => { CheckForDisplayConfigChange(); }, 0, 0, 1500); while (true) { Thread.Sleep(5000); } }
public KeyboardHook() { _hookWindow = new HookWindow(); _hookWindow.KeyPressed += (object sender, KeyPressedEventArgs e) => { KeyPressed?.Invoke(this, e); }; }
private void hookChar_Button_Click(object sender, RoutedEventArgs e) { if (apiHook == null) { HookWindow hookWindow = new HookWindow(); hookWindow.Show(); this.IsEnabled = false; } }
public HotkeyHook() { _window = new HookWindow(); _window.CreateHandle(new CreateParams()); _window.KeyPressed += (sender, args) => { if (KeyPressed != null) { KeyPressed(this, args); } }; }
public HotkeyHook() { _window = new HookWindow(); _window.CreateHandle(new CreateParams()); _window.KeyPressed += (sender, args) => { if (KeyPressed != null) { KeyPressed(this, args); } }; }
public override void Start() { if (Running) { throw new InvalidOperationException("Clipboard manager already running"); } cbHookWindow = new HookWindow("ClipboardManager window"); cbHookWindow.HandleCreated += CbHookWindow_HandleCreated; Running = true; }
public void HookChar(int procID) { HookWindow HookWindow = App.Current.Windows[1] as HookWindow; EliteAPI instance; try { instance = new EliteAPI(procID); MainWindow.CatchAPIHook(instance); HookWindow.Close(); } catch { System.Windows.MessageBox.Show("Unable to hook character.\nAre you running as administrator?"); } }
protected override void OnStart() { cbHookWindow = new HookWindow("ClipboardManager window"); cbHookWindow.HandleCreated += CbHookWindow_HandleCreated; cbHookWindow.InitWindow(); }