コード例 #1
0
 /// <summary>
 /// It initializes set GUI component values and creates new instance of MediaStreamSender for send media data through server in further action.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void conWindow_ConnectedSuccessfully(object sender, GenericEventArgs<MediaConnection> e)
 {
     connection = e.Item;
     rectOffline.Visibility = System.Windows.Visibility.Collapsed;
     lblNickName.Text = conWindow.txtNickName.Text;
     txtChatLog.Text += "Connected successfuly.\n";
     connection.Client = this;
     connection.InvokeOnConnection("GetConnectedClients",lblNickName.Text);
     streamSender=new MediaStreamSender(connection);
     streamSender.StreamStateChanged += new EventHandler<GenericEventArgs<StreamState>>(streamSender_StreamStateChanged);
     streamSender.Publish(lblNickName.Text);
 }