private void ReceiveScreen_OnClick(object Sender, RoutedEventArgs E) { ScreenCast?.Stop(); ScreenCast = new ScreenCast(IPAddress.Parse(Ip.Text)); ScreenCastWindow scw = new ScreenCastWindow(); ScreenCast.OnFrameChange += (s) => { scw.Dispatcher.Invoke(() => { scw.ScreenCast_OnFrameChange(s); }); }; scw.Show(); ScreenCast.ReceiveAsync(); }
private void ReceiveWebCam_OnClick(object Sender, RoutedEventArgs E) { WebCamCast?.Stop(); AudioChat.Start(); WebCamCast = new WebCamCast(IPAddress.Parse(Ip.Text)); ScreenCastWindow scw = new ScreenCastWindow(); WebCamCast.OnFrameChange += (s) => { scw.Dispatcher.Invoke(() => { scw.ScreenCast_OnFrameChange(s); }); }; scw.Closed += Scw_Closed; scw.Show(); WebCamCast.ReceiveAsync(); }