123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- 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
- });
- }
- /// <summary>
- /// 应用程序的主入口点。
- /// </summary>
- [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);
- }
- }
- }
|