From 6b440d6adaa51c909dd8bb3b093d95e84e4a5e83 Mon Sep 17 00:00:00 2001 From: "safiulova.k" Date: Tue, 19 Dec 2023 18:45:06 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B8=D0=B3=D1=80=D0=B0=D0=BB?= =?UTF-8?q?=D0=B0=D1=81=D1=8C....?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base/Catamaran/Catamaran/FormCatamaranCollection.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/base/Catamaran/Catamaran/FormCatamaranCollection.cs b/base/Catamaran/Catamaran/FormCatamaranCollection.cs index 2d4b9ab..1c6b6e7 100644 --- a/base/Catamaran/Catamaran/FormCatamaranCollection.cs +++ b/base/Catamaran/Catamaran/FormCatamaranCollection.cs @@ -90,17 +90,17 @@ namespace Catamaran { return; } - try + + if (obj + drawningCatamaran) { - _ = obj + drawningCatamaran; MessageBox.Show("Объект добавлен"); pictureBoxCollection.Image = obj.ShowCatamarans(); - _logger.LogInformation($"Объект добавлен в набор {listBoxStorages.SelectedItem.ToString()}"); + _logger.LogInformation($"Объект {obj.GetType()} добавлен"); } - catch (Exception ex) + else { - MessageBox.Show(ex.Message); - _logger.LogWarning($"Не удалось добавить объект в набор {listBoxStorages.SelectedItem.ToString()}"); + MessageBox.Show("Не удалось добавить объект"); + _logger.LogInformation($"Не удалось добавить объект"); } }