diff --git a/CommonLibrary/Common.cs b/CommonLibrary/Common.cs index 09ed9ea..769a442 100644 --- a/CommonLibrary/Common.cs +++ b/CommonLibrary/Common.cs @@ -10,9 +10,19 @@ namespace CommonLibrary { static CommonLibrary() { + /************************************************************************** + * + * 时间:2017年6月29日 07:58:02 + * 说明:更改版本机制,每次提交新增修订版的版本号 + * 发行:发行版将采用主版本加次版本来发行 + * + **************************************************************************/ + + + //初始化模版的版本号 //预计第一个正式发行的版本为1.1.0 日期为2017-08-10 - SoftBasic.FrameworkVersion = new SystemVersion("1.0.6"); + SoftBasic.FrameworkVersion = new SystemVersion("1.0.7"); } diff --git a/软件系统服务端模版/FormServerWindow.cs b/软件系统服务端模版/FormServerWindow.cs index 99550a9..3db7f85 100644 --- a/软件系统服务端模版/FormServerWindow.cs +++ b/软件系统服务端模版/FormServerWindow.cs @@ -55,6 +55,8 @@ namespace 软件系统服务端模版 { InitializeComponent(); + AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; + //检测日志路径是否存储 LogSavePath = Application.StartupPath + @"\Logs"; if(!System.IO.Directory.Exists(LogSavePath)) @@ -63,6 +65,8 @@ namespace 软件系统服务端模版 } } + + #region 窗口属性+窗口方法 /// @@ -176,6 +180,21 @@ namespace 软件系统服务端模版 } } + + + /// + /// 一个处理服务器未处理异常的方法,对该方法进行记录,方便以后的分析 + /// + /// + /// + private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) + { + if(e.ExceptionObject is Exception ex) + { + RuntimeLogHelper.SaveError("UnhandledException:", ex); + } + } + #endregion #region 菜单逻辑块