Program.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Windows.Forms;
  4. using System.Reflection;
  5. using System.Collections;
  6. using System.Configuration;
  7. using CommonAI.Zone.ZoneEditor.Plugin.EditorToScene;
  8. using System.IO;
  9. using System.Runtime.InteropServices;
  10. using CommonLang.Property;
  11. namespace CommonAIEditor
  12. {
  13. static class Program
  14. {
  15. public static bool g_SimpleGen = true;
  16. /// <summary>
  17. /// 应用程序的主入口点。
  18. /// </summary>
  19. [STAThread]
  20. static void Main(string[] args)
  21. {
  22. //访问 UrlString 配置节
  23. ReflectionUtil.LoadDlls(new DirectoryInfo(Application.StartupPath));
  24. EditorPlugin.Init();
  25. Application.EnableVisualStyles();
  26. Application.SetCompatibleTextRenderingDefault(false);
  27. //Application.Run(new Editor());
  28. bool autosave = false;
  29. foreach (string str in args)
  30. {
  31. if (str.Equals("auto"))
  32. {
  33. autosave = true;
  34. }
  35. else if (str.Equals("genlanguage"))
  36. {
  37. g_SimpleGen = false;
  38. }
  39. }
  40. Application.Run(new Editor(autosave));
  41. }
  42. }
  43. static public class Launcher
  44. {
  45. [STAThread]
  46. static public void Main(string[] args)
  47. {
  48. //访问 UrlString 配置节
  49. ReflectionUtil.LoadDlls(new DirectoryInfo(Application.StartupPath));
  50. EditorPlugin.Init();
  51. Application.EnableVisualStyles();
  52. Application.SetCompatibleTextRenderingDefault(false);
  53. bool autosave = false;
  54. foreach (string str in args)
  55. if (str.Equals("auto")) autosave = true;
  56. Application.Run(new Editor(autosave));
  57. }
  58. }
  59. }