当前位置: 首页>>代码示例>>C#>>正文


C# ExceptionRoutedEventArgs.ToString方法代码示例

本文整理汇总了C#中System.Windows.ExceptionRoutedEventArgs.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# ExceptionRoutedEventArgs.ToString方法的具体用法?C# ExceptionRoutedEventArgs.ToString怎么用?C# ExceptionRoutedEventArgs.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.ExceptionRoutedEventArgs的用法示例。


在下文中一共展示了ExceptionRoutedEventArgs.ToString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: media_MediaFailed

		void media_MediaFailed(object sender, ExceptionRoutedEventArgs e) {
			SendEvent(e.ToString());
		}
开发者ID:GerHobbelt,项目名称:mediaelement,代码行数:3,代码来源:MainPage.xaml.cs

示例2: OnMediaElementMediaFailed

        /// <summary>
        /// Event handler for the media failed event from the media element.
        /// </summary>
        /// <param name="sender">Source of the event.</param>
        /// <param name="e">Event args.</param>
        void OnMediaElementMediaFailed(object sender, ExceptionRoutedEventArgs e)
        {
            Debug.WriteLine("OnMediaElementMediaFailed:" + e.ToString());

            string strErrorMessage = string.Empty;
            if (m_mediaElement.Source != null)
            {
                strErrorMessage = m_mediaElement.Source.ToString();
            }
            else if (m_currentPlaylistIndex >= 0 && m_currentPlaylistIndex < Playlist.Count)
            {
                strErrorMessage = Playlist[m_currentPlaylistIndex].MediaUrl.ToString();
            }

            strErrorMessage += "\r\n" + e.ErrorException.ToString();

            if (m_currentPlaylistIndex >= 0 && m_currentPlaylistIndex < Playlist.Count && Playlist[m_currentPlaylistIndex].IsAdaptiveStreaming)
            {
                strErrorMessage += "\r\nRequires output to be hosted on a web server running IIS 7.0 with the Smooth Streaming handler installed and a Silverlight 2 template that supports Smooth Streaming.";
            }

            ShowErrorMessage(strErrorMessage);
        }
开发者ID:Titaye,项目名称:SLExtensions,代码行数:28,代码来源:MediaPlayer.cs

示例3: OnImageFailed

        /// <summary>
        /// Event handler for the Image failed event from the image.
        /// </summary>
        /// <param name="sender">Source of the event.</param>
        /// <param name="e">Event args.</param>
        private void OnImageFailed(object sender, ExceptionRoutedEventArgs e)
        {
            Debug.WriteLine("OnImageFailed:" + e.ToString());

            string strErrorMessage = e.ErrorException.ToString() + "\r\n";
            if (this.Source != null)
            {
                strErrorMessage += this.Source.ToString() + "\r\n";
            }

            TextBlock textBlock = new TextBlock();
            textBlock.Text = strErrorMessage;
            textBlock.TextWrapping = TextWrapping.Wrap;

            Content = textBlock;
        }
开发者ID:Titaye,项目名称:SLExtensions,代码行数:21,代码来源:ThumbnailImage.cs

示例4: me_MediaFailed

 private void me_MediaFailed(object sender, ExceptionRoutedEventArgs e)
 {
     TaskbarItemInfo.Overlay = (ImageSource)Resources["ErrorImage"];
     MessageBox.Show("ERROR: " + e.ToString());
 }
开发者ID:graboskyc,项目名称:PodcastPlayer,代码行数:5,代码来源:MainWindow.xaml.cs


注:本文中的System.Windows.ExceptionRoutedEventArgs.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。