From 0022f3d3b7d83f8f050119019b81d4cc089639e2 Mon Sep 17 00:00:00 2001
From: Dariaaaa6 <149010591+Dariaaaa6@users.noreply.github.com>
Date: Wed, 8 May 2024 14:17:04 +0400
Subject: [PATCH] =?UTF-8?q?=D0=BA=D0=BB=D0=B0=D1=81=D1=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../AbstractCompany.cs | 2 +-
.../MassiveGenericObjects.cs | 18 +++++++++++++++++-
.../FormAirplaneCollection.Designer.cs | 1 -
3 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/ProjectStormtrooper/CollectionGenericObjects/AbstractCompany.cs b/ProjectStormtrooper/CollectionGenericObjects/AbstractCompany.cs
index f20331b..2ba83d4 100644
--- a/ProjectStormtrooper/CollectionGenericObjects/AbstractCompany.cs
+++ b/ProjectStormtrooper/CollectionGenericObjects/AbstractCompany.cs
@@ -15,7 +15,7 @@ public abstract class AbstractCompany
///
/// Размер места (высота)
///
- protected readonly int _placeSizeHeight = 100;
+ protected readonly int _placeSizeHeight = 120;
///
/// Ширина окна
diff --git a/ProjectStormtrooper/CollectionGenericObjects/MassiveGenericObjects.cs b/ProjectStormtrooper/CollectionGenericObjects/MassiveGenericObjects.cs
index f9df8b6..5aea5ee 100644
--- a/ProjectStormtrooper/CollectionGenericObjects/MassiveGenericObjects.cs
+++ b/ProjectStormtrooper/CollectionGenericObjects/MassiveGenericObjects.cs
@@ -10,7 +10,23 @@ public class MassiveGenericObjects : ICollectionGenericObjects
///
private T?[] _collection;
public int Count => _collection.Length;
- public int SetMaxCount { set { if (value > 0) { _collection = new T?[value]; } } }
+ public int SetMaxCount
+ {
+ set
+ {
+ if (value > 0)
+ {
+ if (_collection.Length > 0)
+ {
+ Array.Resize(ref _collection, value);
+ }
+ else
+ {
+ _collection = new T?[value];
+ }
+ }
+ }
+ }
///
/// Конструктор
diff --git a/ProjectStormtrooper/FormAirplaneCollection.Designer.cs b/ProjectStormtrooper/FormAirplaneCollection.Designer.cs
index 06e5c6e..e1065d5 100644
--- a/ProjectStormtrooper/FormAirplaneCollection.Designer.cs
+++ b/ProjectStormtrooper/FormAirplaneCollection.Designer.cs
@@ -173,7 +173,6 @@
panelStorage.Controls.Add(radioButtonMassive);
panelStorage.Controls.Add(textBoxCollectionName);
panelStorage.Controls.Add(labelCollectionName);
- panelStorage.Controls.Add(comboBoxSelectorCompany);
panelStorage.Dock = DockStyle.Top;
panelStorage.Location = new Point(3, 24);
panelStorage.Name = "panelStorage";