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 {