From dea236e60848335274bd68782f29b00078f7888b Mon Sep 17 00:00:00 2001 From: tellsense Date: Sun, 15 Oct 2023 23:24:11 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ElectricLocomotive/DrawingLocomotive.cs | 20 ------------------- .../FormElectricLocomotive.cs | 1 - .../ProjectElectricLocomotive.csproj | 2 +- .../ElectricLocomotive/SetGeneric.cs | 2 +- 4 files changed, 2 insertions(+), 23 deletions(-) diff --git a/ElectricLocomotive/ElectricLocomotive/DrawingLocomotive.cs b/ElectricLocomotive/ElectricLocomotive/DrawingLocomotive.cs index cb7949e..946417c 100644 --- a/ElectricLocomotive/ElectricLocomotive/DrawingLocomotive.cs +++ b/ElectricLocomotive/ElectricLocomotive/DrawingLocomotive.cs @@ -25,12 +25,6 @@ namespace ProjectElectricLocomotive.DrawingObjects public int GetPosY => _startPosY; public int GetWidth => _locomWidth; public int GetHeight => _locomHeight; - /// Скорость - /// Вес - /// Цвет кузова - /// Ширина картинки - /// Высота картинки - public DrawingLocomotive(int speed, double weight, Color bodyColor, int width, int heigth) { if (width < _locomWidth || heigth < _locomHeight) @@ -41,13 +35,6 @@ namespace ProjectElectricLocomotive.DrawingObjects _pictureHeight = heigth; EntityLocomotive = new EntityLocomotive(speed, weight, bodyColor); } - /// Скорость - /// Вес - /// Цвет кузова - /// Ширина картинки - /// Высота картинки - /// Ширина картинки - /// Высота картинки protected DrawingLocomotive(int speed, double weight, Color bodyColor, int width, int height, int locomWidth, int locomHeight) { @@ -61,8 +48,6 @@ namespace ProjectElectricLocomotive.DrawingObjects _locomHeight = locomHeight; EntityLocomotive = new EntityLocomotive(speed, weight, bodyColor); } - /// Координата X - /// Координата Y public void SetPosition(int x, int y) { if (x < 0 || x + _locomWidth > _pictureWidth) @@ -76,7 +61,6 @@ namespace ProjectElectricLocomotive.DrawingObjects _startPosX = x; _startPosY = y; } - /// Направление public void MoveTransport(Direction direction) { if (EntityLocomotive == null) @@ -111,7 +95,6 @@ namespace ProjectElectricLocomotive.DrawingObjects break; } } - /// public virtual void DrawTransport(Graphics g) { { @@ -181,9 +164,6 @@ namespace ProjectElectricLocomotive.DrawingObjects Direction.Down => _startPosY + EntityLocomotive.Step < _pictureHeight, }; } - /// - /// Получение объекта IMoveableObject из объекта DrawningCar - /// public IMoveableObject GetMoveableObject => new DrawingObjectLocomotive(this); } diff --git a/ElectricLocomotive/ElectricLocomotive/FormElectricLocomotive.cs b/ElectricLocomotive/ElectricLocomotive/FormElectricLocomotive.cs index bbc6eff..cee1fea 100644 --- a/ElectricLocomotive/ElectricLocomotive/FormElectricLocomotive.cs +++ b/ElectricLocomotive/ElectricLocomotive/FormElectricLocomotive.cs @@ -133,7 +133,6 @@ namespace ElectricLocomotive } private void ElectricLocomotive_Load(object sender, EventArgs e) { - } private void ButtonSelectLocomotive_Click(object sender, EventArgs e) { diff --git a/ElectricLocomotive/ElectricLocomotive/ProjectElectricLocomotive.csproj b/ElectricLocomotive/ElectricLocomotive/ProjectElectricLocomotive.csproj index 244387d..13ee123 100644 --- a/ElectricLocomotive/ElectricLocomotive/ProjectElectricLocomotive.csproj +++ b/ElectricLocomotive/ElectricLocomotive/ProjectElectricLocomotive.csproj @@ -2,7 +2,7 @@ WinExe - net7.0-windows + net6.0-windows enable true enable diff --git a/ElectricLocomotive/ElectricLocomotive/SetGeneric.cs b/ElectricLocomotive/ElectricLocomotive/SetGeneric.cs index 9d02fdc..60c65ce 100644 --- a/ElectricLocomotive/ElectricLocomotive/SetGeneric.cs +++ b/ElectricLocomotive/ElectricLocomotive/SetGeneric.cs @@ -27,7 +27,7 @@ namespace ProjectElectricLocomotive.Generics { if (_places[i] != null) Full++; } - if (Full == Count - position - 1) + if (Full == Count - position - 1) return -1; if (position < Count && position >= 0) {