From 8e476617e17c83212f35565f60a88fff8641dde1 Mon Sep 17 00:00:00 2001 From: Anastasia Yazykova Date: Wed, 3 Apr 2024 00:02:15 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9A=D0=BE=D1=80=D1=80=D0=B5=D0=BA=D1=82?= =?UTF-8?q?=D0=B8=D1=80=D0=BE=D0=B2=D0=BA=D0=B0=20=D0=BF=D1=80=D0=BE=D1=80?= =?UTF-8?q?=D0=B8=D1=81=D0=BE=D0=B2=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Drawnings/DrawningBus.cs | 72 +++++++++---------- .../Drawnings/DrawningTrolleybus.cs | 32 +++++++-- 2 files changed, 63 insertions(+), 41 deletions(-) diff --git a/TrolleybusProject/TrolleybusProject/Drawnings/DrawningBus.cs b/TrolleybusProject/TrolleybusProject/Drawnings/DrawningBus.cs index 3a60e8e..590f45d 100644 --- a/TrolleybusProject/TrolleybusProject/Drawnings/DrawningBus.cs +++ b/TrolleybusProject/TrolleybusProject/Drawnings/DrawningBus.cs @@ -266,49 +266,49 @@ public class DrawningBus Brush brushBodyColor = new SolidBrush(EntityBus.BodyColor); //троллейбус границы - g.DrawEllipse(pen, _startPosX.Value + 27, _startPosY.Value + - 64, 20, 20); - g.DrawEllipse(pen, _startPosX.Value + 109, _startPosY.Value + - 64, 20, 20); + g.DrawEllipse(pen, _startPosX.Value + 22, _startPosY.Value + + 42, 20, 20); + g.DrawEllipse(pen, _startPosX.Value + 104, _startPosY.Value + + 42, 20, 20); - g.DrawRectangle(pen, _startPosX.Value + 10, _startPosY.Value + - 30, 140, 41); + g.DrawRectangle(pen, _startPosX.Value + 5, _startPosY.Value + + 8, 140, 41); //троллейбус - g.FillRectangle(brushBodyColor, _startPosX.Value + 10, _startPosY.Value + - 30, 140, 41); - g.DrawRectangle(pen, _startPosX.Value + 10, _startPosY.Value + - 30, 140, 41); + g.FillRectangle(brushBodyColor, _startPosX.Value + 5, _startPosY.Value + + 8, 140, 41); + g.DrawRectangle(pen, _startPosX.Value + 5, _startPosY.Value + + 8, 140, 41); //дверь - g.DrawRectangle(pen, _startPosX.Value + 57, _startPosY.Value + - 40, 24, 31); + g.DrawRectangle(pen, _startPosX.Value + 52, _startPosY.Value + + 18, 24, 31); //окна Brush brBlue = new SolidBrush(Color.LightBlue); - g.FillEllipse(brBlue, _startPosX.Value + 13, _startPosY.Value + - 34, 15, 20); + g.FillEllipse(brBlue, _startPosX.Value + 8, _startPosY.Value + + 12, 15, 20); - g.FillEllipse(brBlue, _startPosX.Value + 38, _startPosY.Value + - 34, 15, 20); + g.FillEllipse(brBlue, _startPosX.Value + 33, _startPosY.Value + + 12, 15, 20); - g.FillEllipse(brBlue, _startPosX.Value + 85, _startPosY.Value + - 34, 15, 20); - g.FillEllipse(brBlue, _startPosX.Value + 102, _startPosY.Value + - 34, 15, 20); - g.FillEllipse(brBlue, _startPosX.Value + 118, _startPosY.Value + - 34, 15, 20); - g.FillEllipse(brBlue, _startPosX.Value + 134, _startPosY.Value + - 34, 15, 20); + g.FillEllipse(brBlue, _startPosX.Value + 80, _startPosY.Value + + 12, 15, 20); + g.FillEllipse(brBlue, _startPosX.Value + 97, _startPosY.Value + + 12, 15, 20); + g.FillEllipse(brBlue, _startPosX.Value + 113, _startPosY.Value + + 12, 15, 20); + g.FillEllipse(brBlue, _startPosX.Value + 129, _startPosY.Value + + 12, 15, 20); @@ -318,21 +318,21 @@ public class DrawningBus - g.DrawEllipse(pen, _startPosX.Value + 13, _startPosY.Value + - 34, 15, 20); + g.DrawEllipse(pen, _startPosX.Value + 8, _startPosY.Value + + 12, 15, 20); - g.DrawEllipse(pen, _startPosX.Value + 38, _startPosY.Value + - 34, 15, 20); + g.DrawEllipse(pen, _startPosX.Value + 33, _startPosY.Value + + 12, 15, 20); - g.DrawEllipse(pen, _startPosX.Value + 85, _startPosY.Value + - 34, 15, 20); - g.DrawEllipse(pen, _startPosX.Value + 102, _startPosY.Value + - 34, 15, 20); - g.DrawEllipse(pen, _startPosX.Value + 118, _startPosY.Value + - 34, 15, 20); - g.DrawEllipse(pen, _startPosX.Value + 134, _startPosY.Value + - 34, 15, 20); + g.DrawEllipse(pen, _startPosX.Value + 80, _startPosY.Value + + 12, 15, 20); + g.DrawEllipse(pen, _startPosX.Value + 97, _startPosY.Value + + 12, 15, 20); + g.DrawEllipse(pen, _startPosX.Value + 113, _startPosY.Value + + 12, 15, 20); + g.DrawEllipse(pen, _startPosX.Value + 129, _startPosY.Value + + 12, 15, 20); diff --git a/TrolleybusProject/TrolleybusProject/Drawnings/DrawningTrolleybus.cs b/TrolleybusProject/TrolleybusProject/Drawnings/DrawningTrolleybus.cs index 232c600..26a0011 100644 --- a/TrolleybusProject/TrolleybusProject/Drawnings/DrawningTrolleybus.cs +++ b/TrolleybusProject/TrolleybusProject/Drawnings/DrawningTrolleybus.cs @@ -46,6 +46,15 @@ public class DrawningTrolleybus:DrawningBus + _startPosX += 5; + _startPosY += 22; + + base.DrawTransport(g); + _startPosX -= 5; + _startPosY -= 22; + + + if (trolleybus.Otsek) { @@ -62,11 +71,7 @@ public class DrawningTrolleybus:DrawningBus - _startPosX += 22; - _startPosY += 15; - base.DrawTransport(g); - _startPosX -= 22; - _startPosY -= 15; + if (trolleybus.Doors) @@ -77,6 +82,23 @@ public class DrawningTrolleybus:DrawningBus } + + + + + //рога + + if (trolleybus.Roga) + { + g.DrawLine(addpen, _startPosX.Value + 42, _startPosY.Value + 7, + _startPosX.Value + 124, _startPosY.Value + 29); + g.DrawLine(addpen, _startPosX.Value + 62, _startPosY.Value + 2, + _startPosX.Value + 124, _startPosY.Value + 29); + + + } + + }