From eda0bc77d9e18a3d9acb28cf3c2320db9b0d1adb Mon Sep 17 00:00:00 2001 From: MaxKarme <91691525+MaxKarme@users.noreply.github.com> Date: Tue, 4 Oct 2022 16:31:14 +0300 Subject: [PATCH 1/2] change checks --- AirFighter/AirFighter/DrawingAirFighter.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/AirFighter/AirFighter/DrawingAirFighter.cs b/AirFighter/AirFighter/DrawingAirFighter.cs index 94d1b4f..036fd29 100644 --- a/AirFighter/AirFighter/DrawingAirFighter.cs +++ b/AirFighter/AirFighter/DrawingAirFighter.cs @@ -29,10 +29,8 @@ namespace AirFighter { if (width < _airFighterWidth || height < _airFighterHeight) return; - if (_startPosX + _airFighterWidth > _pictureWidth) return; - if (_startPosX < 0) return; - if (_startPosY < 0) return; - if (_startPosY + _airFighterHeight > _pictureHeight) return; + if (x + _airFighterWidth > width || x < 0) return; + if (y + _airFighterHeight > height || y < 0) return; _startPosX = x; _startPosY = y; From cb2fd7ac9f274222367dbe01297bbf5fda274c1c Mon Sep 17 00:00:00 2001 From: MaxKarme <91691525+MaxKarme@users.noreply.github.com> Date: Tue, 4 Oct 2022 21:50:16 +0300 Subject: [PATCH 2/2] rename button --- AirFighter/AirFighter/FormAirFighter.Designer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AirFighter/AirFighter/FormAirFighter.Designer.cs b/AirFighter/AirFighter/FormAirFighter.Designer.cs index ff1bd69..c716e3b 100644 --- a/AirFighter/AirFighter/FormAirFighter.Designer.cs +++ b/AirFighter/AirFighter/FormAirFighter.Designer.cs @@ -49,7 +49,7 @@ this.CreateButton.Name = "CreateButton"; this.CreateButton.Size = new System.Drawing.Size(94, 29); this.CreateButton.TabIndex = 0; - this.CreateButton.Text = "create"; + this.CreateButton.Text = "создать"; this.CreateButton.UseVisualStyleBackColor = true; this.CreateButton.Click += new System.EventHandler(this.CreateButton_Click); //