diff --git a/AirBomber/AirBomber/DrawningBomber.cs b/AirBomber/AirBomber/DrawningBomber.cs index 1643a4f..6b37f11 100644 --- a/AirBomber/AirBomber/DrawningBomber.cs +++ b/AirBomber/AirBomber/DrawningBomber.cs @@ -24,9 +24,9 @@ namespace AirBomber public void SetPosition(int x, int y, int width, int height) { - if (x > _pictureWidth || x < 0) return; + if (x + _airBomberWidth > width || x < 0) return; else _startPosX = x; - if (y > _pictureHeight || y < 0) return; + if (y + _airBomberHeight> height || y < 0) return; else _startPosY = y; _pictureWidth = width; _pictureHeight = height; diff --git a/AirBomber/AirBomber/FormAirBomber.Designer.cs b/AirBomber/AirBomber/FormAirBomber.Designer.cs index e939b45..9234790 100644 --- a/AirBomber/AirBomber/FormAirBomber.Designer.cs +++ b/AirBomber/AirBomber/FormAirBomber.Designer.cs @@ -48,6 +48,7 @@ this.pictureBoxAirBomber.Location = new System.Drawing.Point(0, 0); this.pictureBoxAirBomber.Name = "pictureBoxAirBomber"; this.pictureBoxAirBomber.Size = new System.Drawing.Size(874, 515); + this.pictureBoxAirBomber.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; this.pictureBoxAirBomber.TabIndex = 0; this.pictureBoxAirBomber.TabStop = false; this.pictureBoxAirBomber.Resize += new System.EventHandler(this.PictureBoxAirBomber_Resize);