123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- using DevExpress.LookAndFeel;
- using DevExpress.XtraEditors;
- using Microsoft.Win32;
- using System;
- using System.Collections.Generic;
- using System.Diagnostics;
- using System.IO;
- using System.Reflection;
- using System.Security.Principal;
- using System.Windows.Forms;
- using DW5S.WebApi;
- using DW5S.Repostory;
- using DW5S.Entity;
- using System.Runtime.Loader;
- using DW5S.App;
- using System.Runtime.CompilerServices;
- namespace DW5S
- {
- internal static class Program
- {
- /// <summary>
- /// 应用程序的主入口点。
- /// </summary>
- [STAThread]
- static void Main()
- {
- var title = AppConfigHelper.Get("SystemName", "定位平台");
- AppHelper.OneStart(title, () =>
- {
- string screenCompany = AppConfigHelper.Get("Company", "");
- DxHelper.WaitHelper.SetSplashTips("Tips.txt");
-
- DxHelper.WaitHelper.ShowSplashScreen(title, screenCompany);
- DxHelper.WaitHelper.UpdateSplashMessage("正在加载程序资源文件...");
- System.Windows.Forms.Application.ThreadException += Application_ThreadException;
- MainForm mainForm = new MainForm() { Text = title };
- DxHelper.WaitHelper.UpdateSplashMessage("正在初始化...");
- System.Windows.Forms.Application.Run(mainForm);
- });
- }
- private static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
- {
- IocContainer.Logger.Error(e.Exception, e.Exception.Message);
- DxHelper.MsgBoxHelper.ShowError($"检测到异常,请联系管理员,异常信息:{e.Exception.Message}");
- }
- }
- }
|