Делегат заменен на встроенный
This commit is contained in:
parent
1a9daeafe4
commit
ca7d484111
@ -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
|
||||
{
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user