Замена автомобиля на самолет
This commit is contained in:
parent
2f87fa46bd
commit
97fda24a73
26
AirBomber/AirBomber/FormAirBomber.Designer.cs
generated
26
AirBomber/AirBomber/FormAirBomber.Designer.cs
generated
@ -28,7 +28,7 @@
|
||||
/// </summary>
|
||||
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.toolStripStatusLabelSpeed = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolStripStatusLabelWeight = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
@ -43,16 +43,16 @@
|
||||
this.statusStrip.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// pictureBoxCar
|
||||
// pictureBoxAirplane
|
||||
//
|
||||
this.pictureBoxCar.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pictureBoxCar.Location = new System.Drawing.Point(0, 0);
|
||||
this.pictureBoxCar.Name = "pictureBoxCar";
|
||||
this.pictureBoxCar.Size = new System.Drawing.Size(800, 428);
|
||||
this.pictureBoxCar.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||
this.pictureBoxCar.TabIndex = 0;
|
||||
this.pictureBoxCar.TabStop = false;
|
||||
this.pictureBoxCar.Resize += new System.EventHandler(this.PictureBoxCar_Resize);
|
||||
this.pictureBoxAirplane.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pictureBoxAirplane.Location = new System.Drawing.Point(0, 0);
|
||||
this.pictureBoxAirplane.Name = "pictureBoxAirplane";
|
||||
this.pictureBoxAirplane.Size = new System.Drawing.Size(800, 428);
|
||||
this.pictureBoxAirplane.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||
this.pictureBoxAirplane.TabIndex = 0;
|
||||
this.pictureBoxAirplane.TabStop = false;
|
||||
this.pictureBoxAirplane.Resize += new System.EventHandler(this.PictureBoxAirplane_Resize);
|
||||
//
|
||||
// statusStrip
|
||||
//
|
||||
@ -164,11 +164,11 @@
|
||||
this.Controls.Add(this.buttonLeft);
|
||||
this.Controls.Add(this.buttonUp);
|
||||
this.Controls.Add(this.buttonCreate);
|
||||
this.Controls.Add(this.pictureBoxCar);
|
||||
this.Controls.Add(this.pictureBoxAirplane);
|
||||
this.Controls.Add(this.statusStrip);
|
||||
this.Name = "FormAirBomber";
|
||||
this.Text = "Самолет";
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBoxCar)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBoxAirplane)).EndInit();
|
||||
this.statusStrip.ResumeLayout(false);
|
||||
this.statusStrip.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
@ -178,7 +178,7 @@
|
||||
|
||||
#endregion
|
||||
|
||||
private PictureBox pictureBoxCar;
|
||||
private PictureBox pictureBoxAirplane;
|
||||
private StatusStrip statusStrip;
|
||||
private ToolStripStatusLabel toolStripStatusLabelSpeed;
|
||||
private ToolStripStatusLabel toolStripStatusLabelWeight;
|
||||
|
@ -9,14 +9,14 @@ namespace AirBomber
|
||||
InitializeComponent();
|
||||
}
|
||||
/// <summary>
|
||||
/// Ìåòîä ïðîðèñîâêè ìàøèíû
|
||||
/// Ìåòîä ïğîğèñîâêè ñàìîëåòà
|
||||
/// </summary>
|
||||
private void Draw()
|
||||
{
|
||||
Bitmap bmp = new(pictureBoxCar.Width, pictureBoxCar.Height);
|
||||
Bitmap bmp = new(pictureBoxAirplane.Width, pictureBoxAirplane.Height);
|
||||
Graphics gr = Graphics.FromImage(bmp);
|
||||
_airplane?.DrawTransport(gr);
|
||||
pictureBoxCar.Image = bmp;
|
||||
pictureBoxAirplane.Image = bmp;
|
||||
}
|
||||
/// <summary>
|
||||
/// Ìåòîä óñòàíîâêè äàííûõ
|
||||
@ -72,9 +72,9 @@ namespace AirBomber
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void PictureBoxCar_Resize(object sender, EventArgs e)
|
||||
private void PictureBoxAirplane_Resize(object sender, EventArgs e)
|
||||
{
|
||||
_airplane?.ChangeBorders(pictureBoxCar.Width, pictureBoxCar.Height);
|
||||
_airplane?.ChangeBorders(pictureBoxAirplane.Width, pictureBoxAirplane.Height);
|
||||
Draw();
|
||||
}
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user