diff --git a/ProjectAirFighter/ProjectAirFighter/DrawningAirFighter.cs b/ProjectAirFighter/ProjectAirFighter/DrawningAirFighter.cs index 49d9f37..86f4d77 100644 --- a/ProjectAirFighter/ProjectAirFighter/DrawningAirFighter.cs +++ b/ProjectAirFighter/ProjectAirFighter/DrawningAirFighter.cs @@ -83,7 +83,6 @@ public class DrawningAirFighter _startPosY = _pictureHeight.Value - _drawningAirFighterHeight; } } - return true; } /// @@ -109,7 +108,6 @@ public class DrawningAirFighter { _startPosX = 0; } - return; } /// diff --git a/ProjectAirFighter/ProjectAirFighter/FormAirFighter.Designer.cs b/ProjectAirFighter/ProjectAirFighter/FormAirFighter.Designer.cs index 64fade1..7f6aa17 100644 --- a/ProjectAirFighter/ProjectAirFighter/FormAirFighter.Designer.cs +++ b/ProjectAirFighter/ProjectAirFighter/FormAirFighter.Designer.cs @@ -46,7 +46,6 @@ pictureBoxAirFighter.SizeMode = PictureBoxSizeMode.AutoSize; pictureBoxAirFighter.TabIndex = 0; pictureBoxAirFighter.TabStop = false; - pictureBoxAirFighter.Resize += new System.EventHandler(this.PictureBox_Resize); // // buttonCreateAirFighter // diff --git a/ProjectAirFighter/ProjectAirFighter/FormAirFighter.cs b/ProjectAirFighter/ProjectAirFighter/FormAirFighter.cs index 623747e..5420973 100644 --- a/ProjectAirFighter/ProjectAirFighter/FormAirFighter.cs +++ b/ProjectAirFighter/ProjectAirFighter/FormAirFighter.cs @@ -26,10 +26,7 @@ public partial class FormAirFighter : Form /// private void Draw() { - if (_drawningAirFighter == null) - { - return; - } + if (_drawningAirFighter == null) return; if (pictureBoxAirFighter.Width == 0 || pictureBoxAirFighter.Height == 0) return; Bitmap bitmap = new(pictureBoxAirFighter.Width, pictureBoxAirFighter.Height); Graphics gr = Graphics.FromImage(bitmap); @@ -38,7 +35,7 @@ public partial class FormAirFighter : Form } /// - /// Обработка нажатия кнопки создать + /// Обработка нажатия кнопки "Создать" /// /// /// @@ -90,10 +87,4 @@ public partial class FormAirFighter : Form } if (result) Draw(); } - - private void PictureBox_Resize(object sender, EventArgs e) - { - _drawningAirFighter?.SetPictureSize(pictureBoxAirFighter.Width, pictureBoxAirFighter.Height); - Draw(); - } }