Commit e32604c6 by liulongfei

导航配置错误

parent d313a049
...@@ -140,7 +140,7 @@ namespace VIZ.Framework.Common ...@@ -140,7 +140,7 @@ namespace VIZ.Framework.Common
private void TryCreateContent() private void TryCreateContent()
{ {
// 已经包含内容,则不创建 // 已经包含内容,则不创建
if (this.Content != null) if (this.Content != null && !(this.Content is NavigationConfig))
return; return;
NavigationConfig config = this.DataContext as NavigationConfig; NavigationConfig config = this.DataContext as NavigationConfig;
......
...@@ -37,6 +37,9 @@ namespace VIZ.Framework.Module ...@@ -37,6 +37,9 @@ namespace VIZ.Framework.Module
AppDomain.CurrentDomain.UnhandledException -= CurrentDomain_UnhandledException; AppDomain.CurrentDomain.UnhandledException -= CurrentDomain_UnhandledException;
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
System.Windows.Forms.Application.ThreadException -= Application_ThreadException;
System.Windows.Forms.Application.ThreadException += Application_ThreadException;
return true; return true;
} }
...@@ -66,5 +69,14 @@ namespace VIZ.Framework.Module ...@@ -66,5 +69,14 @@ namespace VIZ.Framework.Module
Debug.WriteLine(e.Exception.Message); Debug.WriteLine(e.Exception.Message);
log.Error(e.Exception); log.Error(e.Exception);
} }
/// <summary>
/// Winform应用程序未处理异常
/// </summary>
private void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
{
Debug.WriteLine(e.Exception);
log.Error(e.Exception);
}
} }
} }
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Web" /> <Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment