本文整理汇总了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());
}
示例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);
}
示例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;
}
示例4: me_MediaFailed
private void me_MediaFailed(object sender, ExceptionRoutedEventArgs e)
{
TaskbarItemInfo.Overlay = (ImageSource)Resources["ErrorImage"];
MessageBox.Show("ERROR: " + e.ToString());
}