private void CloseClient() { if (rtpClient != null) { rtpClient.Started -= started; rtpClient.Stopped -= stoped; rtpClient = null; } throw new NotImplementedException(); }
async private void button_Click(object sender, RoutedEventArgs e) { CloseClient(); SimpleVideoClient rtpClient = new SimpleVideoClient(); progressRing.Visibility = Visibility.Visible; progressRing.IsActive = true; var rtpUri = uriTextBox.Text; started = rtpClient.Started += new EventHandler <SimpleVideoClientStartedEventArgs>(this, OnStarted); stoped = rtpClient.Stopped += new EventHandler <SimpleVideoClientStoppedEventArgs>(this, OnStopped); Uri urr = new Uri(rtpUri); await rtpClient.ConnectAsync(urr); }
public MainPage() { this.InitializeComponent(); SimpleVideoClient rtpClient = new SimpleVideoClient(); }