From 55a92737a27d9e816afbd1bfa20daf17e9594490 Mon Sep 17 00:00:00 2001 From: AnnZhimol Date: Wed, 2 Nov 2022 09:19:18 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B8=D1=82=D0=BE=D0=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Warship/Warship/FormWarshipConfig.cs | 6 +++--- Warship/Warship/MapWithSetWarshipsGeneric.cs | 2 +- Warship/Warship/WarshipDelegate.cs | 10 ---------- 3 files changed, 4 insertions(+), 14 deletions(-) delete mode 100644 Warship/Warship/WarshipDelegate.cs diff --git a/Warship/Warship/FormWarshipConfig.cs b/Warship/Warship/FormWarshipConfig.cs index 5f69c56..a62973a 100644 --- a/Warship/Warship/FormWarshipConfig.cs +++ b/Warship/Warship/FormWarshipConfig.cs @@ -13,7 +13,7 @@ namespace Warship public partial class FormWarshipConfig : Form { DrawingWarship _warship = null; - private event WarshipDelegate EventAddWarship; + private event Action EventAddWarship; public FormWarshipConfig() { InitializeComponent(); @@ -37,11 +37,11 @@ namespace Warship PictureBoxWarship.Image = bmp; } - public void AddEvent(WarshipDelegate ev) + public void AddEvent(Action ev) { if (EventAddWarship == null) { - EventAddWarship = new WarshipDelegate(ev); + EventAddWarship = ev; } else { diff --git a/Warship/Warship/MapWithSetWarshipsGeneric.cs b/Warship/Warship/MapWithSetWarshipsGeneric.cs index db8be0b..a93adf2 100644 --- a/Warship/Warship/MapWithSetWarshipsGeneric.cs +++ b/Warship/Warship/MapWithSetWarshipsGeneric.cs @@ -39,7 +39,7 @@ namespace Warship public Bitmap ShowSet() { - Bitmap bmp = new(_pictureWidth, _pictureWidth); + Bitmap bmp = new(_pictureWidth, _pictureHeight); Graphics gr = Graphics.FromImage(bmp); DrawBackground(gr); DrawWarship(gr); diff --git a/Warship/Warship/WarshipDelegate.cs b/Warship/Warship/WarshipDelegate.cs deleted file mode 100644 index 90ff8a5..0000000 --- a/Warship/Warship/WarshipDelegate.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Warship -{ - public delegate void WarshipDelegate(DrawingWarship warship); -}