Inheritance: System.Windows.Controls.ChildWindow
コード例 #1
0
 /// <summary>
 /// Receive the audio request from other client.
 /// </summary>
 /// <param name="owner">The request owner who sent request.</param>
 /// <param name="isEnable">If true audio request received otherwise the audio conversation hang up by other party.</param>
 public void AudioRequestReceived(string owner, bool isEnable)
 {
     if (isEnable)
     {
         winMediaReq = new CWindowCameraRequest(owner, MediaType.Audio);
         winMediaReq.ResponseSelected += new EventHandler<RequestResponseEventArgs>(winMedia_ResponseSelected);
         winMediaReq.Show();
     }
     else//close audio conversation
     {
         streamSender.DettachMicrophone();
         DestroyStreamReceiver();
         txtChatLog.Text += String.Format("{0} disabled his/her microphone.\n", owner);
         btnAudio.Content = "Enable audio";
         audioIsEnable = false;
     }
 }
コード例 #2
0
 /// <summary>
 /// Receive the camera request from other connected client.
 /// </summary>
 /// <param name="owner">The request owner who sent request.</param>
 /// <param name="isEnable">If true video request received otherwise the video conversation hang up by other party.</param>
 public void CameraRequestReceived(string owner, bool isEnable)
 {
     if (isEnable)
     {
         winMediaReq = new CWindowCameraRequest(owner,MediaType.Video);
         winMediaReq.ResponseSelected += new EventHandler<RequestResponseEventArgs>(winMedia_ResponseSelected);
         winMediaReq.Show();
     }
     else
     {
         streamSender.DettachCamera();
         DestroyStreamReceiver();
         txtChatLog.Text += String.Format("{0} disabled his/her camera.\n", owner);
         btnCamera.Content = "Enable video chat";
         cameraIsEnable = false;
         remoteVideoPlayer.Reset();
     }
 }