using Microsoft.Extensions.DependencyInjection;
using System;
using System.Net.Http;
using System.Windows.Forms;

namespace YBDevice.Print
{
    static class Program
    {
        /// <summary>
        ///  The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.SetHighDpiMode(HighDpiMode.SystemAware);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var services = new ServiceCollection();
            services.AddHttpClient();

            using (ServiceProvider serviceProvider = services.BuildServiceProvider())
            {
                var http = services.BuildServiceProvider().GetRequiredService<IHttpClientFactory>();
                Application.Run(new Form1(http));
            }
        }
    }
}
