Заменен автомобиль на самолет

This commit is contained in:
Данияр Аглиуллов 2022-09-29 22:04:14 +04:00
parent 97fda24a73
commit 32b7c9ecf7
3 changed files with 16 additions and 16 deletions

View File

@ -39,7 +39,7 @@
this.buttonRight = new System.Windows.Forms.Button(); this.buttonRight = new System.Windows.Forms.Button();
this.buttonDown = new System.Windows.Forms.Button(); this.buttonDown = new System.Windows.Forms.Button();
this.buttonCreateModif = new System.Windows.Forms.Button(); this.buttonCreateModif = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxCar)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxAirplane)).BeginInit();
this.statusStrip.SuspendLayout(); this.statusStrip.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //

View File

@ -28,7 +28,7 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.pictureBoxCar = new System.Windows.Forms.PictureBox(); this.pictureBoxAirplane = new System.Windows.Forms.PictureBox();
this.statusStrip = new System.Windows.Forms.StatusStrip(); this.statusStrip = new System.Windows.Forms.StatusStrip();
this.toolStripStatusLabelSpeed = new System.Windows.Forms.ToolStripStatusLabel(); this.toolStripStatusLabelSpeed = new System.Windows.Forms.ToolStripStatusLabel();
this.toolStripStatusLabelWeight = new System.Windows.Forms.ToolStripStatusLabel(); this.toolStripStatusLabelWeight = new System.Windows.Forms.ToolStripStatusLabel();
@ -40,19 +40,19 @@
this.buttonDown = new System.Windows.Forms.Button(); this.buttonDown = new System.Windows.Forms.Button();
this.buttonCreateModif = new System.Windows.Forms.Button(); this.buttonCreateModif = new System.Windows.Forms.Button();
this.comboBoxSelectorMap = new System.Windows.Forms.ComboBox(); this.comboBoxSelectorMap = new System.Windows.Forms.ComboBox();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxCar)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxAirplane)).BeginInit();
this.statusStrip.SuspendLayout(); this.statusStrip.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// pictureBoxCar // pictureBoxAirplane
// //
this.pictureBoxCar.Dock = System.Windows.Forms.DockStyle.Fill; this.pictureBoxAirplane.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBoxCar.Location = new System.Drawing.Point(0, 0); this.pictureBoxAirplane.Location = new System.Drawing.Point(0, 0);
this.pictureBoxCar.Name = "pictureBoxCar"; this.pictureBoxAirplane.Name = "pictureBoxAirplane";
this.pictureBoxCar.Size = new System.Drawing.Size(800, 428); this.pictureBoxAirplane.Size = new System.Drawing.Size(800, 428);
this.pictureBoxCar.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; this.pictureBoxAirplane.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.pictureBoxCar.TabIndex = 0; this.pictureBoxAirplane.TabIndex = 0;
this.pictureBoxCar.TabStop = false; this.pictureBoxAirplane.TabStop = false;
// //
// statusStrip // statusStrip
// //
@ -178,11 +178,11 @@
this.Controls.Add(this.buttonLeft); this.Controls.Add(this.buttonLeft);
this.Controls.Add(this.buttonUp); this.Controls.Add(this.buttonUp);
this.Controls.Add(this.buttonCreate); this.Controls.Add(this.buttonCreate);
this.Controls.Add(this.pictureBoxCar); this.Controls.Add(this.pictureBoxAirplane);
this.Controls.Add(this.statusStrip); this.Controls.Add(this.statusStrip);
this.Name = "FormMap"; this.Name = "FormMap";
this.Text = "Карта"; this.Text = "Карта";
((System.ComponentModel.ISupportInitialize)(this.pictureBoxCar)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxAirplane)).EndInit();
this.statusStrip.ResumeLayout(false); this.statusStrip.ResumeLayout(false);
this.statusStrip.PerformLayout(); this.statusStrip.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
@ -192,7 +192,7 @@
#endregion #endregion
private PictureBox pictureBoxCar; private PictureBox pictureBoxAirplane;
private StatusStrip statusStrip; private StatusStrip statusStrip;
private ToolStripStatusLabel toolStripStatusLabelSpeed; private ToolStripStatusLabel toolStripStatusLabelSpeed;
private ToolStripStatusLabel toolStripStatusLabelWeight; private ToolStripStatusLabel toolStripStatusLabelWeight;

View File

@ -20,7 +20,7 @@ namespace AirBomber
toolStripStatusLabelSpeed.Text = $"Скорость: {car.Airplane.Speed}"; toolStripStatusLabelSpeed.Text = $"Скорость: {car.Airplane.Speed}";
toolStripStatusLabelWeight.Text = $"Вес: {car.Airplane.Weight}"; toolStripStatusLabelWeight.Text = $"Вес: {car.Airplane.Weight}";
toolStripStatusLabelBodyColor.Text = $"Цвет: {car.Airplane.BodyColor.Name}"; toolStripStatusLabelBodyColor.Text = $"Цвет: {car.Airplane.BodyColor.Name}";
pictureBoxCar.Image = _abstractMap.CreateMap(pictureBoxCar.Width, pictureBoxCar.Height, pictureBoxAirplane.Image = _abstractMap.CreateMap(pictureBoxAirplane.Width, pictureBoxAirplane.Height,
new DrawningObject(car)); new DrawningObject(car));
} }
/// <summary> /// <summary>
@ -59,7 +59,7 @@ namespace AirBomber
dir = Direction.Right; dir = Direction.Right;
break; break;
} }
pictureBoxCar.Image = _abstractMap?.MoveObject(dir); pictureBoxAirplane.Image = _abstractMap?.MoveObject(dir);
} }
/// <summary> /// <summary>
/// Обработка нажатия кнопки "Модификация" /// Обработка нажатия кнопки "Модификация"