From aa44fac39e5f15811d1e7bac841399b89ea28167 Mon Sep 17 00:00:00 2001 From: NikGapon <45200250+NikGapon@users.noreply.github.com> Date: Mon, 7 Nov 2022 23:55:35 +0400 Subject: [PATCH] aeraport fix --- Airbus/Airbus/MapWithSetAirplaneGeneric.cs | 24 +++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/Airbus/Airbus/MapWithSetAirplaneGeneric.cs b/Airbus/Airbus/MapWithSetAirplaneGeneric.cs index 30b0458..83fcfdf 100644 --- a/Airbus/Airbus/MapWithSetAirplaneGeneric.cs +++ b/Airbus/Airbus/MapWithSetAirplaneGeneric.cs @@ -21,7 +21,7 @@ namespace Airbus /// /// Размер занимаемого объектом места (ширина) /// - private readonly int _placeSizeWidth = 250; + private readonly int _placeSizeWidth = 300; /// /// Размер занимаемого объектом места (высота) /// @@ -148,13 +148,23 @@ namespace Airbus Pen pen = new(Color.Black, 3); for (int i = 0; i < _pictureWidth / _placeSizeWidth; i++) { - for (int j = 0; j < _pictureHeight / _placeSizeHeight + 1; ++j) - {//линия рамзетки места - g.DrawLine(pen, i * _placeSizeWidth, j * _placeSizeHeight, i * - _placeSizeWidth + _placeSizeWidth / 2, j * _placeSizeHeight); + for (int j = 1; j < _pictureHeight / _placeSizeHeight + 1; ++j) + { + pen = new(Color.Black, 3); + g.DrawLine(pen, i * _placeSizeWidth, j * _placeSizeHeight, i * _placeSizeWidth + _placeSizeWidth / 2, j * _placeSizeHeight); + g.DrawLine(pen, i * _placeSizeWidth + _placeSizeWidth / 2 + 15, j * _placeSizeHeight, i * _placeSizeWidth + _placeSizeWidth / 2 + 20, j * _placeSizeHeight - 30); + g.DrawLine(pen, i * _placeSizeWidth + _placeSizeWidth / 2 + 20, j * _placeSizeHeight - 30, i * _placeSizeWidth + _placeSizeWidth / 2 + 30, j * _placeSizeHeight - 30); + g.DrawLine(pen, i * _placeSizeWidth + _placeSizeWidth / 2 + 30, j * _placeSizeHeight - 30, i * _placeSizeWidth + _placeSizeWidth / 2 + 35, j * _placeSizeHeight ); + + g.DrawLine(pen, i * _placeSizeWidth + _placeSizeWidth / 2 + 15, j * _placeSizeHeight - 45, i * _placeSizeWidth + _placeSizeWidth / 2 + 35, j * _placeSizeHeight - 45); + pen = new(Color.Blue, 1); + g.DrawLine(pen, i * _placeSizeWidth + _placeSizeWidth / 2 + 30, j * _placeSizeHeight - 30, i * _placeSizeWidth + _placeSizeWidth / 2 + 45, j * _placeSizeHeight - 40); + g.DrawLine(pen, i * _placeSizeWidth + _placeSizeWidth / 2 + 45, j * _placeSizeHeight - 40, i * _placeSizeWidth + _placeSizeWidth / 2 + 35, j * _placeSizeHeight - 45); + + g.DrawLine(pen, i * _placeSizeWidth + _placeSizeWidth / 2 + 20, j * _placeSizeHeight - 30, i * _placeSizeWidth + _placeSizeWidth / 2 + 5, j * _placeSizeHeight - 40); + g.DrawLine(pen, i * _placeSizeWidth + _placeSizeWidth / 2 + 5, j * _placeSizeHeight - 40, i * _placeSizeWidth + _placeSizeWidth / 2 + 15, j * _placeSizeHeight - 45); } - g.DrawLine(pen, i * _placeSizeWidth, 0, i * _placeSizeWidth, - (_pictureHeight / _placeSizeHeight) * _placeSizeHeight); + } } ///