From bda3934792de2b39082ac4cacdf2e31c22092c02 Mon Sep 17 00:00:00 2001 From: Geo7312 Date: Mon, 18 Mar 2024 09:53:51 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CollectionGenericObjects/AbstractCompany.cs | 4 ++-- .../CollectionGenericObjects/TrolleyBSharingService.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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; }