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";