------ #### OnLineUpgradeConfig V1.0.2501.0601 - *.[修复]修复用户管理列表无法默认勾选已选择用户的BUG。 #### RaUI V4.0.2501.0601 - *.[新增]RyFiles类新增SetFileDate、SetFileCreationTime、SetFileLastWriteTime方法。 - *.[新增]RyFiles.CopyBigFile方法现在会同步来源文件的创建和修改时间。 - *.[新增]ryQuickSQL类新增GetPostData函数,将数据快速转成Post数据。 - *.[改进]执行MySQL下的ExecuteNonQuery时,如果遇到连接关闭错误,允许重连并重新执行。 - *.[改进]IDbInterface在执行新的SQL语句前,自动清空最后错误。 - *.[修复]修复LayeredForm窗体以正常窗体打开的时候,文本框无法编辑的BUG。 - *.[修复]修复ApkOp获取apk权限时可能带乱码的BUG。 - *.[修复]修复WeifenLuo.WinFormsUI.Docking的ResourceManager.GetString路径不对导致报错的BUG。
63 lines
3.0 KiB
C#
63 lines
3.0 KiB
C#
using Itrycn;
|
||
using Itrycn_Project2;
|
||
using ryCommon;
|
||
using System;
|
||
using System.Collections.Generic;
|
||
using System.Linq;
|
||
using System.Reflection;
|
||
using System.Text;
|
||
using System.Windows.Forms;
|
||
|
||
namespace Itrycn_Project2
|
||
{
|
||
static class Program
|
||
{
|
||
/// <summary>
|
||
/// 应用程序的主入口点。
|
||
/// </summary>
|
||
[STAThread]
|
||
static void Main(string[] args)
|
||
{
|
||
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
|
||
Application.ThreadException += Application_ThreadException;
|
||
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
|
||
Application.EnableVisualStyles();
|
||
Application.SetCompatibleTextRenderingDefault(false);
|
||
RaUI.Common.HardWare.KeyboardChecker.IsKeyboardInstalled();
|
||
if (ryCommon.RedistCheck.IsInstall_VC2019(RedistCheck.InstallBit.All))
|
||
{
|
||
|
||
}
|
||
Config.Init.Show(args);
|
||
}
|
||
static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
|
||
{
|
||
Exception ex = e.ExceptionObject as Exception;
|
||
MessageBox.Show(string.Format("捕获到未处理异常:{0}\r\n异常信息:{1}\r\n异常堆栈:{2}\r\nCLR即将退出:{3}", ex.GetType(), ex.Message, ex.StackTrace, e.IsTerminating));
|
||
System.IO.File.WriteAllText(Application.StartupPath + "\\错误.txt", DateTime.Now.ToString() + "\r\n\r\n错误描述:" + ex.Message + "\r\n\r\n异常堆栈:" + ex.StackTrace + "\r\n\r\n异常方法:" + ex.TargetSite, Encoding.UTF8);
|
||
}
|
||
static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
|
||
{
|
||
Exception ex = e.Exception;
|
||
MessageBox.Show(string.Format("捕获到未处理异常:{0}\r\n异常信息:{1}\r\n异常堆栈:{2}", ex.GetType(), ex.Message, ex.StackTrace));
|
||
System.IO.File.WriteAllText(Application.StartupPath + "\\线程错误.txt", DateTime.Now.ToString() + "\r\n\r\n错误描述:" + ex.Message + "\r\n\r\n异常堆栈:" + ex.StackTrace + "\r\n\r\n异常方法:" + ex.TargetSite, Encoding.UTF8);
|
||
}
|
||
static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
|
||
{
|
||
AssemblyName assemblyName = new AssemblyName(args.Name);
|
||
if (System.IO.File.Exists(Application.StartupPath + @"\" + assemblyName.Name + ".dll"))
|
||
{
|
||
return Assembly.LoadFrom(Application.StartupPath + @"\" + assemblyName.Name + ".dll");
|
||
}
|
||
else if (System.IO.File.Exists(Application.StartupPath + @"\Bin\dlls\" + assemblyName.Name + ".dll"))
|
||
{
|
||
return Assembly.LoadFrom(Application.StartupPath + @"\Bin\dlls\" + assemblyName.Name + ".dll");
|
||
}
|
||
else
|
||
{
|
||
return args.RequestingAssembly;
|
||
}
|
||
}
|
||
}
|
||
}
|