From 06302501036537fe2f2a0fe11e62e9c447fbbea5 Mon Sep 17 00:00:00 2001 From: "nikbel2004@outlook.com" Date: Sat, 9 Dec 2023 02:47:52 +0400 Subject: [PATCH] fix --- Tank/Tank/FormTanksCollections.cs | 3 +-- Tank/Tank/SetGeneric.cs | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Tank/Tank/FormTanksCollections.cs b/Tank/Tank/FormTanksCollections.cs index 88b5830..8f75556 100644 --- a/Tank/Tank/FormTanksCollections.cs +++ b/Tank/Tank/FormTanksCollections.cs @@ -64,8 +64,7 @@ namespace Tank _logger.LogInformation($"Добавлен набор: {SetTextBox.Text}"); } - private void ListBoxObjects_SelectedIndexChanged(object sender, - EventArgs e) + private void ListBoxObjects_SelectedIndexChanged(object sender, EventArgs e) { DrawTank.Image = _storage[CollectionListBox.SelectedItem?.ToString() ?? string.Empty]?.ShowTanks(); diff --git a/Tank/Tank/SetGeneric.cs b/Tank/Tank/SetGeneric.cs index b645f01..f4dc946 100644 --- a/Tank/Tank/SetGeneric.cs +++ b/Tank/Tank/SetGeneric.cs @@ -34,10 +34,10 @@ namespace Tank public bool Insert(T tank, int position) { if (position < 0 || position >= _maxCount) - throw new TankNotFoundException(position); + throw new TankNotFoundException(position); // По позиции if (Count >= _maxCount) - throw new TankStorageOverflowException(_maxCount); // Макс количество или позицию + throw new TankStorageOverflowException(_maxCount); // Макс количество в коллекции _places.Insert(0, tank); return true; }