PIbd-21. Danilov V.V. Lab work 05 #5
@ -21,7 +21,7 @@ namespace Project_DumpTruck
|
||||
/// <summary>
|
||||
/// Событие
|
||||
/// </summary>
|
||||
private event TruckDelegate? EventAddTruck;
|
||||
private event Action<DrawningTruck> EventAddTruck;
|
||||
/// <summary>
|
||||
/// Конструктор
|
||||
/// </summary>
|
||||
@ -56,7 +56,7 @@ namespace Project_DumpTruck
|
||||
/// Добавление события
|
||||
/// </summary>
|
||||
/// <param name="ev">Привязанный метод</param>
|
||||
public void AddEvent(TruckDelegate ev)
|
||||
public void AddEvent(Action<DrawningTruck> ev)
|
||||
{
|
||||
if (EventAddTruck == null)
|
||||
{
|
||||
|
@ -1,15 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Project_DumpTruck.DrawningObjects;
|
||||
|
||||
namespace Project_DumpTruck
|
||||
{
|
||||
/// <summary>
|
||||
/// Делегат для передачи объекта-автомобиля
|
||||
/// </summary>
|
||||
/// <param name="car"></param>
|
||||
public delegate void TruckDelegate(DrawningTruck Truck);
|
||||
}
|
Loading…
Reference in New Issue
Block a user