增强应用程序异常处理机制,新增未处理异常日志记录功能,确保在启动和运行期间捕获并记录异常信息。同时,重构配置文件加载逻辑,支持用户目录覆盖默认配置,优化 SQLite 数据库连接字符串处理,确保在不同环境下的兼容性和稳定性。
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System.Windows.Controls;
|
||||
using System.Windows;
|
||||
|
||||
namespace YY.Admin.Views.Dialogs
|
||||
{
|
||||
@@ -12,22 +11,5 @@ namespace YY.Admin.Views.Dialogs
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void UserControl_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var win = Window.GetWindow(this);
|
||||
if (win == null) return;
|
||||
|
||||
// 必须先关闭 AllowsTransparency,再改 WindowStyle(否则会抛出:
|
||||
// 「当 AllowsTransparency 为 true 时,WindowStyle.None 是唯一有效值」)
|
||||
win.AllowsTransparency = false;
|
||||
win.WindowStyle = WindowStyle.SingleBorderWindow;
|
||||
win.ResizeMode = ResizeMode.CanResizeWithGrip;
|
||||
win.SizeToContent = SizeToContent.Manual;
|
||||
win.MinWidth = 520;
|
||||
win.MinHeight = 420;
|
||||
if (win.Width < 520) win.Width = 520;
|
||||
if (win.Height < 420) win.Height = 420;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user