From a3ba25607612818c28d421bfa8eb2f92339d71ac Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期四, 13 三月 2025 20:30:48 +0800
Subject: [PATCH] 优化项目;
---
WPFProject/App.xaml.cs | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/WPFProject/App.xaml.cs b/WPFProject/App.xaml.cs
index 882f867..8a44641 100644
--- a/WPFProject/App.xaml.cs
+++ b/WPFProject/App.xaml.cs
@@ -1,8 +1,10 @@
-锘縰sing HMI.UI.Util;
+锘縰sing HMI.Core.Util;
+using HMI.UI.Util;
using log4net;
using Panuon.WPF.UI;
using System;
using System.Windows;
+using WPFProject.Utils;
namespace WPFProject
{
@@ -22,17 +24,17 @@
{
var ex = e.ExceptionObject as Exception;
log.Error("UnhandledException.", ex);
- Dispatcher.Invoke(() =>
- {
- MsgBoxHelper.ErrorMessage(Current.MainWindow, $"鍙戠敓鏈煡寮傚父锛佺▼搴忓嵆灏嗗叧闂璡r\n{ex?.Message}",
- "閿欒", MessageBoxButton.OK,
+ MsgBoxHelper.ErrorMessage(Current.MainWindow, this.lang("App.AppUnhandledException",ex.Message),
+ this.lang("App.Error"), MessageBoxButton.OK,
MessageBoxIcon.Error, DefaultButton.YesOK, 5);
- });
}
private void Application_Startup(object sender, StartupEventArgs e)
{
+ LangUtil.Load();
+ ToastHelper.Register(new MainToastHandler());
LoadingWindow window = new LoadingWindow();
+ //Login window = new Login();
window.Show();
}
}
--
Gitblit v1.9.1