/// <summary> /// 显示日志记录弹出窗口 /// </summary> /// <param name="vTitle">窗口标签</param> /// <param name="vMessage">消息</param> /// <param name="vStackTrace">日志异常代码调试信息</param> /// <param name="ClosedMethod">窗口关闭事件</param> public static void ShowExceptionWindow(string vTitle, string vMessage, string vStackTrace, EventHandler ClosedMethod) { PopupExceptionWindow exWindow = new PopupExceptionWindow(); exWindow.Title = vTitle; ((Run)((Paragraph)exWindow.richTxtMessage.Blocks[0]).Inlines[0]).Text = vMessage; ((Run)((Paragraph)exWindow.richTxtStack.Blocks[0]).Inlines[0]).Text = vStackTrace; exWindow.Closed += ClosedMethod; exWindow.Show(); }
/// <summary> /// 显示异常信息窗口 /// </summary> /// <param name="ex">异常变量</param> /// <param name="ClosedMethod">窗口关闭事件</param> public static void ShowExceptionWindow(System.Exception ex, EventHandler ClosedMethod) { PopupExceptionWindow.ShowExceptionWindow(ex, ClosedMethod); }