RaUI/Source/OnLineUpgradeConfig/Program.cs
zilinsoft b4e236fd55 ### 2025-01-06 星期一更新
------
#### 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。
2025-01-06 11:14:35 +08:00

50 lines
1.7 KiB
C#

using LiveUpdate;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnLineUpgradeConfig
{
internal static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frmUpdateFile());
}
static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
{
try
{
AssemblyName assemblyName = new AssemblyName(args.Name);
var parent_folder = System.IO.Path.GetDirectoryName(Application.StartupPath.Trim('\\')).Trim('\\');
if (System.IO.File.Exists(parent_folder + @"\Bin\" + assemblyName.Name + ".dll"))
{
return Assembly.LoadFrom(parent_folder + @"\Bin\" + 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;
}
}
catch (Exception)
{
return args.RequestingAssembly;
}
}
}
}