исправления

This commit is contained in:
10Г Егор Романов 2022-12-04 21:18:39 +04:00
parent 782f65bd28
commit 48371b6261
2 changed files with 3 additions and 12 deletions

View File

@ -16,7 +16,7 @@ namespace HoistingCrane
DrawingHoistingCrane _hoistingCrane = null;
public DrawingHoistingCrane SelectedHoistingCrane { get; private set; }
//событие
private event HoistingCraneDelegate EventAddHoistingCrane;
private event Action<DrawingHoistingCrane> EventAddHoistingCrane;
//конструктор
public FormHoistingCraneConfig()
{
@ -42,11 +42,11 @@ namespace HoistingCrane
}
//добавление события
public void AddEvent(HoistingCraneDelegate ev)
public void AddEvent(Action<DrawingHoistingCrane> ev)
{
if (EventAddHoistingCrane == null)
{
EventAddHoistingCrane = new HoistingCraneDelegate(ev);
EventAddHoistingCrane = new Action<DrawingHoistingCrane>(ev);
}
else
{

View File

@ -1,9 +0,0 @@

namespace HoistingCrane
{
/// <summary>
/// Делегат для передачи объекта
/// </summary>
/// <param name="hoistingCrane"></param>
public delegate void HoistingCraneDelegate(DrawingHoistingCrane hoistingCrane);
}