rename buttons and delete extra modification

This commit is contained in:
MaxKarme 2022-10-05 07:53:54 +03:00
parent d9446d1c46
commit e9d0046f62
5 changed files with 9 additions and 33 deletions

View File

@ -8,11 +8,11 @@ namespace AirFighter
{ {
internal class DrawingModernAirFighter : DrawingAirFighter internal class DrawingModernAirFighter : DrawingAirFighter
{ {
public DrawingModernAirFighter(int speed, float weight, Color bodyColor, Color dopColor, bool dopWings, bool rockets, bool sportLine) : public DrawingModernAirFighter(int speed, float weight, Color bodyColor, Color dopColor, bool dopWings, bool rockets) :
base(speed, weight, bodyColor, 195, 166) base(speed, weight, bodyColor, 195, 166)
{ {
AirFighter = new EntityModernAirFighter(speed, weight, bodyColor, dopColor, dopWings, AirFighter = new EntityModernAirFighter(speed, weight, bodyColor, dopColor, dopWings,
rockets, sportLine); rockets);
} }
public override void DrawTransport(Graphics g) public override void DrawTransport(Graphics g)
{ {

View File

@ -10,40 +10,18 @@ namespace AirFighter
{ {
internal class EntityModernAirFighter : EntityAirFighter internal class EntityModernAirFighter : EntityAirFighter
{ {
/// <summary>
/// Дополнительный цвет
/// </summary>
public Color DopColor { get; private set; } public Color DopColor { get; private set; }
/// <summary>
/// Признак наличия обвеса
/// </summary>
public bool DopWings { get; private set; } public bool DopWings { get; private set; }
/// <summary>
/// Признак наличия антикрыла
/// </summary>
public bool Rockets { get; private set; } public bool Rockets { get; private set; }
/// <summary>
/// Признак наличия гоночной полосы
/// </summary>
public bool SportLine { get; private set; }
/// <summary>
/// Инициализация свойств
/// </summary>
/// <param name="speed">Скорость</param>
/// <param name="weight">Вес автомобиля</param>
/// <param name="bodyColor">Цвет кузова</param>
/// <param name="dopColor">Дополнительный цвет</param>
/// <param name="bodyKit">Признак наличия обвеса</param>
/// <param name="wing">Признак наличия антикрыла</param>
/// <param name="sportLine">Признак наличия гоночной полосы</param>
public EntityModernAirFighter(int speed, float weight, Color bodyColor, Color public EntityModernAirFighter(int speed, float weight, Color bodyColor, Color
dopColor, bool dopWings, bool rockets, bool sportLine) : dopColor, bool dopWings, bool rockets) :
base(speed, weight, bodyColor) base(speed, weight, bodyColor)
{ {
DopColor = dopColor; DopColor = dopColor;
DopWings = dopWings; DopWings = dopWings;
Rockets = rockets; Rockets = rockets;
SportLine = sportLine;
} }
} }
} }

View File

@ -50,7 +50,7 @@
this.CreateButton.Name = "CreateButton"; this.CreateButton.Name = "CreateButton";
this.CreateButton.Size = new System.Drawing.Size(94, 29); this.CreateButton.Size = new System.Drawing.Size(94, 29);
this.CreateButton.TabIndex = 0; this.CreateButton.TabIndex = 0;
this.CreateButton.Text = "create"; this.CreateButton.Text = "создание";
this.CreateButton.UseVisualStyleBackColor = true; this.CreateButton.UseVisualStyleBackColor = true;
this.CreateButton.Click += new System.EventHandler(this.CreateButton_Click); this.CreateButton.Click += new System.EventHandler(this.CreateButton_Click);
// //
@ -155,7 +155,7 @@
this.button1.Name = "button1"; this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(148, 29); this.button1.Size = new System.Drawing.Size(148, 29);
this.button1.TabIndex = 7; this.button1.TabIndex = 7;
this.button1.Text = "create modern"; this.button1.Text = "модификация";
this.button1.UseVisualStyleBackColor = true; this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.CreateModernButton_Click); this.button1.Click += new System.EventHandler(this.CreateModernButton_Click);
// //

View File

@ -36,8 +36,7 @@ namespace AirFighter
_airFighter = new DrawingModernAirFighter(rnd.Next(100, 300), rnd.Next(1000,2000), _airFighter = new DrawingModernAirFighter(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)),
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)));
_airFighter.SetPosition(rnd.Next(10, 100), rnd.Next(10, 100), pictureBox.Width, pictureBox.Height); _airFighter.SetPosition(rnd.Next(10, 100), rnd.Next(10, 100), pictureBox.Width, pictureBox.Height);

View File

@ -48,8 +48,7 @@ namespace AirFighter
_airFighter = new DrawingModernAirFighter(rnd.Next(100, 300), rnd.Next(1000, 2000), _airFighter = new DrawingModernAirFighter(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)),
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)));
SetData(_airFighter); SetData(_airFighter);