using System;
using System.Collections.Generic;

using System.Windows.Forms;
using System.Reflection;
using System.Collections;
using System.Configuration;
using CommonAI.Zone.ZoneEditor.Plugin.EditorToScene;
using System.IO;
using System.Runtime.InteropServices;
using CommonLang.Property;

namespace CommonAIEditor
{

    static class Program
    {
		public static bool g_SimpleGen = true;

        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main(string[] args)
        {
            //访问 UrlString 配置节
            ReflectionUtil.LoadDlls(new DirectoryInfo(Application.StartupPath));
            EditorPlugin.Init();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //Application.Run(new Editor());

            bool autosave = false;
            foreach (string str in args)
			{
				if (str.Equals("auto"))
				{
					autosave = true;
				}
				else if (str.Equals("genlanguage"))
				{
					g_SimpleGen = false;
				}
			}
                
            Application.Run(new Editor(autosave));
        }
    }

    static public class Launcher
    {
        [STAThread]
        static public void Main(string[] args)
        {
            //访问 UrlString 配置节
            ReflectionUtil.LoadDlls(new DirectoryInfo(Application.StartupPath));
            EditorPlugin.Init();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            bool autosave = false;
            foreach (string str in args)
                if (str.Equals("auto")) autosave = true;
            Application.Run(new Editor(autosave));
        }
    }
}