diff --git a/Stormtrooper/Stormtrooper/AircraftDelegate.cs b/Stormtrooper/Stormtrooper/AircraftDelegate.cs deleted file mode 100644 index 6ad3ce9..0000000 --- a/Stormtrooper/Stormtrooper/AircraftDelegate.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Stormtrooper.Drawnings; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Stormtrooper; - -/// -/// Делегат передачи объекта-прорисовки -/// -/// -public delegate void AircraftDelegate(DrawningAircraft aircraft); diff --git a/Stormtrooper/Stormtrooper/FormAircraftConfig.cs b/Stormtrooper/Stormtrooper/FormAircraftConfig.cs index 25e8159..951a6d2 100644 --- a/Stormtrooper/Stormtrooper/FormAircraftConfig.cs +++ b/Stormtrooper/Stormtrooper/FormAircraftConfig.cs @@ -21,12 +21,7 @@ public partial class FormAircraftConfig : Form /// Объект - прорисовка самолета /// private DrawningAircraft? _aircraft; - - /// - /// Событие для передачи объекта - /// - - private event AircraftDelegate? AircraftDelegate; + private event Action? AircraftDelegate; /// /// Конструктор @@ -48,10 +43,10 @@ public partial class FormAircraftConfig : Form } /// - /// Привязка внешнего метода к событию + /// Событие для передачи объекта /// /// - public void AddEvent(AircraftDelegate aircraftDelegate) + public void AddEvent(Action aircraftDelegate) { if (AircraftDelegate != null) {