From 405fef33f9561f582fdf35efeda325c99b1e3f2d Mon Sep 17 00:00:00 2001 From: "ns.potapov" Date: Tue, 5 Dec 2023 12:12:19 +0400 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20wa?= =?UTF-8?q?rn=20=D0=BB=D0=BE=D0=B3=D0=B8=20=D0=BD=D0=B0=20=D1=83=D0=B4?= =?UTF-8?q?=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BF=D1=83=D1=81=D1=82?= =?UTF-8?q?=D0=BE=D0=B3=D0=BE=20=D0=B8=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BF?= =?UTF-8?q?=D0=BE=D0=BB=D0=BD=D0=B5=D0=BD=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectStormtrooper/FormPlaneCollection.cs | 2 ++ .../ProjectStormtrooper/PlanesGenericCollection.cs | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ProjectStormtrooper/ProjectStormtrooper/FormPlaneCollection.cs b/ProjectStormtrooper/ProjectStormtrooper/FormPlaneCollection.cs index af3463c..2884e68 100644 --- a/ProjectStormtrooper/ProjectStormtrooper/FormPlaneCollection.cs +++ b/ProjectStormtrooper/ProjectStormtrooper/FormPlaneCollection.cs @@ -141,6 +141,7 @@ namespace ProjectStormtrooper catch (StorageOverflowException ex) { MessageBox.Show(ex.Message); + _logger.LogWarning("Ошибка добавления: " + ex.Message); } } /// @@ -182,6 +183,7 @@ namespace ProjectStormtrooper catch (PlaneNotFoundException ex) { MessageBox.Show(ex.Message); + _logger.LogWarning("Ошибка удаления: " + ex.Message); } } /// diff --git a/ProjectStormtrooper/ProjectStormtrooper/PlanesGenericCollection.cs b/ProjectStormtrooper/ProjectStormtrooper/PlanesGenericCollection.cs index 8960a66..aa3fa4a 100644 --- a/ProjectStormtrooper/ProjectStormtrooper/PlanesGenericCollection.cs +++ b/ProjectStormtrooper/ProjectStormtrooper/PlanesGenericCollection.cs @@ -70,9 +70,9 @@ namespace ProjectStormtrooper /// public static T? operator -(PlanesGenericCollection collect, int pos) { - T? obj = collect._collection[pos]; - collect._collection.Remove(pos); - return obj; + T? obj = collect._collection[pos]; + collect._collection.Remove(pos); + return obj; } /// /// Получение объекта IMoveableObject