public void Initialize(ref WebCam cam) { this.cam = cam; this.tcpListener = new TcpListener(GetLocalIP(), this.port); this.listenThread = new Thread(new ThreadStart(ListenForClients)); this.listenThread.Start(); }
public Server() { InitializeComponent(); this.webCam = new WebCam(); this.webCam.Initialize(ref this.ServerCam); this.networkManager = new NetworkManager(); this.networkManager.Initialize(ref this.webCam); this.timer = new Timer(); this.timer.Tick += UpdateImage; this.timer.Interval = this.updateInterval; this.timer.Start(); this.dateTimer = new Timer(); this.dateTimer.Tick += UpdateDate; this.dateTimer.Interval = 1000; this.dateTimer.Start(); }