Убраны коментарии
This commit is contained in:
parent
8f137787c4
commit
9d9893d6ff
@ -9,10 +9,10 @@ namespace Trolleybus
|
||||
{
|
||||
internal class DrawningSmallTrolleybus : DrawingTrolleybus
|
||||
{
|
||||
public DrawningSmallTrolleybus(int speed, float weight, Color bodyColor, Color dopColor, bool bodyKit, bool wing, bool horns, bool battary) :
|
||||
public DrawningSmallTrolleybus(int speed, float weight, Color bodyColor, Color dopColor, bool bodyKit, bool horns, bool battary) :
|
||||
base(speed, weight, bodyColor, 110, 60)
|
||||
{
|
||||
Trolleybus = new EntitySmallTrolleybus(speed, weight, bodyColor, dopColor, bodyKit, wing, horns, battary);
|
||||
Trolleybus = new EntitySmallTrolleybus(speed, weight, bodyColor, dopColor,bodyKit, horns, battary);
|
||||
}
|
||||
|
||||
public override void DrawTransport(Graphics g)
|
||||
@ -29,7 +29,6 @@ namespace Trolleybus
|
||||
Brush bWhite = new SolidBrush(Color.White);
|
||||
Pen WinBlue = new Pen(Color.Blue);
|
||||
|
||||
//_startPosY = _startPosY + 100;
|
||||
base.DrawTransport(g);
|
||||
if (smallTrolleybus.BodyKit)
|
||||
{
|
||||
@ -55,17 +54,11 @@ namespace Trolleybus
|
||||
g.DrawEllipse(pen, _startPosX + 170, _startPosY + 40, 30, 30);
|
||||
}
|
||||
|
||||
//_startPosX += 10;
|
||||
//_startPosY += 5;
|
||||
//base.DrawTransport(g);
|
||||
//_startPosX -= 10;
|
||||
//_startPosY -= 5;
|
||||
|
||||
if (smallTrolleybus.Horns)
|
||||
{
|
||||
g.DrawLine(pen, _startPosX + 100, _startPosY - 10, _startPosX + 150, _startPosY - 20);
|
||||
g.DrawLine(pen, _startPosX + 150, _startPosY - 20, _startPosX, _startPosY - 30);
|
||||
//g.DrawRectangle(pen, _startPosX + 50, _startPosY - 40, 100, 20);
|
||||
g.DrawRectangle(pen, _startPosX + 50, _startPosY - 10, 100, 10);
|
||||
}
|
||||
|
||||
@ -73,12 +66,6 @@ namespace Trolleybus
|
||||
{
|
||||
g.DrawRectangle(pen, _startPosX + 100, _startPosY, 10, 10);
|
||||
}
|
||||
|
||||
if (smallTrolleybus.Wing)
|
||||
{
|
||||
//g.FillRectangle(dopBrush, _startPosX, _startPosY + 5, 10, 50);
|
||||
//g.DrawRectangle(pen, _startPosX, _startPosY + 5, 10, 50);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,6 @@ namespace Trolleybus
|
||||
|
||||
public void SetObject(int x, int y, int width, int height)
|
||||
{
|
||||
// _trolleybus.SetPosition(x, y, startX, startY, width, height);
|
||||
_trolleybus.SetPosition(x, y, width, height);
|
||||
}
|
||||
|
||||
|
@ -18,10 +18,6 @@ namespace Trolleybus
|
||||
/// </summary>
|
||||
public bool BodyKit { get; private set; }
|
||||
/// <summary>
|
||||
/// Признак наличия антикрыла
|
||||
/// </summary>
|
||||
public bool Wing { get; private set; }
|
||||
/// <summary>
|
||||
/// Признак наличия гоночной полосы
|
||||
/// </summary>
|
||||
public bool Horns { get; private set; }
|
||||
@ -34,15 +30,13 @@ namespace Trolleybus
|
||||
/// <param name="bodyColor">Цвет кузова</param>
|
||||
/// <param name="dopColor">Дополнительный цвет</param>
|
||||
/// <param name="bodyKit">Признак наличия обвеса</param>
|
||||
/// <param name="wing">Признак наличия антикрыла</param>
|
||||
/// <param name="horns">Признак наличия гоночной полосы</param>
|
||||
/// /// <param name="battary">Признак наличия гоночной полосы</param>
|
||||
public EntitySmallTrolleybus(int speed, float weight, Color bodyColor, Color dopColor, bool bodyKit, bool wing, bool horns, bool battary) :
|
||||
public EntitySmallTrolleybus(int speed, float weight, Color bodyColor, Color dopColor, bool bodyKit, bool horns, bool battary) :
|
||||
base(speed, weight, bodyColor)
|
||||
{
|
||||
DopColor = dopColor;
|
||||
BodyKit = bodyKit;
|
||||
Wing = wing;
|
||||
Horns = horns;
|
||||
Battary = battary;
|
||||
}
|
||||
|
@ -33,10 +33,6 @@ namespace Trolleybus
|
||||
private void SetData()
|
||||
{
|
||||
Random rnd = new Random();
|
||||
//Bitmap bmp = new Bitmap(pictureBoxTrolleybus.Width, pictureBoxTrolleybus.Height);
|
||||
//Graphics gr = Graphics.FromImage(bmp);
|
||||
//_trolleybus?.DrawTransport(gr);
|
||||
//pictureBoxTrolleybus.Image = bmp;
|
||||
_trolleybus.SetPosition(rnd.Next(10, 100), rnd.Next(10, 100), pictureBoxTrolleybus.Width, pictureBoxTrolleybus.Height);
|
||||
toolStripStatusLabelSpeed.Text = $"Скорость: {_trolleybus.Trolleybus.Speed}";
|
||||
toolStripStatusLabelWeight.Text = $"Вес: {_trolleybus.Trolleybus.Weight}";
|
||||
@ -53,11 +49,6 @@ namespace Trolleybus
|
||||
{
|
||||
Random rnd = new Random();
|
||||
_trolleybus = new DrawingTrolleybus(rnd.Next(100, 300), rnd.Next(1000, 2000), Color.FromArgb(rnd.Next(0, 256), rnd.Next(0, 256), rnd.Next(0, 256)));
|
||||
// _trolleybus.SetPosition(rnd.Next(10, 100), rnd.Next(10, 100), Location.X, Location.Y, pictureBoxTrolleybus.Width, pictureBoxTrolleybus.Height);
|
||||
//_trolleybus.SetPosition(rnd.Next(10, 100), rnd.Next(10, 100), pictureBoxTrolleybus.Width, pictureBoxTrolleybus.Height);
|
||||
//toolStripStatusLabelSpeed.Text = $"Скорость: {_trolleybus.Trolleybus.Speed}";
|
||||
//toolStripStatusLabelWeight.Text = $"Вес: {_trolleybus.Trolleybus.Weight}";
|
||||
//toolStripStatusLabelBodyColor.Text = $"Цвет: {_trolleybus.Trolleybus.BodyColor.Name}";
|
||||
SetData();
|
||||
Draw();
|
||||
}
|
||||
@ -95,7 +86,7 @@ namespace Trolleybus
|
||||
_trolleybus = new DrawningSmallTrolleybus(rnd.Next(100, 300), rnd.Next(1000, 2000),
|
||||
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)));
|
||||
Convert.ToBoolean(rnd.Next(0, 2)), Convert.ToBoolean(rnd.Next(0, 2)), Convert.ToBoolean(rnd.Next(0, 2)));
|
||||
SetData();
|
||||
Draw();
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ namespace Trolleybus
|
||||
var trolleybus = new DrawningSmallTrolleybus(rnd.Next(100, 300), rnd.Next(1000, 2000),
|
||||
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)));
|
||||
Convert.ToBoolean(rnd.Next(0, 2)), Convert.ToBoolean(rnd.Next(0, 2)), Convert.ToBoolean(rnd.Next(0, 2)));
|
||||
SetData(trolleybus);
|
||||
}
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user