Сделал 7 ЛР

This commit is contained in:
Владислав Захаров 2022-12-06 14:30:23 +04:00
parent 9fd349a011
commit dedb9caa5b
3 changed files with 9 additions and 21 deletions

View File

@ -35,7 +35,10 @@ namespace Traktor
{
comboBoxSelectorMap.Items.Add(item.Key);
}
}
public FormMapWithSetTraktor()
{
}
private void ReloadMaps()

View File

@ -15,25 +15,26 @@ namespace Traktor
{
// 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);
using (ServiceProvider serviceProvider = services.BuildServiceProvider())
{
Application.Run(serviceProvider.GetRequiredService<FormMapWithSetTraktor>());
}
/*Application.Run(new FormMapWithSetDoubleDeckerBus());*/
}
private static void ConfigureServices(ServiceCollection services)
{
{
services.AddSingleton<FormMapWithSetTraktor>()
.AddLogging(option =>
{
var configuration = new ConfigurationBuilder().SetBasePath(Directory.GetCurrentDirectory()).AddJsonFile(path: "serilog.json").Build();
var logger = new LoggerConfiguration()
.ReadFrom.Configuration(configuration)
.CreateLogger();
var logger = new LoggerConfiguration()
.ReadFrom.Configuration(configuration)
.CreateLogger();
option.SetMinimumLevel(LogLevel.Information);
option.AddSerilog(logger);

View File

@ -1,16 +0,0 @@
{
"Serilog": {
"Using": [ "Serilog.Sinks.File" ],
"MinimumLevel": "Information",
"WriteTo": [
{
"Name": "File",
"Args": {
"path": "log_.log",
"rollingInterval": "Day",
"outputTemplate": "[{Timestamp:HH:mm:ss.fff}]{Level:u4}: {Message:lj}{NewLine}{Exception}"
}
}
]
}
}