Исправил названия классов для последующих лаб
This commit is contained in:
parent
87888ff403
commit
daa6d8c91f
@ -8,14 +8,14 @@ using Monorail.Entities;
|
||||
|
||||
namespace Monorail.DrawningObjects
|
||||
{
|
||||
public class DrawningAdvancedMonorail : DrawningMonorail
|
||||
public class DrawningLocomotive : DrawningMonorail
|
||||
{
|
||||
public DrawningAdvancedMonorail(int speed, double weight, Color bodyColor, Color wheelColor, Color tireColor, int width, int height, int addWheelsNumb,
|
||||
public DrawningLocomotive(int speed, double weight, Color bodyColor, Color wheelColor, Color tireColor, int width, int height, int addWheelsNumb,
|
||||
Color additionalColor, bool secondCabine, bool magniteRail) : base(speed, weight, bodyColor, wheelColor, tireColor, width, height)
|
||||
{
|
||||
if(EntityMonorail != null)
|
||||
{
|
||||
EntityMonorail = new EntityAdvancedMonorail(speed, weight, bodyColor, wheelColor, tireColor,
|
||||
EntityMonorail = new EntityLocomotive(speed, weight, bodyColor, wheelColor, tireColor,
|
||||
addWheelsNumb, additionalColor, secondCabine, magniteRail);
|
||||
}
|
||||
}
|
||||
@ -29,7 +29,7 @@ namespace Monorail.DrawningObjects
|
||||
Brush windowBrush = new SolidBrush(Color.White);
|
||||
if (EntityMonorail == null)
|
||||
return;
|
||||
if(EntityMonorail is not EntityAdvancedMonorail advancedMonorail)
|
||||
if(EntityMonorail is not EntityLocomotive advancedMonorail)
|
||||
{
|
||||
return;
|
||||
}
|
@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Monorail.Entities
|
||||
{
|
||||
public class EntityAdvancedMonorail : EntityMonorail
|
||||
public class EntityLocomotive : EntityMonorail
|
||||
{
|
||||
public Color AdditionalColor { get; private set; }
|
||||
public int AddWheelsNumb { get; private set; }
|
||||
@ -15,7 +15,7 @@ namespace Monorail.Entities
|
||||
public bool SecondCabine { get; private set; }
|
||||
|
||||
public bool MagniteRail { get; private set; }
|
||||
public EntityAdvancedMonorail(int speed, double weight, Color bodyColor, Color wheelColor,
|
||||
public EntityLocomotive(int speed, double weight, Color bodyColor, Color wheelColor,
|
||||
Color tireColor, int addWheelsNumb, Color secondCabineColor, bool secondCabine, bool magniteRail) : base(speed, weight, bodyColor, wheelColor, tireColor)
|
||||
{
|
||||
AdditionalColor = secondCabineColor;
|
@ -92,7 +92,7 @@ namespace Monorail
|
||||
if (dialog.ShowDialog() == DialogResult.OK)
|
||||
additionalColor = dialog.Color;
|
||||
int addWheelNumb = random.Next(3, 5);
|
||||
_drawningMonorail = new DrawningAdvancedMonorail(random.Next(100, 300), random.Next(1000, 3000),
|
||||
_drawningMonorail = new DrawningLocomotive(random.Next(100, 300), random.Next(1000, 3000),
|
||||
bodyColor, wheelColor, tireColor,
|
||||
pictureBoxMonorail.Width, pictureBoxMonorail.Height, addWheelNumb,
|
||||
additionalColor, random.Next(0, 2) > 0, random.Next(0, 2) > 0);
|
||||
|
Loading…
Reference in New Issue
Block a user