Romanov E.V. LabWork5 #17

Closed
RomanovEgor wants to merge 20 commits from 5LAB into 4LAB
2 changed files with 3 additions and 12 deletions
Showing only changes of commit 48371b6261 - Show all commits

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