Лабораторная работа №8
This commit is contained in:
parent
3f1795c430
commit
2f8f9b8d1c
@ -78,8 +78,8 @@ public partial class FormShipCollection : Form
|
||||
_logger.LogInformation("Добавлен объект: " + ship.GetDataForSave());
|
||||
}
|
||||
}
|
||||
catch (ObjectNotFoundException) { }
|
||||
catch (CollectionOverflowException ex)
|
||||
catch (CollectionOverflowException) { }
|
||||
catch (ObjectIsEqualException ex)
|
||||
{
|
||||
MessageBox.Show("Не удалось добавить объект");
|
||||
_logger.LogError("Ошибка : {Messsage}", ex.Message);
|
||||
|
@ -21,12 +21,8 @@ namespace ProjectContainerShip
|
||||
ConfigureServices(services);
|
||||
using ServiceProvider serviceProvider = services.BuildServiceProvider();
|
||||
Application.Run(serviceProvider.GetRequiredService<FormShipCollection>());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Конфигурация сервиса DI
|
||||
/// </summary>
|
||||
/// <param name="services"></param>
|
||||
}
|
||||
private static void ConfigureServices(ServiceCollection services)
|
||||
{
|
||||
string[] path = Directory.GetCurrentDirectory().Split('\\');
|
||||
|
Loading…
Reference in New Issue
Block a user