33 lines
868 B
C#
33 lines
868 B
C#
using WorkCameraExport.Forms;
|
|
using WorkCameraExport.Services;
|
|
|
|
namespace WorkCameraExport;
|
|
|
|
static class Program
|
|
{
|
|
/// <summary>
|
|
/// The main entry point for the application.
|
|
/// </summary>
|
|
[STAThread]
|
|
static void Main()
|
|
{
|
|
// To customize application configuration such as set high DPI settings or default font,
|
|
// see https://aka.ms/applicationconfiguration.
|
|
ApplicationConfiguration.Initialize();
|
|
|
|
// 创建 API 服务实例
|
|
using var apiService = new ApiService();
|
|
|
|
// 显示登录窗体
|
|
using var loginForm = new LoginForm(apiService);
|
|
if (loginForm.ShowDialog() != DialogResult.OK)
|
|
{
|
|
// 用户取消登录,退出应用
|
|
return;
|
|
}
|
|
|
|
// 登录成功,显示主窗体
|
|
Application.Run(new MainForm(apiService));
|
|
}
|
|
}
|