ISEbd-12 Khaliullov LabWork05 Simple #5

Closed
rakhaliullov wants to merge 4 commits from LabWork5 into LabWork4
2 changed files with 3 additions and 22 deletions
Showing only changes of commit d81342522f - Show all commits

View File

@ -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);

View File

@ -21,12 +21,7 @@ public partial class FormAircraftConfig : Form
/// Объект - прорисовка самолета
/// </summary>
private DrawningAircraft? _aircraft;
/// <summary>
/// Событие для передачи объекта
/// </summary>
private event AircraftDelegate? AircraftDelegate;
private event Action<DrawningAircraft>? AircraftDelegate;
/// <summary>
/// Конструктор
@ -48,10 +43,10 @@ public partial class FormAircraftConfig : Form
}
/// <summary>
/// Привязка внешнего метода к событию
/// Событие для передачи объекта
/// </summary>
/// <param name="aircraftDelegate"></param>
public void AddEvent(AircraftDelegate aircraftDelegate)
public void AddEvent(Action<DrawningAircraft> aircraftDelegate)
{
if (AircraftDelegate != null)
{