using ryCommon; using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; using System.Windows.Documents; using System.Windows.Forms; namespace 开发辅助工具 { static class Program { static System.Threading.Mutex run; /// /// 应用程序的主入口点。 /// [STAThread] static void Main(string[] args) { //run = new System.Threading.Mutex(true, "SuperDesign", out bool runone); //if(!runone) //{ // return; //} AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //run.ReleaseMutex(); //run.Close(); 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; } } catch { return args.RequestingAssembly; } } } }