diff --git a/Sailboat/Sailboat/FormBoatCollection.Designer.cs b/Sailboat/Sailboat/FormBoatCollection.Designer.cs index b655025..a30a1ac 100644 --- a/Sailboat/Sailboat/FormBoatCollection.Designer.cs +++ b/Sailboat/Sailboat/FormBoatCollection.Designer.cs @@ -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; } } \ No newline at end of file diff --git a/Sailboat/Sailboat/FormBoatCollection.cs b/Sailboat/Sailboat/FormBoatCollection.cs index 85982aa..454cfda 100644 --- a/Sailboat/Sailboat/FormBoatCollection.cs +++ b/Sailboat/Sailboat/FormBoatCollection.cs @@ -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; diff --git a/Sailboat/Sailboat/Program.cs b/Sailboat/Sailboat/Program.cs index dad5c4b..0470d3a 100644 --- a/Sailboat/Sailboat/Program.cs +++ b/Sailboat/Sailboat/Program.cs @@ -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()); - } + } + } private static void ConfigureServices(ServiceCollection services) { - services.AddSingleton().AddLogging(option => + object value = services.AddSingleton().AddLogging(option => { string[] path = Directory.GetCurrentDirectory().Split('\\'); string pathNeed = ""; @@ -37,6 +39,7 @@ namespace Sailboat option.SetMinimumLevel(LogLevel.Information); option.AddSerilog(logger); }); + } } } \ No newline at end of file diff --git a/Sailboat/Sailboat/Sailboat.csproj b/Sailboat/Sailboat/Sailboat.csproj index a67e15a..55a5a2f 100644 --- a/Sailboat/Sailboat/Sailboat.csproj +++ b/Sailboat/Sailboat/Sailboat.csproj @@ -9,6 +9,7 @@ +