From b328be5e87bc8142f0f598097a06b2c60a64faee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B0=D0=B2=D0=B5=D0=BB=20=D0=9F=D1=83=D1=82=D0=B8?= =?UTF-8?q?=D0=BB=D0=B8=D0=BD?= Date: Fri, 4 Nov 2022 17:01:55 +0400 Subject: [PATCH] fix --- AirplaneWithRadar/AirplaneWithRadar/AirplaneDelegate.cs | 8 -------- AirplaneWithRadar/AirplaneWithRadar/FormAirplaneConfig.cs | 6 +++--- 2 files changed, 3 insertions(+), 11 deletions(-) delete mode 100644 AirplaneWithRadar/AirplaneWithRadar/AirplaneDelegate.cs diff --git a/AirplaneWithRadar/AirplaneWithRadar/AirplaneDelegate.cs b/AirplaneWithRadar/AirplaneWithRadar/AirplaneDelegate.cs deleted file mode 100644 index 7d5eac0..0000000 --- a/AirplaneWithRadar/AirplaneWithRadar/AirplaneDelegate.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace AirplaneWithRadar -{ - /// - /// Делегат для передачи объекта-самолета - /// - /// - public delegate void AirplaneDelegate(DrawningAirplane airplane); -} diff --git a/AirplaneWithRadar/AirplaneWithRadar/FormAirplaneConfig.cs b/AirplaneWithRadar/AirplaneWithRadar/FormAirplaneConfig.cs index 62e6722..7d902b9 100644 --- a/AirplaneWithRadar/AirplaneWithRadar/FormAirplaneConfig.cs +++ b/AirplaneWithRadar/AirplaneWithRadar/FormAirplaneConfig.cs @@ -12,7 +12,7 @@ /// /// Событие /// - private event AirplaneDelegate EventAddAirplane; + private event Action EventAddAirplane; /// /// Конструктор /// @@ -45,11 +45,11 @@ /// Добавление события /// /// - public void AddEvent(AirplaneDelegate ev) + public void AddEvent(Action ev) { if (EventAddAirplane == null) { - EventAddAirplane = new AirplaneDelegate(ev); + EventAddAirplane = new (ev); } else {