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