alielie
2025-03-26 4cac1b533e133fdc8b3def90a0f998820f51907a
WPFProject/App.xaml.cs
@@ -18,6 +18,7 @@
    public partial class App : Application
    {
        private ILog log;
        private LogCleanner logCleanner;
        public App()
        {
            log = LogManager.GetLogger("APP");
@@ -28,7 +29,7 @@
        {
            var ex = e.ExceptionObject as Exception;
            log.Error("UnhandledException.", ex);
            MsgBoxHelper.ErrorMessage(Current.MainWindow, this.lang("App.AppUnhandledException",ex.Message),
            MsgBoxHelper.ErrorMessage(Current.MainWindow, this.lang("App.AppUnhandledException", ex.Message),
                    this.lang("App.Error"), MessageBoxButton.OK,
                    MessageBoxIcon.Error, DefaultButton.YesOK, 5);
        }
@@ -39,8 +40,9 @@
            mutex = new Mutex(true, "TestPlatform_OnlyRun_CRNS");
            if (mutex.WaitOne(0, false))
            {
                logCleanner = new LogCleanner();
                AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
                LoggerHelper.Register(new CommonLogger());
                LangUtil.Load();
                SystemSetting.SystemSettingChanged += SystemSetting_SystemSettingChanged;
                ToastHelper.Register(new MainToastHandler());