Beispiel #1
0
        private void MediaPlayer_MediaError(object sender, AxWMPLib._WMPOCXEvents_MediaErrorEvent e)
        {
            var errSource = e.pMediaObject as IWMPMedia2;

            if (errSource != null)
            {
                var errorItem = errSource.Error;
                MessageBox.Show("Error #" + errorItem.errorCode.ToString("X")
                                + " in " + errSource.sourceURL);
            }
        }
Beispiel #2
0
 /// <summary>
 /// event handler to display any errors encountered by the player
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Player_MediaError(object sender, AxWMPLib._WMPOCXEvents_MediaErrorEvent e)
 {
     //if media error is called, check and notify user if file is missing or corrupt
     try {
         IWMPMedia2    errSource = e.pMediaObject as IWMPMedia2;
         IWMPErrorItem errorItem = errSource.Error;
         MessageBox.Show("Error " + errorItem.errorCode.ToString("X") + " in " + errSource.sourceURL);
     } catch (InvalidCastException ex) {
         MessageBox.Show("Error received:" + ex.Message);
     }
 }
 private void preview_process_WMP_MediaError(object sender, AxWMPLib._WMPOCXEvents_MediaErrorEvent e)
 {
     try
     {
         IWMPMedia2    errSrc  = e.pMediaObject as IWMPMedia2;
         IWMPErrorItem errItem = errSrc.Error;
         MessageBox.Show("Error " + errItem.errorCode.ToString("X")
                         + " in " + errSrc.sourceURL);
     }
     catch (InvalidCastException)
     {
     }
 }
Beispiel #4
0
 private void mediaPlayer_MediaError(object sender, AxWMPLib._WMPOCXEvents_MediaErrorEvent e)
 {
     try
     // If the Player encounters a corrupt or missing file,
     // show the hexadecimal error code and URL.
     {
         IWMPMedia2    errSource = e.pMediaObject as IWMPMedia2;
         IWMPErrorItem errorItem = errSource.Error;
         MessageBox.Show(errorItem.errorDescription + " - " + errSource.sourceURL);
     }
     catch (InvalidCastException)
     // In case pMediaObject is not an IWMPMedia item.
     {
         MessageBox.Show("Error.");
     }
 }
Beispiel #5
0
 private void axWindowsMediaPlayer1_MediaError(object sender, AxWMPLib._WMPOCXEvents_MediaErrorEvent e)
 {
     /*try
      * // If the Player encounters a corrupt or missing file,
      * // show the hexadecimal error code and URL.
      * {
      *  IWMPMedia2 errSource = e.pMediaObject as IWMPMedia2;
      *  IWMPErrorItem errorItem = errSource.Error;
      *  MessageBox.Show("Error " + errorItem.errorCode.ToString("X")
      + " in " + errSource.sourceURL);
      + }
      + catch (InvalidCastException)
      + // In case pMediaObject is not an IWMPMedia item.
      + {
      +  MessageBox.Show("Error.");
      + } */
 }
Beispiel #6
0
 void axWindowsMediaPlayer1_MediaError(object sender, AxWMPLib._WMPOCXEvents_MediaErrorEvent e)
 {
     try
     // If the Player encounters a corrupt or missing file,
     // show the hexadecimal error code and URL.
     {
         IWMPMedia2    errSource = e.pMediaObject as IWMPMedia2;
         IWMPErrorItem errorItem = errSource.Error;
         MessageBox.Show("Error " + errorItem.errorCode.ToString("X", CultureInfo.CurrentCulture)
                         + " in " + errSource.sourceURL);
     }
     catch (InvalidCastException)
     // In case pMediaObject is not an IWMPMedia item.
     {
         MessageBox.Show("Error.");
     }
 }
Beispiel #7
0
 private void wmpVideo_MediaError(object sender, AxWMPLib._WMPOCXEvents_MediaErrorEvent e)
 {
     wmpVideo.close();
     loadVideo(configMrw.folder_video);
 }
Beispiel #8
0
 private void AxWindowsMediaPlayer1_MediaError(object sender, AxWMPLib._WMPOCXEvents_MediaErrorEvent e)
 {
     Console.WriteLine("error");
 }
Beispiel #9
0
 private void MediaPlayer_MediaError(object sender, AxWMPLib._WMPOCXEvents_MediaErrorEvent e)
 {
     MessageBox.Show("Cannot play media file.");
 }
Beispiel #10
0
 private void AxWindowsMediaPlayer1_MediaError(object sender, AxWMPLib._WMPOCXEvents_MediaErrorEvent e)
 {
     throw new NotImplementedException();
 }
Beispiel #11
0
 private void WMP_MediaError(object sender, AxWMPLib._WMPOCXEvents_MediaErrorEvent e)
 {
 }
 private void axWindowsMediaPlayer1_MediaError(object sender, AxWMPLib._WMPOCXEvents_MediaErrorEvent e)
 {
     this.Close();
 }
Beispiel #13
0
 private void AxWindowsMediaPlayer1_MediaError(object sender, AxWMPLib._WMPOCXEvents_MediaErrorEvent e)
 {
 }
Beispiel #14
0
 private void wmp_MediaError(object sender, AxWMPLib._WMPOCXEvents_MediaErrorEvent e)
 {
     GetNextPicture();
 }
Beispiel #15
0
        /// <summary>
        /// Function for handling error in media.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void mediaPlayer_MediaError(object sender, AxWMPLib._WMPOCXEvents_MediaErrorEvent e)
        {
            String currentFile = mediaPlayer.currentMedia.name;

            log.Error("error while playing file " + currentFile);
        }
 void activeXMediaPlayer_MediaError(object sender, AxWMPLib._WMPOCXEvents_MediaErrorEvent e)
 {
     BorrarReproduccionActual();
     terminoLaReproduccionActual(true);
 }