diff --git a/AccordionBus/AccordionBus/Drawnings/DrawningAccordionBus.cs b/AccordionBus/AccordionBus/Drawnings/DrawningAccordionBus.cs
index 0e21394..c9607fa 100644
--- a/AccordionBus/AccordionBus/Drawnings/DrawningAccordionBus.cs
+++ b/AccordionBus/AccordionBus/Drawnings/DrawningAccordionBus.cs
@@ -23,10 +23,10 @@ public class DrawningAccordionBus:DrawningBus
/// /// Признак наличия гармошки
public DrawningAccordionBus(int speed, double weight, Color bodyColor, Color
- additionalColor, bool bodyGlass, bool door, bool disk, bool garmoshka):base(180,40)
+ additionalColor, bool bodyGlass,bool garmoshka):base(180,40)
{
EntityBus = new EntityAccordionBus(speed, weight, bodyColor, additionalColor,
- bodyGlass, door, disk, garmoshka);
+ bodyGlass, garmoshka);
}
public override void DrawTransport(Graphics g)
@@ -34,7 +34,7 @@ public class DrawningAccordionBus:DrawningBus
if(EntityBus == null || EntityBus is not EntityAccordionBus accordionBus || !_startPosX.HasValue || !_startPosY.HasValue)
return;
base.DrawTransport(g);
-
+ //гармошка
if (accordionBus.BodyGarmoshka)
{
g.DrawRectangle(new Pen(Color.Black), _startPosX.Value + 70, _startPosY.Value, 40, 30);
@@ -44,24 +44,7 @@ public class DrawningAccordionBus:DrawningBus
g.DrawRectangle(new Pen(Color.Black), _startPosX.Value, _startPosY.Value, 70, 30);
g.DrawRectangle(new Pen(Color.Black), _startPosX.Value + 110, _startPosY.Value, 70, 30);
- //колёса
- if (accordionBus.BodyDisk)
- {
- //диски
- Brush brWhite = new SolidBrush(Color.White);
- g.FillEllipse(brWhite, _startPosX.Value, _startPosY.Value + 25, 20, 15);
- g.FillEllipse(brWhite, _startPosX.Value + 50, _startPosY.Value + 25, 20, 15);
- Brush brWheel = new SolidBrush(accordionBus.AdditionalColor);
- g.FillEllipse(brWheel, _startPosX.Value, _startPosY.Value + 25, 20, 15);
- g.FillEllipse(brWheel, _startPosX.Value + 50, _startPosY.Value + 25, 20, 15);
- g.FillEllipse(brWheel, _startPosX.Value + 110, _startPosY.Value + 25, 20, 15);
- g.FillEllipse(brWheel, _startPosX.Value + 160, _startPosY.Value + 25, 20, 15);
- }
- Pen penWheel = new Pen(Color.Black);
- g.DrawEllipse(penWheel, _startPosX.Value, _startPosY.Value + 25, 20, 15);
- g.DrawEllipse(penWheel, _startPosX.Value + 50, _startPosY.Value + 25, 20, 15);
- g.DrawEllipse(penWheel, _startPosX.Value + 110, _startPosY.Value + 25, 20, 15);
- g.DrawEllipse(penWheel, _startPosX.Value + 160, _startPosY.Value + 25, 20, 15);
+
//стекла
if (accordionBus.BodyGlass)
{
@@ -76,15 +59,6 @@ public class DrawningAccordionBus:DrawningBus
g.DrawEllipse(penGlass, _startPosX.Value + 115, _startPosY.Value + 5, 10, 15);
g.DrawEllipse(penGlass, _startPosX.Value + 165, _startPosY.Value + 5, 10, 15);
}
- //двери
- if (accordionBus.BodyDoor)
- {
- Brush brDoor = new SolidBrush(Color.Black);
- g.FillRectangle(brDoor, _startPosX.Value + 45, _startPosY.Value + 10, 5, 20);
- g.FillRectangle(brDoor, _startPosX.Value + 25, _startPosY.Value + 10, 5, 20);
- g.FillRectangle(brDoor, _startPosX.Value + 135, _startPosY.Value + 10, 5, 20);
- g.FillRectangle(brDoor, _startPosX.Value + 155, _startPosY.Value + 10, 5, 20);
- }
}
}
diff --git a/AccordionBus/AccordionBus/Drawnings/DrawningBus.cs b/AccordionBus/AccordionBus/Drawnings/DrawningBus.cs
index adc25db..2eabd43 100644
--- a/AccordionBus/AccordionBus/Drawnings/DrawningBus.cs
+++ b/AccordionBus/AccordionBus/Drawnings/DrawningBus.cs
@@ -171,6 +171,17 @@ public class DrawningBus
{
if (EntityBus == null || !_startPosX.HasValue || !_startPosY.HasValue)
return;
+
+
+ //диски
+ Brush brWhite = new SolidBrush(Color.White);
+ g.FillEllipse(brWhite, _startPosX.Value, _startPosY.Value + 25, 20, 15);
+ g.FillEllipse(brWhite, _startPosX.Value + 50, _startPosY.Value + 25, 20, 15);
+ Brush brWheel = new SolidBrush(Color.Black);
+ g.FillEllipse(brWheel, _startPosX.Value, _startPosY.Value + 25, 20, 15);
+ g.FillEllipse(brWheel, _startPosX.Value + 50, _startPosY.Value + 25, 20, 15);
+ g.FillEllipse(brWheel, _startPosX.Value + 110, _startPosY.Value + 25, 20, 15);
+ g.FillEllipse(brWheel, _startPosX.Value + 160, _startPosY.Value + 25, 20, 15);
//кузов
Brush br = new SolidBrush(EntityBus.BodyColor);
g.FillRectangle(br, _startPosX.Value, _startPosY.Value, 70, 30);
@@ -186,6 +197,11 @@ public class DrawningBus
g.DrawEllipse(penWheel, _startPosX.Value + 50, _startPosY.Value + 25, 20, 15);
g.DrawEllipse(penWheel, _startPosX.Value + 110, _startPosY.Value + 25, 20, 15);
g.DrawEllipse(penWheel, _startPosX.Value + 160, _startPosY.Value + 25, 20, 15);
-
+ //двери
+ Brush brDoor = new SolidBrush(Color.Black);
+ g.FillRectangle(brDoor, _startPosX.Value + 45, _startPosY.Value + 10, 5, 20);
+ g.FillRectangle(brDoor, _startPosX.Value + 25, _startPosY.Value + 10, 5, 20);
+ g.FillRectangle(brDoor, _startPosX.Value + 135, _startPosY.Value + 10, 5, 20);
+ g.FillRectangle(brDoor, _startPosX.Value + 155, _startPosY.Value + 10, 5, 20);
}
}
diff --git a/AccordionBus/AccordionBus/Entities/EntityAccordionBus.cs b/AccordionBus/AccordionBus/Entities/EntityAccordionBus.cs
index a9412b8..04242bb 100644
--- a/AccordionBus/AccordionBus/Entities/EntityAccordionBus.cs
+++ b/AccordionBus/AccordionBus/Entities/EntityAccordionBus.cs
@@ -16,14 +16,6 @@ public class EntityAccordionBus: EntityBus
///
public bool BodyGlass { get; private set; }
///
- /// Признак (опция) дверей
- ///
- public bool BodyDoor { get; private set; }
- ///
- /// Признак (опция) наличия дисков
- ///
- public bool BodyDisk { get; private set; }
- ///
/// признак наличия гармошки
///
public bool BodyGarmoshka { get; private set; }
@@ -37,12 +29,10 @@ public class EntityAccordionBus: EntityBus
/// наличие дисков
/// наличие гармошки
- public EntityAccordionBus(int speed, double weigth, Color bodyColor, Color additionalColor, bool glass, bool door, bool disk, bool garmoshka) : base (speed,weigth,bodyColor)
+ public EntityAccordionBus(int speed, double weigth, Color bodyColor, Color additionalColor, bool glass, bool garmoshka) : base (speed,weigth,bodyColor)
{
AdditionalColor = additionalColor;
BodyGlass = glass;
- BodyDoor = door;
- BodyDisk = disk;
BodyGarmoshka = garmoshka;
}
}
diff --git a/AccordionBus/AccordionBus/FormAccordionBus.cs b/AccordionBus/AccordionBus/FormAccordionBus.cs
index af30c5e..42eb66a 100644
--- a/AccordionBus/AccordionBus/FormAccordionBus.cs
+++ b/AccordionBus/AccordionBus/FormAccordionBus.cs
@@ -64,8 +64,6 @@ public partial class FormAccordionBus : Form
Color.FromArgb(rnd.Next(0, 256), rnd.Next(0, 256), rnd.Next(0, 256)),
Color.FromArgb(rnd.Next(0, 256), rnd.Next(0, 256), rnd.Next(0, 256)),
Convert.ToBoolean(rnd.Next(0, 2)),
- Convert.ToBoolean(rnd.Next(0, 2)),
- Convert.ToBoolean(rnd.Next(0, 2)),
Convert.ToBoolean(rnd.Next(0, 2)));
break;
default: