2021-09-03 09:36:09 +00:00
|
|
|
|
using ryCommon;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
using System.Text;
|
2024-12-21 06:16:03 +00:00
|
|
|
|
using System.Windows.Documents;
|
2021-09-03 09:36:09 +00:00
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
|
|
namespace 开发辅助工具
|
|
|
|
|
{
|
|
|
|
|
static class Program
|
|
|
|
|
{
|
2024-12-21 06:16:03 +00:00
|
|
|
|
static System.Threading.Mutex run;
|
2021-09-03 09:36:09 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// 应用程序的主入口点。
|
|
|
|
|
/// </summary>
|
|
|
|
|
[STAThread]
|
|
|
|
|
static void Main(string[] args)
|
|
|
|
|
{
|
2024-12-21 06:16:03 +00:00
|
|
|
|
//run = new System.Threading.Mutex(true, "SuperDesign", out bool runone);
|
|
|
|
|
//if(!runone)
|
|
|
|
|
//{
|
|
|
|
|
// return;
|
|
|
|
|
//}
|
2021-09-03 09:36:09 +00:00
|
|
|
|
AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve);
|
|
|
|
|
Application.EnableVisualStyles();
|
|
|
|
|
Application.SetCompatibleTextRenderingDefault(false);
|
2024-12-21 06:16:03 +00:00
|
|
|
|
//run.ReleaseMutex();
|
|
|
|
|
//run.Close();
|
2021-09-03 09:36:09 +00:00
|
|
|
|
Init.Show(args);
|
|
|
|
|
}
|
|
|
|
|
static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
AssemblyName assemblyName = new AssemblyName(args.Name);
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-02-21 01:46:13 +00:00
|
|
|
|
catch
|
2021-09-03 09:36:09 +00:00
|
|
|
|
{
|
|
|
|
|
return args.RequestingAssembly;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|