public ClientReadThread(ClientSession client) { this.client = client; this.ffmpeg = client.FFMpeg; this.screen = client.VideoScreen; this.decoder = null; this.socket = null; this.stream = null; }
public InputCapture(ClientSession client) { this.client = client; this.input = new Input(); input.KeyboardFilterMode = KeyboardFilterMode.All; input.Load(); input.OnKeyPressed += new EventHandler<KeyPressedEventArgs>(OnKeyPressed); }
/// <summary> /// Shows a dialog and connects a ClientSession to begin /// playback. /// </summary> public bool StartClient() { if (clientSession != null) { clientSession.StopClient(); clientSession = null; } sessionDialog.addressBox.Text = "localhost"; sessionDialog.portBox.Text = "9999"; sessionDialog.finishButton.Text = "Connect"; switch (sessionDialog.ShowDialog()) { case DialogResult.OK: break; default: return false; } int portNumber; try { portNumber = int.Parse(sessionDialog.portBox.Text); } catch (Exception e) { Console.WriteLine(e); portNumber = 9999; } videoScreen.SetVideoSize(800, 600); clientSession = new ClientSession(this, sessionDialog.addressBox.Text, portNumber); clientSession.StartClient(); statusLabel.Text = "Connecting..."; recordItem.Enabled = false; connectItem.Text = "Disconnect"; Refresh(); return true; }