diff --git a/HoistingCrane/HoistingCrane/Drawning/DrawningHoistingCrane.cs b/HoistingCrane/HoistingCrane/Drawning/DrawningHoistingCrane.cs index 3baf74e..2023b34 100644 --- a/HoistingCrane/HoistingCrane/Drawning/DrawningHoistingCrane.cs +++ b/HoistingCrane/HoistingCrane/Drawning/DrawningHoistingCrane.cs @@ -1,4 +1,5 @@ using HoistingCrane.Entities; +using System.Configuration; namespace HoistingCrane.Drawning; @@ -38,10 +39,6 @@ public class DrawningHoistingCrane : DrawningTrackedVehicle EntityTrackedVehicle = new EntityHoistingCrane(speed, weight, bodyColor, additionalColor, counterweight, platform); } - - - - /// /// Метод отрисовки объекта /// @@ -82,10 +79,6 @@ public class DrawningHoistingCrane : DrawningTrackedVehicle } - - - - } diff --git a/HoistingCrane/HoistingCrane/Drawning/DrawningTrackedVehicle.cs b/HoistingCrane/HoistingCrane/Drawning/DrawningTrackedVehicle.cs index aa2709b..29846b3 100644 --- a/HoistingCrane/HoistingCrane/Drawning/DrawningTrackedVehicle.cs +++ b/HoistingCrane/HoistingCrane/Drawning/DrawningTrackedVehicle.cs @@ -6,7 +6,6 @@ namespace HoistingCrane.Drawning public class DrawningTrackedVehicle { - /// /// Класс - сущность /// @@ -46,7 +45,6 @@ namespace HoistingCrane.Drawning public int GetHeight => _drawingCarHeight; - /// /// Конструктор класса, который принимает параметры автомобиля(скорость, вес и цвет) и создает объект класса с данными параметрами /// @@ -59,7 +57,6 @@ namespace HoistingCrane.Drawning } - /// /// Конструктор, при вызове которого можем менять границы транспорта /// @@ -72,10 +69,6 @@ namespace HoistingCrane.Drawning } - - - - /// /// Приватный конструктор, который делает значения границ окна = null и стартовую позицию = null /// @@ -88,10 +81,6 @@ namespace HoistingCrane.Drawning } - - - - /// /// Метод отрисовки игрового поля /// @@ -125,8 +114,6 @@ namespace HoistingCrane.Drawning } - - /// /// Установим позицию игрока /// @@ -157,7 +144,6 @@ namespace HoistingCrane.Drawning _startPosY = y; } - } /// @@ -165,7 +151,8 @@ namespace HoistingCrane.Drawning /// /// /// - protected bool MoveTransport(DirectionType direction) + + public bool MoveTransport(DirectionType direction) //Подключили модив\фикатор virtual для переопределения в дочернем классе { if (EntityTrackedVehicle == null || !_startPosX.HasValue || !_startPosY.HasValue) { @@ -210,12 +197,9 @@ namespace HoistingCrane.Drawning } - - - - } + /// /// Метод отрисовки объекта /// @@ -229,10 +213,6 @@ namespace HoistingCrane.Drawning Pen pen = new Pen(Color.Black); - - - - //границы gr.DrawRectangle(pen, _startPosX.Value, _startPosY.Value + 25, 75, 20); gr.DrawRectangle(pen, _startPosX.Value, _startPosY.Value, 25, 25); @@ -249,11 +229,6 @@ namespace HoistingCrane.Drawning gr.DrawRectangle(pen, _startPosX.Value + 30, _startPosY.Value + 45, 4, 6); gr.DrawRectangle(pen, _startPosX.Value + 45, _startPosY.Value + 45, 4, 6); - - - - - //корпус Brush br = new SolidBrush(EntityTrackedVehicle.BodyColor); gr.FillRectangle(br, _startPosX.Value, _startPosY.Value + 25, 75, 25); @@ -276,7 +251,6 @@ namespace HoistingCrane.Drawning gr.FillEllipse(brDarkGray, _startPosX.Value + 63, _startPosY.Value + 45, 20, 20); gr.FillRectangle(brDarkGray, _startPosX.Value + 5, _startPosY.Value + 45, 68, 20); - gr.FillEllipse(brq, _startPosX.Value - 1, _startPosY.Value + 46, 18, 18); gr.FillEllipse(brq, _startPosX.Value + 62, _startPosY.Value + 46, 18, 18); gr.FillEllipse(brq, _startPosX.Value + 20, _startPosY.Value + 53, 10, 10); @@ -284,9 +258,6 @@ namespace HoistingCrane.Drawning gr.FillEllipse(brq, _startPosX.Value + 50, _startPosY.Value + 53, 10, 10); gr.FillRectangle(brq, _startPosX.Value + 30, _startPosY.Value + 45, 4, 6); gr.FillRectangle(brq, _startPosX.Value + 45, _startPosY.Value + 45, 4, 6); - - - } } } \ No newline at end of file diff --git a/HoistingCrane/HoistingCrane/Entities/EntityHoistingCrane.cs b/HoistingCrane/HoistingCrane/Entities/EntityHoistingCrane.cs index 8d75df1..809ac3f 100644 --- a/HoistingCrane/HoistingCrane/Entities/EntityHoistingCrane.cs +++ b/HoistingCrane/HoistingCrane/Entities/EntityHoistingCrane.cs @@ -21,9 +21,6 @@ public class EntityHoistingCrane : EntityTrackedVehicle /// public bool Platform { get; protected set; } - - - /// /// /// @@ -32,7 +29,6 @@ public class EntityHoistingCrane : EntityTrackedVehicle /// - // . public EntityHoistingCrane(int Speed, int Weight, Color BodyColor, Color AdditionalColor, bool Counterweight, bool Platform) : base(Speed, Weight, BodyColor) { @@ -42,5 +38,4 @@ public class EntityHoistingCrane : EntityTrackedVehicle } - } \ No newline at end of file diff --git a/HoistingCrane/HoistingCrane/Entities/EntityTrackedVehicle.cs b/HoistingCrane/HoistingCrane/Entities/EntityTrackedVehicle.cs index eaf70c8..555320a 100644 --- a/HoistingCrane/HoistingCrane/Entities/EntityTrackedVehicle.cs +++ b/HoistingCrane/HoistingCrane/Entities/EntityTrackedVehicle.cs @@ -30,9 +30,6 @@ public double Step => Speed * 100 / Weight; - - - /// /// Конструктор сущности /// diff --git a/HoistingCrane/HoistingCrane/FormHoistingCrane.Designer.cs b/HoistingCrane/HoistingCrane/FormHoistingCrane.Designer.cs index d6cea84..a809bd5 100644 --- a/HoistingCrane/HoistingCrane/FormHoistingCrane.Designer.cs +++ b/HoistingCrane/HoistingCrane/FormHoistingCrane.Designer.cs @@ -9,7 +9,6 @@ namespace HoistingCrane private System.ComponentModel.IContainer components = null; - protected override void Dispose(bool disposing) { if (disposing && (components != null)) @@ -19,9 +18,6 @@ namespace HoistingCrane base.Dispose(disposing); } - - - private void InitializeComponent() { pictureBoxHoistingCrane = new PictureBox(); diff --git a/HoistingCrane/HoistingCrane/FormHoistingCrane.cs b/HoistingCrane/HoistingCrane/FormHoistingCrane.cs index 43b8875..a0f03af 100644 --- a/HoistingCrane/HoistingCrane/FormHoistingCrane.cs +++ b/HoistingCrane/HoistingCrane/FormHoistingCrane.cs @@ -71,9 +71,6 @@ namespace HoistingCrane } - - - private void ButtonMove_Click(object sender, EventArgs e) { if (_drawning == null) { return; } diff --git a/HoistingCrane/HoistingCrane/MovementStrategy/MoveableCar.cs b/HoistingCrane/HoistingCrane/MovementStrategy/MoveableCar.cs index 7139b75..bbeaf9e 100644 --- a/HoistingCrane/HoistingCrane/MovementStrategy/MoveableCar.cs +++ b/HoistingCrane/HoistingCrane/MovementStrategy/MoveableCar.cs @@ -8,7 +8,6 @@ namespace HoistingCrane.MovementStrategy /// Поле-объект класса DrawningAirplane или его наследника /// private readonly DrawningTrackedVehicle? drawningTrackedVehicle = null; - /// /// Конструктор /// diff --git a/HoistingCrane/HoistingCrane/MovementStrategy/MovementDirection.cs b/HoistingCrane/HoistingCrane/MovementStrategy/MovementDirection.cs index 8d81015..9c2632a 100644 --- a/HoistingCrane/HoistingCrane/MovementStrategy/MovementDirection.cs +++ b/HoistingCrane/HoistingCrane/MovementStrategy/MovementDirection.cs @@ -20,6 +20,5 @@ /// Right = 4 - } } diff --git a/HoistingCrane/HoistingCrane/MovementStrategy/StrategyStatus.cs b/HoistingCrane/HoistingCrane/MovementStrategy/StrategyStatus.cs index 9635b97..3a9cf4f 100644 --- a/HoistingCrane/HoistingCrane/MovementStrategy/StrategyStatus.cs +++ b/HoistingCrane/HoistingCrane/MovementStrategy/StrategyStatus.cs @@ -17,6 +17,5 @@ /// Finish - } }