Compare commits
3 Commits
41f539a290
...
46167149fa
Author | SHA1 | Date | |
---|---|---|---|
|
46167149fa | ||
|
e85d432e29 | ||
|
2cc24286b0 |
32
ProjectAirbus/ProjectAirbus/Drawnings/DirectionType.cs
Normal file
32
ProjectAirbus/ProjectAirbus/Drawnings/DirectionType.cs
Normal file
@ -0,0 +1,32 @@
|
||||
namespace ProjectAirbus.Drawnings;
|
||||
|
||||
/// <summary>
|
||||
/// Направление перемещения
|
||||
/// </summary>
|
||||
public enum DirectionType
|
||||
{
|
||||
/// <summary>
|
||||
/// Неизвестное направление
|
||||
/// </summary>
|
||||
Unknow = -1,
|
||||
|
||||
/// <summary>
|
||||
/// Вверх
|
||||
/// </summary>
|
||||
Up = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Вниз
|
||||
/// </summary>
|
||||
Down = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Влево
|
||||
/// </summary>
|
||||
Left = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Вправо
|
||||
/// </summary>
|
||||
Right = 4
|
||||
}
|
62
ProjectAirbus/ProjectAirbus/Drawnings/DrawningAirbus.cs
Normal file
62
ProjectAirbus/ProjectAirbus/Drawnings/DrawningAirbus.cs
Normal file
@ -0,0 +1,62 @@
|
||||
using ProjectAirbus.Entities;
|
||||
|
||||
namespace ProjectAirbus.Drawnings;
|
||||
|
||||
/// <summary>
|
||||
/// Класс, отвечающий за прорисовку и перемещение объекта-сущности
|
||||
/// </summary>
|
||||
public class DrawningAirbus : DrawningBus
|
||||
{
|
||||
/// <summary>
|
||||
/// Конструктор
|
||||
/// </summary>
|
||||
/// <param name="speed">Скорость</param>
|
||||
/// <param name="weight">Вес</param>
|
||||
/// <param name="bodyColor">Основной цвет</param>
|
||||
/// <param name="additionalColor">Дополнительный цвет</param>
|
||||
/// <param name="passengerSection">Признак наличия пассажирского отсека</param>
|
||||
/// <param name="engines">Признак наличия двигателя</param>
|
||||
public DrawningAirbus(int speed, double weight, Color bodyColor, Color additionalColor, bool passengerSection, bool engines) : base(155, 70)
|
||||
{
|
||||
EntityBus = new EntityAirbus(speed, weight, bodyColor, additionalColor, passengerSection, engines);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Прорисовка объекта
|
||||
/// </summary>
|
||||
/// <param name="g"></param>
|
||||
public override void DrawTransport(Graphics g)
|
||||
{
|
||||
if (EntityBus == null || EntityBus is not EntityAirbus airbus || !_startPosX.HasValue || !_startPosY.HasValue)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Pen pen = new(Color.Black, 3);
|
||||
Brush additionalBrush = new SolidBrush(airbus.AdditionalColor);
|
||||
|
||||
// доп. отсек для пассажиров
|
||||
Point[] pointsSection =
|
||||
{
|
||||
new Point(_startPosX.Value + 45, _startPosY.Value + 30),
|
||||
new Point(_startPosX.Value + 65, _startPosY.Value + 20),
|
||||
new Point(_startPosX.Value + 95, _startPosY.Value + 20),
|
||||
new Point(_startPosX.Value + 115, _startPosY.Value + 30)
|
||||
};
|
||||
|
||||
if (airbus.PassengerSection)
|
||||
{
|
||||
g.FillPolygon(additionalBrush, pointsSection);
|
||||
g.DrawPolygon(pen, pointsSection);
|
||||
}
|
||||
|
||||
base.DrawTransport(g);
|
||||
|
||||
//доп. двигатель
|
||||
if (airbus.Engines)
|
||||
{
|
||||
g.FillEllipse(additionalBrush, _startPosX.Value, _startPosY.Value + 30, 35, 15);
|
||||
g.DrawEllipse(pen, _startPosX.Value, _startPosY.Value + 30, 35, 15);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,14 +1,16 @@
|
||||
namespace ProjectAirbus;
|
||||
using ProjectAirbus.Entities;
|
||||
|
||||
namespace ProjectAirbus.Drawnings;
|
||||
|
||||
/// <summary>
|
||||
/// Класс, отвечающий за прорисовку и перемещение объекта-сущности
|
||||
/// Класс, отвечающий за прорисовку и перемещение базового объекта-сущности
|
||||
/// </summary>
|
||||
public class DrawningAirbus
|
||||
public class DrawningBus
|
||||
{
|
||||
/// <summary>
|
||||
/// Класс-сущность
|
||||
/// </summary>
|
||||
public EntityAirbus? EntityAirbus { get; private set; }
|
||||
public EntityBus? EntityBus { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Ширина окна
|
||||
@ -23,12 +25,12 @@ public class DrawningAirbus
|
||||
/// <summary>
|
||||
/// Левая координата прорисовки аэробуса
|
||||
/// </summary>
|
||||
private int? _startPosX;
|
||||
protected int? _startPosX;
|
||||
|
||||
/// <summary>
|
||||
/// Верхняя кооридната прорисовки аэробуса
|
||||
/// </summary>
|
||||
private int? _startPosY;
|
||||
protected int? _startPosY;
|
||||
|
||||
/// <summary>
|
||||
/// Ширина прорисовки аэробуса
|
||||
@ -41,24 +43,58 @@ public class DrawningAirbus
|
||||
private readonly int _drawningAirbusHeight = 70;
|
||||
|
||||
/// <summary>
|
||||
/// Инициализация свойств
|
||||
/// Координата X объекта
|
||||
/// </summary>
|
||||
public int? GetPosX => _startPosX;
|
||||
|
||||
/// <summary>
|
||||
/// Координата Y объекта
|
||||
/// </summary>
|
||||
/// <param name="speed">Скорость</param>
|
||||
/// <param name="weight">Вес</param>
|
||||
/// <param name="bodyColor">Основной цвет</param>
|
||||
/// <param name="additionalColor">Дополнительный цвет</param>
|
||||
/// <param name="passengerSection">Признак наличия пассажирского отсека</param>
|
||||
/// <param name="engines">Признак наличия двигателя</param>
|
||||
public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool passengerSection, bool engines)
|
||||
public int? GetPosY => _startPosY;
|
||||
|
||||
/// <summary>
|
||||
/// Ширина объекта
|
||||
/// </summary>
|
||||
public int GetWidth => _drawningAirbusWidth;
|
||||
|
||||
/// <summary>
|
||||
/// Высота объекта
|
||||
/// </summary>
|
||||
public int GetHeight => _drawningAirbusHeight;
|
||||
|
||||
/// <summary>
|
||||
/// Пустой конструктор
|
||||
/// </summary>
|
||||
private DrawningBus()
|
||||
{
|
||||
EntityAirbus = new EntityAirbus();
|
||||
EntityAirbus.Init(speed, weight, bodyColor, additionalColor, passengerSection, engines);
|
||||
_pictureWidth = null;
|
||||
_pictureHeight = null;
|
||||
_startPosX = null;
|
||||
_startPosY = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Конструктор
|
||||
/// </summary>
|
||||
/// <param name="speed">Скорость</param>
|
||||
/// <param name="weight">Вес</param>
|
||||
/// <param name="bodyColor">Основной цвет</param>
|
||||
public DrawningBus(int speed, double weight, Color bodyColor) : this()
|
||||
{
|
||||
EntityBus = new EntityBus(speed, weight, bodyColor);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Конструктор для наследников
|
||||
/// </summary>
|
||||
/// <param name="drawningAirbusWidth">Ширина прорисовки аэробуса</param>
|
||||
/// <param name="drawningAirbusHeight">Высота прорисовки аэробуса</param>
|
||||
protected DrawningBus(int drawningAirbusWidth, int drawningAirbusHeight) : this()
|
||||
{
|
||||
_drawningAirbusWidth = drawningAirbusWidth;
|
||||
_drawningAirbusHeight = drawningAirbusHeight;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Установка границ поля
|
||||
/// </summary>
|
||||
@ -105,7 +141,7 @@ public class DrawningAirbus
|
||||
if (x + _drawningAirbusWidth > _pictureWidth)
|
||||
{
|
||||
_startPosX = _pictureWidth - _drawningAirbusWidth;
|
||||
}
|
||||
}
|
||||
else if (x < 0)
|
||||
{
|
||||
_startPosX = 0;
|
||||
@ -115,13 +151,13 @@ public class DrawningAirbus
|
||||
_startPosX = x;
|
||||
}
|
||||
|
||||
if (y + _drawningAirbusHeight > _pictureHeight)
|
||||
if (y + _drawningAirbusHeight > _pictureHeight)
|
||||
{
|
||||
_startPosY = _pictureHeight - _drawningAirbusHeight;
|
||||
}
|
||||
}
|
||||
else if (y < 0)
|
||||
{
|
||||
_startPosY= 0;
|
||||
_startPosY = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -136,7 +172,7 @@ public class DrawningAirbus
|
||||
/// <returns>true - перемещене выполнено, false - перемещение невозможно</returns>
|
||||
public bool MoveTransport(DirectionType direction)
|
||||
{
|
||||
if (EntityAirbus == null || !_startPosX.HasValue || !_startPosY.HasValue)
|
||||
if (EntityBus == null || !_startPosX.HasValue || !_startPosY.HasValue)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -145,30 +181,30 @@ public class DrawningAirbus
|
||||
{
|
||||
//влево
|
||||
case DirectionType.Left:
|
||||
if (_startPosX.Value - EntityAirbus.Step > 0)
|
||||
if (_startPosX.Value - EntityBus.Step > 0)
|
||||
{
|
||||
_startPosX -= (int)EntityAirbus.Step;
|
||||
_startPosX -= (int)EntityBus.Step;
|
||||
}
|
||||
return true;
|
||||
//вверх
|
||||
case DirectionType.Up:
|
||||
if (_startPosY.Value - EntityAirbus.Step > 0)
|
||||
if (_startPosY.Value - EntityBus.Step > 0)
|
||||
{
|
||||
_startPosY -= (int)EntityAirbus.Step;
|
||||
_startPosY -= (int)EntityBus.Step;
|
||||
}
|
||||
return true;
|
||||
// вправо
|
||||
case DirectionType.Right:
|
||||
if (_startPosX.Value + EntityAirbus.Step + _drawningAirbusWidth < _pictureWidth)
|
||||
if (_startPosX.Value + EntityBus.Step + _drawningAirbusWidth < _pictureWidth)
|
||||
{
|
||||
_startPosX += (int)EntityAirbus.Step;
|
||||
_startPosX += (int)EntityBus.Step;
|
||||
}
|
||||
return true;
|
||||
//вниз
|
||||
case DirectionType.Down:
|
||||
if (_startPosY.Value + EntityAirbus.Step + _drawningAirbusHeight < _pictureHeight)
|
||||
if (_startPosY.Value + EntityBus.Step + _drawningAirbusHeight < _pictureHeight)
|
||||
{
|
||||
_startPosY += (int)EntityAirbus.Step;
|
||||
_startPosY += (int)EntityBus.Step;
|
||||
}
|
||||
return true;
|
||||
default:
|
||||
@ -180,46 +216,30 @@ public class DrawningAirbus
|
||||
/// Прорисовка объекта
|
||||
/// </summary>
|
||||
/// <param name="g"></param>
|
||||
public void DrawTransport(Graphics g)
|
||||
public virtual void DrawTransport(Graphics g)
|
||||
{
|
||||
if (EntityAirbus == null || !_startPosX.HasValue || !_startPosY.HasValue)
|
||||
if (EntityBus == null || !_startPosX.HasValue || !_startPosY.HasValue)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Pen pen = new(Color.Black, 3);
|
||||
Brush additionalBrush = new SolidBrush(EntityAirbus.AdditionalColor);
|
||||
|
||||
Point[] pointsSection =
|
||||
{
|
||||
new Point(_startPosX.Value + 45, _startPosY.Value + 30),
|
||||
new Point(_startPosX.Value + 65, _startPosY.Value + 20),
|
||||
new Point(_startPosX.Value + 95, _startPosY.Value + 20),
|
||||
new Point(_startPosX.Value + 115, _startPosY.Value + 30)
|
||||
};
|
||||
|
||||
// доп. отсек для пассажиров
|
||||
if (EntityAirbus.PassengerSection)
|
||||
{
|
||||
g.FillPolygon(additionalBrush, pointsSection);
|
||||
g.DrawPolygon(pen, pointsSection);
|
||||
}
|
||||
|
||||
//границы аэробуса
|
||||
//границы
|
||||
Point[] pointsWing =
|
||||
{
|
||||
new Point(_startPosX.Value + 1, _startPosY.Value + 1),
|
||||
new Point(_startPosX.Value + 1, _startPosY.Value + 44),
|
||||
new Point(_startPosX.Value + 45, _startPosY.Value + 44),
|
||||
new Point(_startPosX.Value + 45, _startPosY.Value + 33),
|
||||
new Point(_startPosX.Value + 25, _startPosY.Value + 33)
|
||||
new Point(_startPosX.Value + 1, _startPosY.Value + 1),
|
||||
new Point(_startPosX.Value + 1, _startPosY.Value + 44),
|
||||
new Point(_startPosX.Value + 45, _startPosY.Value + 44),
|
||||
new Point(_startPosX.Value + 45, _startPosY.Value + 33),
|
||||
new Point(_startPosX.Value + 25, _startPosY.Value + 33)
|
||||
};
|
||||
|
||||
Point[] pointsWindow =
|
||||
{
|
||||
new Point(_startPosX.Value + 115, _startPosY.Value + 33),
|
||||
new Point(_startPosX.Value + 115, _startPosY.Value + 40),
|
||||
new Point(_startPosX.Value + 155, _startPosY.Value + 40)
|
||||
new Point(_startPosX.Value + 115, _startPosY.Value + 33),
|
||||
new Point(_startPosX.Value + 115, _startPosY.Value + 40),
|
||||
new Point(_startPosX.Value + 155, _startPosY.Value + 40)
|
||||
};
|
||||
|
||||
g.DrawLine(pen, _startPosX.Value, _startPosY.Value, _startPosX.Value, _startPosY.Value + 47);
|
||||
@ -228,7 +248,7 @@ public class DrawningAirbus
|
||||
g.DrawArc(pen, _startPosX.Value, _startPosY.Value + 30, 150, 30, -45, 225);
|
||||
|
||||
//закраска
|
||||
Brush br = new SolidBrush(EntityAirbus.BodyColor);
|
||||
Brush br = new SolidBrush(EntityBus.BodyColor);
|
||||
g.FillEllipse(br, _startPosX.Value + 1, _startPosY.Value + 31, 149, 29);
|
||||
g.FillPolygon(br, pointsWing);
|
||||
g.DrawLine(new Pen(Color.Black, 5), _startPosX.Value + 45, _startPosY.Value + 45, _startPosX.Value + 100, _startPosY.Value + 45);
|
||||
@ -247,12 +267,5 @@ public class DrawningAirbus
|
||||
g.DrawLine(pen, _startPosX.Value + 115, _startPosY.Value + 33, _startPosX.Value + 115, _startPosY.Value + 40);
|
||||
g.DrawLine(pen, _startPosX.Value + 115, _startPosY.Value + 40, _startPosX.Value + 150, _startPosY.Value + 40);
|
||||
g.DrawLine(pen, _startPosX.Value + 150, _startPosY.Value + 40, _startPosX.Value + 115, _startPosY.Value + 33);
|
||||
|
||||
//доп. двигатель
|
||||
if (EntityAirbus.Engines)
|
||||
{
|
||||
g.FillEllipse(additionalBrush, _startPosX.Value, _startPosY.Value + 30, 35, 15);
|
||||
g.DrawEllipse(pen, _startPosX.Value, _startPosY.Value + 30, 35, 15);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,25 +1,10 @@
|
||||
namespace ProjectAirbus;
|
||||
namespace ProjectAirbus.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Класс-сущность "Аэробус"
|
||||
/// </summary>
|
||||
public class EntityAirbus
|
||||
public class EntityAirbus : EntityBus
|
||||
{
|
||||
/// <summary>
|
||||
/// Скорость
|
||||
/// </summary>
|
||||
public int Speed { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Вес
|
||||
/// </summary>
|
||||
public double Weight { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Основной цвет
|
||||
/// </summary>
|
||||
public Color BodyColor { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Дополнительный цвет (для опциональных элементов)
|
||||
/// </summary>
|
||||
@ -37,12 +22,7 @@ public class EntityAirbus
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Шаг перемещения автомобиля
|
||||
/// </summary>
|
||||
public double Step => Speed * 100 / Weight;
|
||||
|
||||
/// <summary>
|
||||
/// Инициализация полей объекта-класса аэробус
|
||||
/// Конструктор
|
||||
/// </summary>
|
||||
/// <param name="speed">Скорость</param>
|
||||
/// <param name="weight">Вес автомобиля</param>
|
||||
@ -50,11 +30,8 @@ public class EntityAirbus
|
||||
/// <param name="additionalColor">Дополнительный цвет</param>
|
||||
/// <param name="passengerSection">Признак наличия доп. пассажирского отсека</param>
|
||||
/// <param name="engines">Признак наличия доп. двигателей</param>
|
||||
public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool passengerSection, bool engines)
|
||||
public EntityAirbus(int speed, double weight, Color bodyColor, Color additionalColor, bool passengerSection, bool engines) : base(speed, weight, bodyColor)
|
||||
{
|
||||
Speed = speed;
|
||||
Weight = weight;
|
||||
BodyColor = bodyColor;
|
||||
AdditionalColor = additionalColor;
|
||||
PassengerSection = passengerSection;
|
||||
Engines = engines;
|
41
ProjectAirbus/ProjectAirbus/Entities/EntityBus.cs
Normal file
41
ProjectAirbus/ProjectAirbus/Entities/EntityBus.cs
Normal file
@ -0,0 +1,41 @@
|
||||
namespace ProjectAirbus.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Класс-сущность "Самолет"
|
||||
/// </summary>
|
||||
public class EntityBus
|
||||
{
|
||||
/// <summary>
|
||||
/// Скорость
|
||||
/// </summary>
|
||||
public int Speed { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Вес
|
||||
/// </summary>
|
||||
public double Weight { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Основной цвет
|
||||
/// </summary>
|
||||
public Color BodyColor { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Шаг перемещения автомобиля
|
||||
/// </summary>
|
||||
public double Step => Speed * 100 / Weight;
|
||||
|
||||
/// <summary>
|
||||
/// Конструктор сущности
|
||||
/// </summary>
|
||||
/// <param name="speed">Скорость</param>
|
||||
/// <param name="weight">Вес автомобиля</param>
|
||||
/// <param name="bodyColor">Основной цвет</param>
|
||||
|
||||
public EntityBus(int speed, double weight, Color bodyColor)
|
||||
{
|
||||
Speed = speed;
|
||||
Weight = weight;
|
||||
BodyColor = bodyColor;
|
||||
}
|
||||
}
|
46
ProjectAirbus/ProjectAirbus/FormAirbus.Designer.cs
generated
46
ProjectAirbus/ProjectAirbus/FormAirbus.Designer.cs
generated
@ -34,6 +34,9 @@
|
||||
buttonRight = new Button();
|
||||
buttonDown = new Button();
|
||||
buttonUp = new Button();
|
||||
buttonCreateBus = new Button();
|
||||
comboBoxStrategy = new ComboBox();
|
||||
buttonStrategyStep = new Button();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBoxAirbus).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
@ -51,11 +54,11 @@
|
||||
buttonCreate.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
|
||||
buttonCreate.Location = new Point(22, 721);
|
||||
buttonCreate.Name = "buttonCreate";
|
||||
buttonCreate.Size = new Size(118, 41);
|
||||
buttonCreate.Size = new Size(231, 41);
|
||||
buttonCreate.TabIndex = 1;
|
||||
buttonCreate.Text = "Создать";
|
||||
buttonCreate.Text = "Создать аэробус";
|
||||
buttonCreate.UseVisualStyleBackColor = true;
|
||||
buttonCreate.Click += ButtonCreate_Click;
|
||||
buttonCreate.Click += ButtonCreateAirbus_Click;
|
||||
//
|
||||
// buttonLeft
|
||||
//
|
||||
@ -105,11 +108,45 @@
|
||||
buttonUp.UseVisualStyleBackColor = true;
|
||||
buttonUp.Click += ButtonMove_Click;
|
||||
//
|
||||
// buttonCreateBus
|
||||
//
|
||||
buttonCreateBus.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
|
||||
buttonCreateBus.Location = new Point(291, 721);
|
||||
buttonCreateBus.Name = "buttonCreateBus";
|
||||
buttonCreateBus.Size = new Size(231, 41);
|
||||
buttonCreateBus.TabIndex = 6;
|
||||
buttonCreateBus.Text = "Создать самолет";
|
||||
buttonCreateBus.UseVisualStyleBackColor = true;
|
||||
buttonCreateBus.Click += buttonCreateBus_Click;
|
||||
//
|
||||
// comboBoxStrategy
|
||||
//
|
||||
comboBoxStrategy.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||
comboBoxStrategy.FormattingEnabled = true;
|
||||
comboBoxStrategy.Items.AddRange(new object[] { "К центру", "К краю" });
|
||||
comboBoxStrategy.Location = new Point(1147, 12);
|
||||
comboBoxStrategy.Name = "comboBoxStrategy";
|
||||
comboBoxStrategy.Size = new Size(242, 40);
|
||||
comboBoxStrategy.TabIndex = 7;
|
||||
//
|
||||
// buttonStrategyStep
|
||||
//
|
||||
buttonStrategyStep.Location = new Point(1283, 58);
|
||||
buttonStrategyStep.Name = "buttonStrategyStep";
|
||||
buttonStrategyStep.Size = new Size(106, 46);
|
||||
buttonStrategyStep.TabIndex = 8;
|
||||
buttonStrategyStep.Text = "Шаг";
|
||||
buttonStrategyStep.UseVisualStyleBackColor = true;
|
||||
buttonStrategyStep.Click += buttonStrategyStep_Click;
|
||||
//
|
||||
// FormAirbus
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(13F, 32F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(1401, 784);
|
||||
Controls.Add(buttonStrategyStep);
|
||||
Controls.Add(comboBoxStrategy);
|
||||
Controls.Add(buttonCreateBus);
|
||||
Controls.Add(buttonUp);
|
||||
Controls.Add(buttonDown);
|
||||
Controls.Add(buttonRight);
|
||||
@ -130,5 +167,8 @@
|
||||
private Button buttonRight;
|
||||
private Button buttonDown;
|
||||
private Button buttonUp;
|
||||
private Button buttonCreateBus;
|
||||
private ComboBox comboBoxStrategy;
|
||||
private Button buttonStrategyStep;
|
||||
}
|
||||
}
|
@ -1,4 +1,7 @@
|
||||
namespace ProjectAirbus;
|
||||
using ProjectAirbus.Drawnings;
|
||||
using ProjectAirbus.MovementStrategy;
|
||||
|
||||
namespace ProjectAirbus;
|
||||
|
||||
/// <summary>
|
||||
/// Форма работы с объектом "Аэробус"
|
||||
@ -8,7 +11,12 @@ public partial class FormAirbus : Form
|
||||
/// <summary>
|
||||
/// Поле-объект для прорисовки объекта
|
||||
/// </summary>
|
||||
private DrawningAirbus? _drawningAirbus;
|
||||
private DrawningBus? _drawningBus;
|
||||
|
||||
/// <summary>
|
||||
/// Стратегия перемещения
|
||||
/// </summary>
|
||||
private AbstractStrategy? _strategy;
|
||||
|
||||
/// <summary>
|
||||
/// Конструктор формы
|
||||
@ -16,6 +24,7 @@ public partial class FormAirbus : Form
|
||||
public FormAirbus()
|
||||
{
|
||||
InitializeComponent();
|
||||
_strategy = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -23,33 +32,65 @@ public partial class FormAirbus : Form
|
||||
/// </summary>
|
||||
private void Draw()
|
||||
{
|
||||
if (_drawningAirbus == null)
|
||||
if (_drawningBus == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Bitmap bmp = new(pictureBoxAirbus.Width, pictureBoxAirbus.Height);
|
||||
Graphics gr = Graphics.FromImage(bmp);
|
||||
_drawningAirbus.DrawTransport(gr);
|
||||
_drawningBus.DrawTransport(gr);
|
||||
pictureBoxAirbus.Image = bmp;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Обработка нажатия кнопки "Создать"
|
||||
/// Создание объекта класса-перемещения
|
||||
/// </summary>
|
||||
/// <param name="type">Тип создаваемого объекта</param>
|
||||
private void CreateObject(string type)
|
||||
{
|
||||
Random random = new();
|
||||
switch (type)
|
||||
{
|
||||
case nameof(DrawningBus):
|
||||
_drawningBus = new DrawningBus(random.Next(100, 300), random.Next(1000, 3000),
|
||||
Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)));
|
||||
break;
|
||||
case nameof(DrawningAirbus):
|
||||
_drawningBus = new DrawningAirbus(random.Next(100, 300), random.Next(1000, 3000),
|
||||
Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)),
|
||||
Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)),
|
||||
Convert.ToBoolean(random.Next(0, 2)), Convert.ToBoolean(random.Next(0, 2)));
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
_drawningBus.SetPictureSize(pictureBoxAirbus.Width, pictureBoxAirbus.Height);
|
||||
_drawningBus.SetPosition(random.Next(10, 100), random.Next(10, 100));
|
||||
_strategy = null;
|
||||
comboBoxStrategy.Enabled = true;
|
||||
Draw();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Обработка нажатия кнопки "Создать аэробус"
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void ButtonCreate_Click(object sender, EventArgs e)
|
||||
private void ButtonCreateAirbus_Click(object sender, EventArgs e)
|
||||
{
|
||||
Random random = new();
|
||||
_drawningAirbus = new DrawningAirbus();
|
||||
_drawningAirbus.Init(random.Next(100, 300), random.Next(1000, 3000),
|
||||
Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)),
|
||||
Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)),
|
||||
Convert.ToBoolean(random.Next(0, 2)), Convert.ToBoolean(random.Next(0, 2)));
|
||||
_drawningAirbus.SetPictureSize(pictureBoxAirbus.Width, pictureBoxAirbus.Height);
|
||||
_drawningAirbus.SetPosition(random.Next(10, 100), random.Next(10, 100));
|
||||
Draw();
|
||||
CreateObject(nameof(DrawningAirbus));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Обработка нажатия кнопки "Создать самолет"
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void buttonCreateBus_Click(object sender, EventArgs e)
|
||||
{
|
||||
CreateObject(nameof(DrawningBus));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -59,7 +100,7 @@ public partial class FormAirbus : Form
|
||||
/// <param name="e"></param>
|
||||
private void ButtonMove_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (_drawningAirbus == null)
|
||||
if (_drawningBus == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -69,16 +110,16 @@ public partial class FormAirbus : Form
|
||||
switch (name)
|
||||
{
|
||||
case "buttonUp":
|
||||
result = _drawningAirbus.MoveTransport(DirectionType.Up);
|
||||
result = _drawningBus.MoveTransport(DirectionType.Up);
|
||||
break;
|
||||
case "buttonDown":
|
||||
result = _drawningAirbus.MoveTransport(DirectionType.Down);
|
||||
result = _drawningBus.MoveTransport(DirectionType.Down);
|
||||
break;
|
||||
case "buttonLeft":
|
||||
result = _drawningAirbus.MoveTransport(DirectionType.Left);
|
||||
result = _drawningBus.MoveTransport(DirectionType.Left);
|
||||
break;
|
||||
case "buttonRight":
|
||||
result = _drawningAirbus.MoveTransport(DirectionType.Right);
|
||||
result = _drawningBus.MoveTransport(DirectionType.Right);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -87,5 +128,49 @@ public partial class FormAirbus : Form
|
||||
Draw();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Обработка нажатия кнопки "Шаг"
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
|
||||
private void buttonStrategyStep_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (_drawningBus == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (comboBoxStrategy.Enabled)
|
||||
{
|
||||
_strategy = comboBoxStrategy.SelectedIndex switch
|
||||
{
|
||||
0 => new MoveToCenter(),
|
||||
1 => new MoveToBorder(),
|
||||
_ => null,
|
||||
};
|
||||
if (_strategy == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
_strategy.SetData(new MoveableBus(_drawningBus), pictureBoxAirbus.Width, pictureBoxAirbus.Height);
|
||||
}
|
||||
|
||||
if (_strategy == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
comboBoxStrategy.Enabled = false;
|
||||
_strategy.MakeStep();
|
||||
Draw();
|
||||
|
||||
if (_strategy.GetStatus() == StrategyStatus.Finish)
|
||||
{
|
||||
comboBoxStrategy.Enabled = true;
|
||||
_strategy = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
139
ProjectAirbus/ProjectAirbus/MovementStrategy/AbstractStrategy.cs
Normal file
139
ProjectAirbus/ProjectAirbus/MovementStrategy/AbstractStrategy.cs
Normal file
@ -0,0 +1,139 @@
|
||||
namespace ProjectAirbus.MovementStrategy;
|
||||
|
||||
/// <summary>
|
||||
/// Класс-стратегия перемещения объекта
|
||||
/// </summary>
|
||||
public abstract class AbstractStrategy
|
||||
{
|
||||
/// <summary>
|
||||
/// Перемещаемый объект
|
||||
/// </summary>
|
||||
private IMoveableObject? _moveableObject;
|
||||
|
||||
/// <summary>
|
||||
/// Статус перемещения
|
||||
/// </summary>
|
||||
private StrategyStatus _state = StrategyStatus.NotInit;
|
||||
|
||||
/// <summary>
|
||||
/// Ширина поля
|
||||
/// </summary>
|
||||
protected int FieldWidth { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Высота поля
|
||||
/// </summary>
|
||||
protected int FieldHeight { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Статус перемещения
|
||||
/// </summary>
|
||||
public StrategyStatus GetStatus() { return _state; }
|
||||
|
||||
/// <summary>
|
||||
/// Установка данных
|
||||
/// </summary>
|
||||
/// <param name="moveableObject">Перемещаемый объект</param>
|
||||
/// <param name="width">Ширина поля</param>
|
||||
/// <param name="height">Высота поля</param>
|
||||
public void SetData(IMoveableObject moveableObject, int width, int height)
|
||||
{
|
||||
if (moveableObject == null)
|
||||
{
|
||||
_state = StrategyStatus.NotInit;
|
||||
return;
|
||||
}
|
||||
|
||||
_state = StrategyStatus.InProgress;
|
||||
_moveableObject = moveableObject;
|
||||
FieldWidth = width;
|
||||
FieldHeight = height;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Шаг перемещения
|
||||
/// </summary>
|
||||
public void MakeStep()
|
||||
{
|
||||
if (_state != StrategyStatus.InProgress)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (IsTargetDestinaion())
|
||||
{
|
||||
_state = StrategyStatus.Finish;
|
||||
return;
|
||||
}
|
||||
|
||||
MoveToTarget();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Перемещение влево
|
||||
/// </summary>
|
||||
/// <returns>Результат перемещения (true - удалось переместиться, false - неудача)</returns>
|
||||
protected bool MoveLeft() => MoveTo(MovementDirection.Left);
|
||||
|
||||
/// <summary>
|
||||
/// Перемещение вправо
|
||||
/// </summary>
|
||||
/// <returns>Результат перемещения (true - удалось переместиться, false - неудача)</returns>
|
||||
protected bool MoveRight() => MoveTo(MovementDirection.Right);
|
||||
|
||||
/// <summary>
|
||||
/// Перемещение вверх
|
||||
/// </summary>
|
||||
/// <returns>Результат перемещения (true - удалось переместиться, false - неудача)</returns>
|
||||
protected bool MoveUp() => MoveTo(MovementDirection.Up);
|
||||
|
||||
/// <summary>
|
||||
/// Перемещение вниз
|
||||
/// </summary>
|
||||
/// <returns>Результат перемещения (true - удалось переместиться, false - неудача)</returns>
|
||||
protected bool MoveDown() => MoveTo(MovementDirection.Down);
|
||||
|
||||
/// <summary>
|
||||
/// Параметры объекта
|
||||
/// </summary>
|
||||
protected ObjectParameters? GetObjectParameters => _moveableObject?.GetObjectPosition;
|
||||
|
||||
/// <summary>
|
||||
/// Шаг объекта
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected int? GetStep()
|
||||
{
|
||||
if (_state != StrategyStatus.InProgress)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return _moveableObject?.GetStep;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Перемещение к цели
|
||||
/// </summary>
|
||||
protected abstract void MoveToTarget();
|
||||
|
||||
/// <summary>
|
||||
/// Достигнута ли цель
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected abstract bool IsTargetDestinaion();
|
||||
|
||||
/// <summary>
|
||||
/// Попытка перемещения в требуемом направлении
|
||||
/// </summary>
|
||||
/// <param name="movementDirection">Направление</param>
|
||||
/// <returns>Результат попытки (true - удалось переместиться, false - неудача)</returns>
|
||||
private bool MoveTo(MovementDirection movementDirection)
|
||||
{
|
||||
if (_state != StrategyStatus.InProgress)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return _moveableObject?.TryMoveObject(movementDirection) ?? false;
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
namespace ProjectAirbus.MovementStrategy;
|
||||
|
||||
/// <summary>
|
||||
/// Интерфейс для работы с перемещаемым объектом
|
||||
/// </summary>
|
||||
public interface IMoveableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Получение координаты объекта
|
||||
/// </summary>
|
||||
ObjectParameters? GetObjectPosition { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Шаг объекта
|
||||
/// </summary>
|
||||
int GetStep { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Попытка переместить объект в указанном направлении
|
||||
/// </summary>
|
||||
/// <param name="direction">Направление</param>
|
||||
/// <returns>true - объект перемещен, false - перемещение невозможно</returns>
|
||||
bool TryMoveObject(MovementDirection direction);
|
||||
}
|
46
ProjectAirbus/ProjectAirbus/MovementStrategy/MoveToBorder.cs
Normal file
46
ProjectAirbus/ProjectAirbus/MovementStrategy/MoveToBorder.cs
Normal file
@ -0,0 +1,46 @@
|
||||
namespace ProjectAirbus.MovementStrategy;
|
||||
|
||||
/// <summary>
|
||||
/// Стратегия перемещения объекта в край экрана
|
||||
/// </summary>
|
||||
|
||||
public class MoveToBorder : AbstractStrategy
|
||||
{
|
||||
protected override bool IsTargetDestinaion()
|
||||
{
|
||||
ObjectParameters? objParams = GetObjectParameters;
|
||||
if (objParams == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return (objParams.RightBorder + GetStep() >= FieldWidth &&
|
||||
objParams.DownBorder + GetStep() >= FieldHeight) ||
|
||||
(objParams.LeftBorder - GetStep() <= 0 &&
|
||||
objParams.TopBorder - GetStep() <= 0);
|
||||
}
|
||||
|
||||
protected override void MoveToTarget()
|
||||
{
|
||||
ObjectParameters? objParams = GetObjectParameters;
|
||||
if (objParams == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ((objParams.RightBorder > FieldHeight / 2) && (objParams.DownBorder > FieldHeight / 2))
|
||||
{
|
||||
if (objParams.RightBorder + GetStep() <= FieldWidth)
|
||||
MoveRight();
|
||||
if (objParams.DownBorder + GetStep() <= FieldHeight)
|
||||
MoveDown();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (objParams.LeftBorder - GetStep() >= 0)
|
||||
MoveLeft();
|
||||
if (objParams.TopBorder - GetStep() >= 0)
|
||||
MoveUp();
|
||||
}
|
||||
}
|
||||
}
|
56
ProjectAirbus/ProjectAirbus/MovementStrategy/MoveToCenter.cs
Normal file
56
ProjectAirbus/ProjectAirbus/MovementStrategy/MoveToCenter.cs
Normal file
@ -0,0 +1,56 @@
|
||||
namespace ProjectAirbus.MovementStrategy;
|
||||
|
||||
/// <summary>
|
||||
/// Стратегия перемещения объекта в центр экрана
|
||||
/// </summary>
|
||||
public class MoveToCenter : AbstractStrategy
|
||||
{
|
||||
protected override bool IsTargetDestinaion()
|
||||
{
|
||||
ObjectParameters? objParams = GetObjectParameters;
|
||||
if (objParams == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return objParams.ObjectMiddleHorizontal - GetStep() <= FieldWidth / 2 &&
|
||||
objParams.ObjectMiddleHorizontal + GetStep() >= FieldWidth / 2 &&
|
||||
objParams.ObjectMiddleVertical - GetStep() <= FieldHeight / 2 &&
|
||||
objParams.ObjectMiddleVertical + GetStep() >= FieldHeight / 2;
|
||||
}
|
||||
|
||||
protected override void MoveToTarget()
|
||||
{
|
||||
ObjectParameters? objParams = GetObjectParameters;
|
||||
if (objParams == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int diffX = objParams.ObjectMiddleHorizontal - FieldWidth / 2;
|
||||
if (Math.Abs(diffX) > GetStep())
|
||||
{
|
||||
if (diffX > 0)
|
||||
{
|
||||
MoveLeft();
|
||||
}
|
||||
else
|
||||
{
|
||||
MoveRight();
|
||||
}
|
||||
}
|
||||
|
||||
int diffY = objParams.ObjectMiddleVertical - FieldHeight / 2;
|
||||
if (Math.Abs(diffY) > GetStep())
|
||||
{
|
||||
if (diffY > 0)
|
||||
{
|
||||
MoveUp();
|
||||
}
|
||||
else
|
||||
{
|
||||
MoveDown();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
64
ProjectAirbus/ProjectAirbus/MovementStrategy/MoveableBus.cs
Normal file
64
ProjectAirbus/ProjectAirbus/MovementStrategy/MoveableBus.cs
Normal file
@ -0,0 +1,64 @@
|
||||
using ProjectAirbus.Drawnings;
|
||||
|
||||
namespace ProjectAirbus.MovementStrategy;
|
||||
|
||||
/// <summary>
|
||||
/// Класс-реализация IMoveableObject с использованием DrawningBus
|
||||
/// </summary>
|
||||
public class MoveableBus : IMoveableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Поле-объект класса DrawningBus или его наследника
|
||||
/// </summary>
|
||||
private readonly DrawningBus? _bus = null;
|
||||
|
||||
/// <summary>
|
||||
/// Конструктор
|
||||
/// </summary>
|
||||
/// <param name="bus">Объект класса DrawningBus</param>
|
||||
public MoveableBus(DrawningBus bus)
|
||||
{
|
||||
_bus = bus;
|
||||
}
|
||||
|
||||
public ObjectParameters? GetObjectPosition
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_bus == null || _bus.EntityBus == null || !_bus.GetPosX.HasValue || !_bus.GetPosY.HasValue)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return new ObjectParameters(_bus.GetPosX.Value, _bus.GetPosY.Value, _bus.GetWidth, _bus.GetHeight);
|
||||
}
|
||||
}
|
||||
|
||||
public int GetStep => (int)(_bus?.EntityBus?.Step ?? 0);
|
||||
|
||||
public bool TryMoveObject(MovementDirection direction)
|
||||
{
|
||||
if (_bus == null || _bus.EntityBus == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return _bus.MoveTransport(GetDirectionType(direction));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Конвертация из MovementDirection в DirectionType
|
||||
/// </summary>
|
||||
/// <param name="direction">MovementDirection</param>
|
||||
/// <returns>DirectionType</returns>
|
||||
private static DirectionType GetDirectionType(MovementDirection direction)
|
||||
{
|
||||
return direction switch
|
||||
{
|
||||
MovementDirection.Left => DirectionType.Left,
|
||||
MovementDirection.Right => DirectionType.Right,
|
||||
MovementDirection.Up => DirectionType.Up,
|
||||
MovementDirection.Down => DirectionType.Down,
|
||||
_ => DirectionType.Unknow,
|
||||
};
|
||||
}
|
||||
}
|
@ -1,14 +1,14 @@
|
||||
namespace ProjectAirbus;
|
||||
namespace ProjectAirbus.MovementStrategy;
|
||||
|
||||
/// <summary>
|
||||
/// Направление перемещения
|
||||
/// </summary>
|
||||
public enum DirectionType
|
||||
public enum MovementDirection
|
||||
{
|
||||
/// <summary>
|
||||
/// Вверх
|
||||
/// </summary>
|
||||
Up = 1,
|
||||
/// Вверх
|
||||
/// </summary>
|
||||
Up = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Вниз
|
@ -0,0 +1,72 @@
|
||||
namespace ProjectAirbus.MovementStrategy;
|
||||
|
||||
/// <summary>
|
||||
/// Параметры-координаты объекта
|
||||
/// </summary>
|
||||
public class ObjectParameters
|
||||
{
|
||||
/// <summary>
|
||||
/// Координата X
|
||||
/// </summary>
|
||||
private readonly int _x;
|
||||
|
||||
/// <summary>
|
||||
/// Координата Y
|
||||
/// </summary>
|
||||
private readonly int _y;
|
||||
|
||||
/// <summary>
|
||||
/// Ширина объекта
|
||||
/// </summary>
|
||||
private readonly int _width;
|
||||
|
||||
/// <summary>
|
||||
/// Высота объекта
|
||||
/// </summary>
|
||||
private readonly int _height;
|
||||
|
||||
/// <summary>
|
||||
/// Левая граница
|
||||
/// </summary>
|
||||
public int LeftBorder => _x;
|
||||
|
||||
/// <summary>
|
||||
/// Верхняя граница
|
||||
/// </summary>
|
||||
public int TopBorder => _y;
|
||||
|
||||
/// <summary>
|
||||
/// Правая граница
|
||||
/// </summary>
|
||||
public int RightBorder => _x + _width;
|
||||
|
||||
/// <summary>
|
||||
/// Нижняя граница
|
||||
/// </summary>
|
||||
public int DownBorder => _y + _height;
|
||||
|
||||
/// <summary>
|
||||
/// Середина объекта
|
||||
/// </summary>
|
||||
public int ObjectMiddleHorizontal => _x + _width / 2;
|
||||
|
||||
/// <summary>
|
||||
/// Середина объекта
|
||||
/// </summary>
|
||||
public int ObjectMiddleVertical => _y + _height / 2;
|
||||
|
||||
/// <summary>
|
||||
/// Конструктор
|
||||
/// </summary>
|
||||
/// <param name="x">Координата X</param>
|
||||
/// <param name="y">Координата Y</param>
|
||||
/// <param name="width">Ширина объекта</param>
|
||||
/// <param name="height">Высота объекта</param>
|
||||
public ObjectParameters(int x, int y, int width, int height)
|
||||
{
|
||||
_x = x;
|
||||
_y = y;
|
||||
_width = width;
|
||||
_height = height;
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
namespace ProjectAirbus.MovementStrategy;
|
||||
|
||||
/// <summary>
|
||||
/// Статус выполнения операции перемещения
|
||||
/// </summary>
|
||||
public enum StrategyStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// Все готово к началу
|
||||
/// </summary>
|
||||
NotInit,
|
||||
|
||||
/// <summary>
|
||||
/// Выполняется
|
||||
/// </summary>
|
||||
InProgress,
|
||||
|
||||
/// <summary>
|
||||
/// Завершено
|
||||
/// </summary>
|
||||
Finish
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user