Files

37 lines
1.1 KiB
C#
Raw Permalink Normal View History

2020-12-29 19:23:02 +01:00
using System;
using System.Windows.Forms;
using DataImporterTool.Dialogs;
using DataImporterTool.Importer;
using Microsoft.Extensions.DependencyInjection;
namespace DataImporterTool
{
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 serviceProvider = new ServiceCollection()
.AddSingleton<JsonFilesImporter>()
2021-01-05 10:27:21 +01:00
.AddSingleton<SqlImporter>()
2020-12-29 19:23:02 +01:00
.AddSingleton<IDialogService, DialogService>()
.AddSingleton<IMainFormView, MainForm>()
.AddSingleton<MainFormPresenter>()
.BuildServiceProvider();
var mainFormPresenter = serviceProvider.GetService<MainFormPresenter>();
var form = mainFormPresenter.View as Form;
Application.Run(form);
}
}
}