класс

This commit is contained in:
Dariaaaa6 2024-05-08 14:17:04 +04:00
parent dd1829520c
commit 0022f3d3b7
3 changed files with 18 additions and 3 deletions

View File

@ -15,7 +15,7 @@ public abstract class AbstractCompany
/// <summary>
/// Размер места (высота)
/// </summary>
protected readonly int _placeSizeHeight = 100;
protected readonly int _placeSizeHeight = 120;
/// <summary>
/// Ширина окна

View File

@ -10,7 +10,23 @@ public class MassiveGenericObjects<T> : ICollectionGenericObjects<T>
/// </summary>
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];
}
}
}
}
/// <summary>
/// Конструктор

View File

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