diff --git a/ProjectTrolleybus/ProjectTrolleybus/CollectionGenericObjects/AbstractCompany.cs b/ProjectTrolleybus/ProjectTrolleybus/CollectionGenericObjects/AbstractCompany.cs index 68673f0..85dc5d6 100644 --- a/ProjectTrolleybus/ProjectTrolleybus/CollectionGenericObjects/AbstractCompany.cs +++ b/ProjectTrolleybus/ProjectTrolleybus/CollectionGenericObjects/AbstractCompany.cs @@ -8,7 +8,7 @@ public abstract class AbstractCompany /// /// Размер места (Ширина) /// - protected readonly int _placeSizeWidth = 225; + protected readonly int _placeSizeWidth = 250; /// /// Размер места (Высота) @@ -33,7 +33,7 @@ public abstract class AbstractCompany /// /// Вычисление максимального кол-ва объектов которое можно разместить в окне /// - private int GetMaxCount => _pictureWidth * _pictureHeight / (_placeSizeWidth); + private int GetMaxCount => _pictureWidth * _pictureHeight / (_placeSizeWidth * _placeSizeHeight); /// /// Конструктор diff --git a/ProjectTrolleybus/ProjectTrolleybus/CollectionGenericObjects/TrolleyBSharingService.cs b/ProjectTrolleybus/ProjectTrolleybus/CollectionGenericObjects/TrolleyBSharingService.cs index 84b49a1..388e88d 100644 --- a/ProjectTrolleybus/ProjectTrolleybus/CollectionGenericObjects/TrolleyBSharingService.cs +++ b/ProjectTrolleybus/ProjectTrolleybus/CollectionGenericObjects/TrolleyBSharingService.cs @@ -35,7 +35,7 @@ public class TrolleyBCarSharingService : AbstractCompany if (_collection?.Get(i) != null) { _collection?.Get(i)?.SetPictureSize(_pictureWidth, _pictureHeight); - _collection?.Get(i)?.SetPosition(_placeSizeWidth * posWidth + 4, posHeight * _placeSizeHeight + 4, width, height); + _collection?.Get(i)?.SetPosition(_placeSizeWidth * posWidth + 5, posHeight * _placeSizeHeight + 5, width, height); } if (posWidth > 0) @@ -45,7 +45,7 @@ public class TrolleyBCarSharingService : AbstractCompany posWidth = width; posHeight++; } - if (posHeight > height) + if (posHeight > height - 1) { return; }