using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Threading.Tasks; using System.Windows.Forms; namespace OTSPartA_STDEditor { static class Program { static Program() { string privatepath = "System;Common;SQLiteDll;OxfordExtender;OTSCPPDll;OpenCvSharp;CefSharp"; AppDomain.CurrentDomain.SetData("PRIVATE_BINPATH", privatepath); AppDomain.CurrentDomain.SetData("BINPATH_PROBE_ONLY", privatepath); var m = typeof(AppDomainSetup).GetMethod("UpdateContextProperty", BindingFlags.NonPublic | BindingFlags.Static); var funsion = typeof(AppDomain).GetMethod("GetFusionContext", BindingFlags.NonPublic | BindingFlags.Instance); m.Invoke(null, new object[] { funsion.Invoke(AppDomain.CurrentDomain, null), "PRIVATE_BINPATH", privatepath }); } /// /// 应用程序的主入口点。 /// [STAThread] static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //Application.Run(new Form_ConstantsEditor2()); Form_Main form_ConstantsEditor2; if (args.Length > 1) { form_ConstantsEditor2 = new Form_Main(args); } else { form_ConstantsEditor2 = new Form_Main(); } if (args.Length > 0) { form_ConstantsEditor2.STDDBAddress = args[0]; } Application.Run(form_ConstantsEditor2); } } }