From 3d5e3f3cdc16d70bd49dad0a6ed8a8c9e50fd21e Mon Sep 17 00:00:00 2001 From: gettterot Date: Sat, 20 Apr 2024 06:59:05 +0400 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=BC=D0=B5=D0=BD=D0=B8=D0=BB=20Se?= =?UTF-8?q?tMaxCount=20=D0=BD=D0=B0=20MaxCount?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CollectionGenericObjects/AbstractCompany.cs | 2 +- .../ListGenericObjects.cs | 16 +++++++++++++++- .../MassiveGenericObjects.cs | 5 +++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/ProjectLiner/ProjectLiner/CollectionGenericObjects/AbstractCompany.cs b/ProjectLiner/ProjectLiner/CollectionGenericObjects/AbstractCompany.cs index b5cc584..b8f6cd8 100644 --- a/ProjectLiner/ProjectLiner/CollectionGenericObjects/AbstractCompany.cs +++ b/ProjectLiner/ProjectLiner/CollectionGenericObjects/AbstractCompany.cs @@ -48,7 +48,7 @@ namespace ProjectLiner.CollectionGenericObjects _pictureWidth = picWidth; _pictureHeight = picHeight; _collection = collection; - _collection.SetMaxCount = GetMaxCount; + _collection.MaxCount = GetMaxCount; } /// diff --git a/ProjectLiner/ProjectLiner/CollectionGenericObjects/ListGenericObjects.cs b/ProjectLiner/ProjectLiner/CollectionGenericObjects/ListGenericObjects.cs index 771318d..0e75629 100644 --- a/ProjectLiner/ProjectLiner/CollectionGenericObjects/ListGenericObjects.cs +++ b/ProjectLiner/ProjectLiner/CollectionGenericObjects/ListGenericObjects.cs @@ -16,7 +16,21 @@ public class ListGenericObjects : ICollectionGenericObjects /// private int _maxCount; public int Count => _collection.Keys.Count; - public int MaxCount { set { if (value > 0) { _maxCount = value; } } } + public int MaxCount + { + get + { + return _maxCount; + } + + set + { + if (value > 0) + { + _maxCount = value; + } + } + } public CollectionType GetCollectionType => CollectionType.List; diff --git a/ProjectLiner/ProjectLiner/CollectionGenericObjects/MassiveGenericObjects.cs b/ProjectLiner/ProjectLiner/CollectionGenericObjects/MassiveGenericObjects.cs index 4b6ba22..8c51a0a 100644 --- a/ProjectLiner/ProjectLiner/CollectionGenericObjects/MassiveGenericObjects.cs +++ b/ProjectLiner/ProjectLiner/CollectionGenericObjects/MassiveGenericObjects.cs @@ -17,6 +17,11 @@ namespace ProjectLiner.CollectionGenericObjects public int MaxCount { + get + { + return _collection.Length; + } + set { if (value > 0)