Graph-LC-Studio_GraphLC-IDE/App.xaml.cs
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

using GraphLC_IDE.AppConfig;

namespace GraphLC_IDE
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        private void OnAppStartup(object sender, StartupEventArgs e)
        {
            DispatcherUnhandledException += App_DispatcherUnhandledException;
            AppInfo.Args = e.Args.Clone() as string[]; // 复制传入的参数
        }

        void App_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
        {
            Log.WriteErr(e.Exception.Message, "App.xaml.cs");
        }
    }
}
