Лаб. работа 1 готовая

This commit is contained in:
Alkin Ivan 2024-02-27 13:52:33 +04:00
parent 27cb2f471e
commit c75659a390
6 changed files with 2 additions and 9 deletions

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
 <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>

View File

@ -70,7 +70,7 @@ public class DrawningAirBomber
{
if (_drawningAirBomberHeight > height || _drawningAirBomberWidth > width)
return false;
_pictureHeight = height;
_pictureHeight = height;
_pictureWidth = width;
if (_startPosX.HasValue || _startPosY.HasValue)
@ -98,8 +98,6 @@ public class DrawningAirBomber
{
return;
}
if (!_pictureHeight.HasValue || !_pictureWidth.HasValue)
return;
if (x + _drawningAirBomberWidth > _pictureWidth) _startPosX = _pictureWidth - _drawningAirBomberWidth;
else if (x < 0) _startPosX = 0;
else _startPosX = x;
@ -209,11 +207,6 @@ public class DrawningAirBomber
Point[] BombNose2Point = { new Point(_startPosX.Value + 65, _startPosY.Value + 9), new Point(_startPosX.Value + 60, _startPosY.Value + 5), new Point(_startPosX.Value + 65, _startPosY.Value) };
g.FillPolygon(brRed, BombNose2Point);
}
//Корпус
Brush brGray = new SolidBrush(Color.Gray);

View File

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 61 KiB

View File

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

View File

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

View File

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 61 KiB