From 1f16cad283ee6aec669cbf46586e740035bc874f Mon Sep 17 00:00:00 2001 From: the Date: Wed, 21 Sep 2022 10:49:29 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BB=D0=BD=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D1=8C=D1=8E=20=D1=81=D0=B4=D0=B5=D0=BB=D0=B0=D0=BD=D0=BD=D0=B0?= =?UTF-8?q?=D1=8F=20=D0=BB=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82=D0=BE=D1=80?= =?UTF-8?q?=D0=BD=D0=B0=D1=8F=20=E2=84=961=20=D0=B1=D0=B0=D0=B7=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D1=8F.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AirBomber/AirBomber/DrawningBomber.cs | 4 ++-- AirBomber/AirBomber/FormAirBomber.Designer.cs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) 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);