2024-02-26 14:27:55 +04:00
|
|
|
using TypographyBusinessLogic.BusinessLogics;
|
|
|
|
using TypographyContracts.BusinessLogicsContracts;
|
|
|
|
using TypographyContracts.StoragesContracts;
|
2024-04-22 08:50:09 +04:00
|
|
|
using TypographyDatabaseImplements.Implements;
|
2024-02-12 12:46:44 +04:00
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
using NLog.Extensions.Logging;
|
2024-03-25 01:48:14 +04:00
|
|
|
using TypographyBusinessLogic.OfficePackage.Implements;
|
|
|
|
using TypographyBusinessLogic.OfficePackage;
|
|
|
|
using AbstractShopView;
|
2024-04-07 21:05:15 +04:00
|
|
|
|
2024-02-12 12:46:44 +04:00
|
|
|
|
2024-02-26 14:27:55 +04:00
|
|
|
namespace TypographyView
|
2024-02-12 12:12:37 +04:00
|
|
|
{
|
|
|
|
internal static class Program
|
|
|
|
{
|
2024-02-12 12:46:44 +04:00
|
|
|
private static ServiceProvider? _serviceProvider;
|
|
|
|
public static ServiceProvider? ServiceProvider => _serviceProvider;
|
2024-02-12 12:12:37 +04:00
|
|
|
/// <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();
|
2024-02-12 12:46:44 +04:00
|
|
|
var services = new ServiceCollection();
|
|
|
|
ConfigureServices(services);
|
|
|
|
_serviceProvider = services.BuildServiceProvider();
|
|
|
|
Application.Run(_serviceProvider.GetRequiredService<FormMain>());
|
|
|
|
}
|
|
|
|
private static void ConfigureServices(ServiceCollection services)
|
|
|
|
{
|
|
|
|
services.AddLogging(option =>
|
|
|
|
{
|
|
|
|
option.SetMinimumLevel(LogLevel.Information);
|
|
|
|
option.AddNLog("nlog.config");
|
|
|
|
});
|
|
|
|
services.AddTransient<IComponentStorage, ComponentStorage>();
|
|
|
|
services.AddTransient<IOrderStorage, OrderStorage>();
|
2024-02-26 14:27:55 +04:00
|
|
|
services.AddTransient<IPrintedStorage, PrintedStorage>();
|
2024-04-22 08:50:09 +04:00
|
|
|
services.AddTransient<IClientStorage, ClientStorage>();
|
2024-04-22 06:54:28 +04:00
|
|
|
services.AddTransient<IImplementerStorage, ImplementerStorage>();
|
2024-02-12 12:46:44 +04:00
|
|
|
|
|
|
|
services.AddTransient<IComponentLogic, ComponentLogic>();
|
|
|
|
services.AddTransient<IOrderLogic, OrderLogic>();
|
2024-02-26 14:27:55 +04:00
|
|
|
services.AddTransient<IPrintedLogic, PrintedLogic>();
|
2024-03-25 01:48:14 +04:00
|
|
|
services.AddTransient<IReportLogic, ReportLogic>();
|
2024-04-07 21:05:15 +04:00
|
|
|
services.AddTransient<IClientLogic, ClientLogic>();
|
2024-04-22 06:54:28 +04:00
|
|
|
services.AddTransient<IImplementerLogic, ImplementerLogic>();
|
|
|
|
|
2024-03-25 01:48:14 +04:00
|
|
|
|
|
|
|
services.AddTransient<AbstractSaveToExcel, SaveToExcel>();
|
|
|
|
services.AddTransient<AbstractSaveToWord, SaveToWord>();
|
|
|
|
services.AddTransient<AbstractSaveToPdf, SaveToPdf>();
|
2024-04-22 06:54:28 +04:00
|
|
|
services.AddTransient<IWorkProcess, WorkModeling>();
|
2024-02-12 12:46:44 +04:00
|
|
|
|
|
|
|
services.AddTransient<FormMain>();
|
|
|
|
services.AddTransient<FormComponent>();
|
|
|
|
services.AddTransient<FormComponents>();
|
|
|
|
services.AddTransient<FormCreateOrder>();
|
2024-02-26 14:27:55 +04:00
|
|
|
services.AddTransient<FormPrinted>();
|
|
|
|
services.AddTransient<FormPrintedComponent>();
|
|
|
|
services.AddTransient<FormPrinteds>();
|
2024-03-25 01:48:14 +04:00
|
|
|
services.AddTransient<FormReportPrintedComponents>();
|
|
|
|
services.AddTransient<FormReportOrders>();
|
2024-04-07 21:05:15 +04:00
|
|
|
services.AddTransient<FormClients>();
|
2024-04-22 06:54:28 +04:00
|
|
|
services.AddTransient<FormImplementers>();
|
|
|
|
services.AddTransient<FormImplementer>();
|
2024-02-12 12:12:37 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|