Presnyakova V.V Lab_5 #13

Closed
Victoria_Presnyakova wants to merge 4 commits from Lab_5 into Lab_4
2 changed files with 4 additions and 4 deletions
Showing only changes of commit ca7d484111 - Show all commits

View File

@ -22,7 +22,7 @@ namespace Catamaran
/// <summary>
/// Событие
/// </summary>
private event BoatDelegate EventAddBoat;
private event Action<DrawingBoat> EventAddBoat;
/// <summary>
/// Конструктор
/// </summary>
@ -55,11 +55,11 @@ namespace Catamaran
/// Добавление события
/// </summary>
/// <param name="ev"></param>
public void AddEvent(BoatDelegate ev)
public void AddEvent(Action<DrawingBoat> ev)
{
if (EventAddBoat == null)
{
EventAddBoat = new BoatDelegate(ev);
EventAddBoat = new Action<DrawingBoat>(ev);
}
else
{

View File

@ -213,7 +213,7 @@ namespace Catamaran
private void buttonAddBoat_Click_1(object sender, EventArgs e)
{
var formBoatConfig = new FormBoatConfig();
formBoatConfig.AddEvent(new BoatDelegate(AddBoat));
formBoatConfig.AddEvent(new Action<DrawingBoat>(AddBoat));
// TODO Call method AddEvent from formCarConfig
formBoatConfig.Show();
}