2024-02-15 17:10:17 +04:00
|
|
|
|
using JewelryStoreContracts.BusinessLogicsContracts;
|
|
|
|
|
using JewelryStoreContracts.StoragesContracts;
|
2024-03-23 18:19:44 +04:00
|
|
|
|
using JewelryStoreDatabaseImplement.Implements;
|
2024-02-15 17:10:17 +04:00
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
using NLog.Extensions.Logging;
|
|
|
|
|
using JewelryStoreBusinessLogic.BusinessLogics;
|
2024-03-24 14:21:29 +04:00
|
|
|
|
using JewelryStoreBusinessLogic.OfficePackage.Implements;
|
|
|
|
|
using JewelryStoreBusinessLogic.OfficePackage;
|
2024-02-15 17:10:17 +04:00
|
|
|
|
using System.Drawing;
|
2024-03-24 14:21:29 +04:00
|
|
|
|
using JewerlyStoreView;
|
2024-02-15 17:10:17 +04:00
|
|
|
|
|
|
|
|
|
namespace JewelryStoreView
|
|
|
|
|
{
|
|
|
|
|
internal static class Program
|
|
|
|
|
{
|
|
|
|
|
private static ServiceProvider? _serviceProvider;
|
|
|
|
|
public static ServiceProvider? ServiceProvider => _serviceProvider;
|
|
|
|
|
/// <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();
|
|
|
|
|
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");
|
|
|
|
|
});
|
2024-04-21 21:51:16 +04:00
|
|
|
|
services.AddTransient<IClientStorage, ClientStorage>();// <20> <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>? <20><> <20><><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>? <20><> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
services.AddTransient<IComponentStorage, ComponentStorage>();
|
2024-02-15 17:10:17 +04:00
|
|
|
|
services.AddTransient<IOrderStorage, OrderStorage>();
|
|
|
|
|
services.AddTransient<IJewelStorage, JewelStorage>();
|
2024-04-21 21:51:16 +04:00
|
|
|
|
services.AddTransient<IImplementerStorage, ImplementerStorage>();
|
|
|
|
|
services.AddTransient<IComponentLogic, ComponentLogic>();
|
2024-02-15 17:10:17 +04:00
|
|
|
|
services.AddTransient<IOrderLogic, OrderLogic>();
|
|
|
|
|
services.AddTransient<IJewelLogic, JewelLogic>();
|
2024-03-24 14:21:29 +04:00
|
|
|
|
services.AddTransient<IReportLogic, ReportLogic>();
|
2024-04-21 21:51:16 +04:00
|
|
|
|
services.AddTransient<IClientLogic, ClientLogic>();// <20> <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>? <20><> <20><><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>? <20><> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
services.AddTransient<IWorkProcess, WorkModeling>();
|
|
|
|
|
services.AddTransient<IImplementerLogic, ImplementerLogic>();
|
|
|
|
|
services.AddTransient<AbstractSaveToExcel, SaveToExcel>();
|
2024-03-24 14:21:29 +04:00
|
|
|
|
services.AddTransient<AbstractSaveToWord, SaveToWord>();
|
|
|
|
|
services.AddTransient<AbstractSaveToPdf, SaveToPdf>();
|
2024-02-15 17:10:17 +04:00
|
|
|
|
services.AddTransient<FormMain>();
|
|
|
|
|
services.AddTransient<FormComponent>();
|
2024-04-21 21:51:16 +04:00
|
|
|
|
services.AddTransient<FormClients>(); // <20> <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>? <20><> <20><><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>? <20><> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
services.AddTransient<FormComponents>();
|
2024-02-15 17:10:17 +04:00
|
|
|
|
services.AddTransient<FormCreateOrder>();
|
|
|
|
|
services.AddTransient<FormJewel>();
|
|
|
|
|
services.AddTransient<FormJewelComponent>();
|
|
|
|
|
services.AddTransient<FormJewels>();
|
2024-03-24 14:21:29 +04:00
|
|
|
|
services.AddTransient<FormReportJewelComponents>();
|
|
|
|
|
services.AddTransient<FormReportOrders>();
|
2024-04-21 21:51:16 +04:00
|
|
|
|
services.AddTransient<FormImplementers>();
|
|
|
|
|
services.AddTransient<FormImplementer>();
|
|
|
|
|
}
|
2024-02-15 17:10:17 +04:00
|
|
|
|
}
|
|
|
|
|
}
|