public void StartSending() { timer.Start(); mousekeyTimer.Start(); HookMouse.Stop(); HookKeyboard.Stop(); IsClient = true; }
private void UnInstallHook() { if (this._hookMouse != null) { this._hookMouse.OnMouseActivity -= new MouseEventHandler(_hookMouse_OnMouseActivity); this._hookMouse.UnInstallHook(); this._hookMouse = null; } }
private void InstallHook() { if (this._hookMouse == null) { this._hookMouse = new HookMouse(); } this._hookMouse.OnMouseActivity -= new MouseEventHandler(_hookMouse_OnMouseActivity); this._hookMouse.OnMouseActivity += new MouseEventHandler(_hookMouse_OnMouseActivity); this._hookMouse.InstallHook(); }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { mainWindow.Remote.IsEnabled = true; if (mousekeyTimer != null) { mousekeyTimer.Stop(); } if (timer != null) { timer.Stop(); } if (rtpClient != null) { rtpClient.Dispose(); } HookKeyboard.Stop(); HookMouse.Stop(); udp.SendMessageTo(UDP.EndRemote, remoteIP); // IsClient = true; }
public void Start() { udp.SendMessageTo(UDP.Remote, remoteIP); HookMouse.Start(); HookKeyboard.Start(); }