csharp/2881099/FreeSql.Tools/FreeSql.Tools.WinForm/Program.cs

Program.cs
using DevComponents.DotNetBar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace FreeSqlTools
{
    static clast Program
    {
        /// 
        /// 应用程序的主入口点。
        /// 
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            ApplicationEventHandlerClast AppEvents = new ApplicationEventHandlerClast();
            Application.ThreadException += new ThreadExceptionEventHandler(AppEvents.OnThreadException);
            Application.Run(new Form1());
        }


    }
    // 全局异常处理
    public clast ApplicationEventHandlerClast
    {
        public void OnThreadException(object sender, ThreadExceptionEventArgs e)
        {
            TaskDialog.Show("错误提示", eTaskDialogIcon.Stop, "全局异常", e.Exception.Message, eTaskDialogButton.Ok);
        }
    }
}