Встроенный*
This commit is contained in:
parent
f1592df7b7
commit
d81342522f
@ -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;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Делегат передачи объекта-прорисовки
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="aircraft"></param>
|
|
||||||
public delegate void AircraftDelegate(DrawningAircraft aircraft);
|
|
@ -21,12 +21,7 @@ public partial class FormAircraftConfig : Form
|
|||||||
/// Объект - прорисовка самолета
|
/// Объект - прорисовка самолета
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private DrawningAircraft? _aircraft;
|
private DrawningAircraft? _aircraft;
|
||||||
|
private event Action<DrawningAircraft>? AircraftDelegate;
|
||||||
/// <summary>
|
|
||||||
/// Событие для передачи объекта
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
private event AircraftDelegate? AircraftDelegate;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Конструктор
|
/// Конструктор
|
||||||
@ -48,10 +43,10 @@ public partial class FormAircraftConfig : Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Привязка внешнего метода к событию
|
/// Событие для передачи объекта
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="aircraftDelegate"></param>
|
/// <param name="aircraftDelegate"></param>
|
||||||
public void AddEvent(AircraftDelegate aircraftDelegate)
|
public void AddEvent(Action<DrawningAircraft> aircraftDelegate)
|
||||||
{
|
{
|
||||||
if (AircraftDelegate != null)
|
if (AircraftDelegate != null)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user