Лаб. работа 1 готовая
@ -1,4 +1,4 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
|
@ -70,7 +70,7 @@ public class DrawningAirBomber
|
|||||||
{
|
{
|
||||||
if (_drawningAirBomberHeight > height || _drawningAirBomberWidth > width)
|
if (_drawningAirBomberHeight > height || _drawningAirBomberWidth > width)
|
||||||
return false;
|
return false;
|
||||||
_pictureHeight = height;
|
_pictureHeight = height;
|
||||||
_pictureWidth = width;
|
_pictureWidth = width;
|
||||||
|
|
||||||
if (_startPosX.HasValue || _startPosY.HasValue)
|
if (_startPosX.HasValue || _startPosY.HasValue)
|
||||||
@ -98,8 +98,6 @@ public class DrawningAirBomber
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!_pictureHeight.HasValue || !_pictureWidth.HasValue)
|
|
||||||
return;
|
|
||||||
if (x + _drawningAirBomberWidth > _pictureWidth) _startPosX = _pictureWidth - _drawningAirBomberWidth;
|
if (x + _drawningAirBomberWidth > _pictureWidth) _startPosX = _pictureWidth - _drawningAirBomberWidth;
|
||||||
else if (x < 0) _startPosX = 0;
|
else if (x < 0) _startPosX = 0;
|
||||||
else _startPosX = x;
|
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) };
|
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);
|
g.FillPolygon(brRed, BombNose2Point);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Корпус
|
//Корпус
|
||||||
Brush brGray = new SolidBrush(Color.Gray);
|
Brush brGray = new SolidBrush(Color.Gray);
|
||||||
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |