using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Runtime.Versioning;
using System.Text;
using System.Windows.Forms;
#if  NETCORE
[assembly:System.Runtime.Versioning.SupportedOSPlatform("windows")]
#endif
namespace TS4SimRipper
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static int Main(string[] args)
        {
            #if NETCORE
            // Application.SetDefaultFont(new Font(new FontFamily("Microsoft Sans Serif"), 12f));
            Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
            Application.SetHighDpiMode(HighDpiMode.DpiUnaware);
            #endif
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (args.Length == 2 && string.Equals(args[0], "--simsai-export", StringComparison.OrdinalIgnoreCase))
            {
                Form1.AutomationMode = true;
                return AutomationExport.Run(args[1]);
            }

            if (args.Length == 2 && string.Equals(args[0], "--simsai-index", StringComparison.OrdinalIgnoreCase))
            {
                Form1.AutomationMode = true;
                return AutomationModIndex.Run(args[1]);
            }

            Application.Run(new Form1());
            return 0;
        }
    }
}
