From ca7d4841111c059cbfb51a265e27e4bd1f6d66e8 Mon Sep 17 00:00:00 2001 From: VictoriaPresnyakova Date: Sat, 19 Nov 2022 19:06:56 +0400 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=B5=D0=BB=D0=B5=D0=B3=D0=B0=D1=82=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=20=D0=BD=D0=B0=20?= =?UTF-8?q?=D0=B2=D1=81=D1=82=D1=80=D0=BE=D0=B5=D0=BD=D0=BD=D1=8B=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Catamaran/FormBoatConfig.cs | 6 +++--- Catamaran/FormMapWithSetBoats.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Catamaran/FormBoatConfig.cs b/Catamaran/FormBoatConfig.cs index ed9bbf9..7f17d68 100644 --- a/Catamaran/FormBoatConfig.cs +++ b/Catamaran/FormBoatConfig.cs @@ -22,7 +22,7 @@ namespace Catamaran /// /// Событие /// - private event BoatDelegate EventAddBoat; + private event Action EventAddBoat; /// /// Конструктор /// @@ -55,11 +55,11 @@ namespace Catamaran /// Добавление события /// /// - public void AddEvent(BoatDelegate ev) + public void AddEvent(Action ev) { if (EventAddBoat == null) { - EventAddBoat = new BoatDelegate(ev); + EventAddBoat = new Action(ev); } else { diff --git a/Catamaran/FormMapWithSetBoats.cs b/Catamaran/FormMapWithSetBoats.cs index 25029c5..1f0c0ef 100644 --- a/Catamaran/FormMapWithSetBoats.cs +++ b/Catamaran/FormMapWithSetBoats.cs @@ -213,7 +213,7 @@ namespace Catamaran private void buttonAddBoat_Click_1(object sender, EventArgs e) { var formBoatConfig = new FormBoatConfig(); - formBoatConfig.AddEvent(new BoatDelegate(AddBoat)); + formBoatConfig.AddEvent(new Action(AddBoat)); // TODO Call method AddEvent from formCarConfig formBoatConfig.Show(); }