MeiRiYiCheng_1_old/YBDevice.Print/Program.cs

31 lines
881 B
C#
Raw Permalink Normal View History

2025-07-16 17:14:38 +08:00
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));
}
}
}
}