Пятая лабораторная
This commit is contained in:
parent
2a6c6e17e6
commit
aa6f30d71d
@ -1,10 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MotorBoat
|
||||
{
|
||||
public delegate void BoatDelegate(DrawningBoat boat);
|
||||
}
|
@ -12,7 +12,7 @@ namespace MotorBoat
|
||||
{
|
||||
public partial class FormBoatConfig : Form
|
||||
{
|
||||
private event BoatDelegate EventAddBoat;
|
||||
private event Action<DrawningBoat> EventAddBoat;
|
||||
DrawningBoat _boat = null;
|
||||
public FormBoatConfig()
|
||||
{
|
||||
@ -28,11 +28,11 @@ namespace MotorBoat
|
||||
buttonCancel.Click += (s, a) => Close();
|
||||
}
|
||||
|
||||
public void AddEvent(BoatDelegate ev)
|
||||
public void AddEvent(Action<DrawningBoat> ev)
|
||||
{
|
||||
if (EventAddBoat == null)
|
||||
{
|
||||
EventAddBoat = new BoatDelegate(ev);
|
||||
EventAddBoat = new Action<DrawningBoat>(ev);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user