Dolgov D.A. Lab Work 3 #3

Merged
eegov merged 6 commits from LabWork03 into LabWork02 2022-10-14 09:45:51 +04:00
Showing only changes of commit 4114801ea9 - Show all commits

View File

@ -69,6 +69,7 @@ namespace ProjectPlane
{
return map._setPlanes.Remove(position);
}
/// <summary>
/// Вывод всего набора объектов
/// </summary>
@ -165,21 +166,26 @@ namespace ProjectPlane
/// <param name="g"></param>
private void DrawPlanes(Graphics g)
{
int width = _pictureWidth / _placeSizeWidth;
int width = _pictureWidth / _placeSizeWidth - 1;
int height = _pictureHeight / _placeSizeHeight - 1;
int curWidth = 0;
int curHeight = 0;
for (int i = 0; i < _setPlanes.Count; i++)
{
_setPlanes.Get(i)?.SetObject(curWidth * _placeSizeWidth + 10, curHeight * _placeSizeHeight + 15, _pictureWidth, _pictureHeight);
_setPlanes.Get(i)?.SetObject((width) * _placeSizeWidth + 10, (height) * _placeSizeHeight + 15, _pictureWidth, _pictureHeight);
_setPlanes.Get(i)?.DrawingObject(g);
if (width <= 0)
{
width = _pictureWidth / _placeSizeWidth - 1;
height--;
}
else
{
width--;
}
}
if (curWidth < width) curWidth++;
else
{
curWidth = 0;
curHeight++;
}
}
}
}