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); -}