Ihonkina E.S. LabWork05 #5

Closed
k_ihnkn wants to merge 3 commits from LabWork05 into LabWork04
2 changed files with 3 additions and 13 deletions
Showing only changes of commit aa6f30d71d - Show all commits

View File

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

View File

@ -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
{