Правка

This commit is contained in:
Geo7312 2024-03-18 09:53:51 +04:00
parent 8e091196c7
commit bda3934792
2 changed files with 4 additions and 4 deletions

View File

@ -8,7 +8,7 @@ public abstract class AbstractCompany
/// <summary>
/// Размер места (Ширина)
/// </summary>
protected readonly int _placeSizeWidth = 225;
protected readonly int _placeSizeWidth = 250;
/// <summary>
/// Размер места (Высота)
@ -33,7 +33,7 @@ public abstract class AbstractCompany
/// <summary>
/// Вычисление максимального кол-ва объектов которое можно разместить в окне
/// </summary>
private int GetMaxCount => _pictureWidth * _pictureHeight / (_placeSizeWidth);
private int GetMaxCount => _pictureWidth * _pictureHeight / (_placeSizeWidth * _placeSizeHeight);
/// <summary>
/// Конструктор

View File

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