Готовая третья лабораторная работа.
This commit is contained in:
parent
017b18a3db
commit
36af9579e4
@ -66,7 +66,6 @@ namespace AirplaneWithRadar
|
||||
}
|
||||
return DrawMapWithObject();
|
||||
}
|
||||
|
||||
private bool CheckBarriers(float leftMove, float rightMove, float topMove, float bottomMove)
|
||||
{
|
||||
int left = Convert.ToInt32((_drawingObject.GetCurrentPosition().Left + leftMove) / _size_x);
|
||||
@ -86,7 +85,6 @@ namespace AirplaneWithRadar
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool SetObjectOnMap()
|
||||
{
|
||||
if (_drawingObject == null || _map == null)
|
||||
|
@ -27,7 +27,6 @@ namespace AirplaneWithRadar
|
||||
{
|
||||
g.FillRectangle(roadColor, i * _size_x, j * _size_y, (i + 1) * (_size_x + 1), (j + 1) * (_size_y + 1));
|
||||
}
|
||||
|
||||
protected override void GenerateMap()
|
||||
{
|
||||
_map = new int[100, 100];
|
||||
|
@ -57,8 +57,7 @@ namespace AirplaneWithRadar
|
||||
/// <param name="bodyColor">Цвет кузова</param>
|
||||
/// <param name="airplaneWidth">Ширина отрисовки самолета</param>
|
||||
/// <param name="airplaneHeight">Высота отрисовки самолета</param>
|
||||
protected DrawingAirplane(int speed, float weight, Color bodyColor, int airplaneWidth, int airplaneHeight) :
|
||||
this(speed, weight, bodyColor)
|
||||
protected DrawingAirplane(int speed, float weight, Color bodyColor, int airplaneWidth, int airplaneHeight) : this(speed, weight, bodyColor)
|
||||
{
|
||||
_airplaneWidth = airplaneWidth;
|
||||
_airplaneHeight = airplaneHeight;
|
||||
|
@ -6,7 +6,6 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace AirplaneWithRadar
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Класс-сущность "Самолет"
|
||||
/// </summary>
|
||||
|
@ -48,7 +48,11 @@ namespace AirplaneWithRadar
|
||||
SetData();
|
||||
Draw();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Îáðàáîòêà íàæàòèÿ êíîïêè "Ñîçäàòü"
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void ButtonMove_Click(object sender, EventArgs e)
|
||||
{
|
||||
string name = ((Button)sender)?.Name ?? string.Empty;
|
||||
|
@ -148,17 +148,6 @@ namespace AirplaneWithRadar
|
||||
/// Метод отрисовки фона
|
||||
/// </summary>
|
||||
/// <param name="g"></param>
|
||||
private void DrawHangar(Graphics g, int x, int y, int width, int height)
|
||||
{
|
||||
Pen pen = new(Color.Black, 3);
|
||||
g.DrawLine(pen, x, y, x + width, y);
|
||||
g.DrawLine(pen, x, y, x, y + height + 20);
|
||||
g.DrawLine(pen, x, y + height + 20, x + width, y + height + 20);
|
||||
}
|
||||
/// <summary>
|
||||
/// Метод отрисовки фона
|
||||
/// </summary>
|
||||
/// <param name="g"></param>
|
||||
private void DrawBackground(Graphics g)
|
||||
{
|
||||
Pen pen = new(Color.White, 5);
|
||||
|
Loading…
Reference in New Issue
Block a user