From b647c5bf839e7419604eb7ea4d910fe4bbb80bac Mon Sep 17 00:00:00 2001 From: ShuryginDima Date: Mon, 20 May 2024 15:31:50 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MassiveGenericObjects.cs | 4 ++-- .../ProjectSeaplane/FormPlaneCollection.cs | 4 ++-- .../ProjectSeaplane/ProjectSeaplane.csproj | 6 ------ ProjectSeaplane/ProjectSeaplane/nlog.config | 15 --------------- 4 files changed, 4 insertions(+), 25 deletions(-) delete mode 100644 ProjectSeaplane/ProjectSeaplane/nlog.config diff --git a/ProjectSeaplane/ProjectSeaplane/CollectionGenericObjects/MassiveGenericObjects.cs b/ProjectSeaplane/ProjectSeaplane/CollectionGenericObjects/MassiveGenericObjects.cs index ca763ee..d83b80f 100644 --- a/ProjectSeaplane/ProjectSeaplane/CollectionGenericObjects/MassiveGenericObjects.cs +++ b/ProjectSeaplane/ProjectSeaplane/CollectionGenericObjects/MassiveGenericObjects.cs @@ -70,7 +70,7 @@ public class MassiveGenericObjects : ICollectionGenericObjects public int Insert(T obj, int position) { - if (position < 0 || position >= Count) + if (position < 0) { return -1; } @@ -103,7 +103,7 @@ public class MassiveGenericObjects : ICollectionGenericObjects { try { - T obj = _collection[position]; + T? obj = _collection[position]; if (obj == null) throw new ObjectNotFoundException(position); _collection[position] = null; return obj; diff --git a/ProjectSeaplane/ProjectSeaplane/FormPlaneCollection.cs b/ProjectSeaplane/ProjectSeaplane/FormPlaneCollection.cs index 4bae1ed..4707c3f 100644 --- a/ProjectSeaplane/ProjectSeaplane/FormPlaneCollection.cs +++ b/ProjectSeaplane/ProjectSeaplane/FormPlaneCollection.cs @@ -78,7 +78,7 @@ public partial class FormPlaneCollection : Form } catch (Exception ex) { - MessageBox.Show("Объект не был добавлен"); + MessageBox.Show(ex.Message); _logger.LogError("Ошибка: {Message}", ex.Message); } } @@ -110,7 +110,7 @@ public partial class FormPlaneCollection : Form } catch (Exception ex) { - MessageBox.Show("Не удалось удалить объект"); + MessageBox.Show(ex.Message); _logger.LogError("Ошибка: {Message}", ex.Message); } diff --git a/ProjectSeaplane/ProjectSeaplane/ProjectSeaplane.csproj b/ProjectSeaplane/ProjectSeaplane/ProjectSeaplane.csproj index 8f5cda0..761ba05 100644 --- a/ProjectSeaplane/ProjectSeaplane/ProjectSeaplane.csproj +++ b/ProjectSeaplane/ProjectSeaplane/ProjectSeaplane.csproj @@ -35,10 +35,4 @@ - - - Always - - - \ No newline at end of file diff --git a/ProjectSeaplane/ProjectSeaplane/nlog.config b/ProjectSeaplane/ProjectSeaplane/nlog.config deleted file mode 100644 index 6839c03..0000000 --- a/ProjectSeaplane/ProjectSeaplane/nlog.config +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file