Исправление ошибок / второй этап
This commit is contained in:
parent
96d343bc3c
commit
1dda5914de
4
Sailboat/Sailboat/FormBoatCollection.Designer.cs
generated
4
Sailboat/Sailboat/FormBoatCollection.Designer.cs
generated
@ -1,4 +1,5 @@
|
||||
namespace Sailboat
|
||||
|
||||
namespace Sailboat
|
||||
{
|
||||
partial class FormBoatCollection
|
||||
{
|
||||
@ -259,5 +260,6 @@
|
||||
private ToolStripMenuItem LoadToolStripMenuItem;
|
||||
private OpenFileDialog openFileDialog;
|
||||
private SaveFileDialog saveFileDialog;
|
||||
private EventHandler buttonRemoveBoat_Click;
|
||||
}
|
||||
}
|
@ -7,7 +7,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Sailboat.DrawingObjects;
|
||||
using Sailboat.Exceptions;
|
||||
using Sailboat.Generics;
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Sailboat
|
||||
{
|
||||
@ -15,15 +16,16 @@ namespace Sailboat
|
||||
ApplicationConfiguration.Initialize();
|
||||
var services = new ServiceCollection();
|
||||
ConfigureServices(services);
|
||||
using (ServiceProvider serviceProvider = services.BuildServiceProvider())
|
||||
{
|
||||
ServiceProvider serviceProvider = services.BuildServiceProvider();
|
||||
{
|
||||
Application.Run(serviceProvider.GetRequiredService<FormBoatCollection>());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static void ConfigureServices(ServiceCollection services)
|
||||
{
|
||||
services.AddSingleton<FormBoatCollection>().AddLogging(option =>
|
||||
object value = services.AddSingleton<FormBoatCollection>().AddLogging(option =>
|
||||
{
|
||||
string[] path = Directory.GetCurrentDirectory().Split('\\');
|
||||
string pathNeed = "";
|
||||
@ -37,6 +39,7 @@ namespace Sailboat
|
||||
option.SetMinimumLevel(LogLevel.Information);
|
||||
option.AddSerilog(logger);
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -9,6 +9,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user