PIbd-13_YazykovaA.I._Trolleybus_Labwork02_Simple #2

Closed
squ_squ wants to merge 3 commits from Laba02 into Laba01
2 changed files with 63 additions and 41 deletions
Showing only changes of commit 8e476617e1 - Show all commits

View File

@ -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);
Review

Много пустых строк

Много пустых строк

View File

@ -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);
}
}