This commit is contained in:
Павел Путилин 2022-11-04 17:01:55 +04:00
parent 41a28dae59
commit b328be5e87
2 changed files with 3 additions and 11 deletions

View File

@ -1,8 +0,0 @@
namespace AirplaneWithRadar
{
/// <summary>
/// Делегат для передачи объекта-самолета
/// </summary>
/// <param name="airplane"></param>
public delegate void AirplaneDelegate(DrawningAirplane airplane);
}

View File

@ -12,7 +12,7 @@
/// <summary>
/// Событие
/// </summary>
private event AirplaneDelegate EventAddAirplane;
private event Action<DrawningAirplane> EventAddAirplane;
/// <summary>
/// Конструктор
/// </summary>
@ -45,11 +45,11 @@
/// Добавление события
/// </summary>
/// <param name="ev"></param>
public void AddEvent(AirplaneDelegate ev)
public void AddEvent(Action<DrawningAirplane> ev)
{
if (EventAddAirplane == null)
{
EventAddAirplane = new AirplaneDelegate(ev);
EventAddAirplane = new (ev);
}
else
{