Делегат заменен на встроенный
This commit is contained in:
parent
1a9daeafe4
commit
ca7d484111
@ -22,7 +22,7 @@ namespace Catamaran
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Событие
|
/// Событие
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private event BoatDelegate EventAddBoat;
|
private event Action<DrawingBoat> EventAddBoat;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Конструктор
|
/// Конструктор
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -55,11 +55,11 @@ namespace Catamaran
|
|||||||
/// Добавление события
|
/// Добавление события
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ev"></param>
|
/// <param name="ev"></param>
|
||||||
public void AddEvent(BoatDelegate ev)
|
public void AddEvent(Action<DrawingBoat> ev)
|
||||||
{
|
{
|
||||||
if (EventAddBoat == null)
|
if (EventAddBoat == null)
|
||||||
{
|
{
|
||||||
EventAddBoat = new BoatDelegate(ev);
|
EventAddBoat = new Action<DrawingBoat>(ev);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -213,7 +213,7 @@ namespace Catamaran
|
|||||||
private void buttonAddBoat_Click_1(object sender, EventArgs e)
|
private void buttonAddBoat_Click_1(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var formBoatConfig = new FormBoatConfig();
|
var formBoatConfig = new FormBoatConfig();
|
||||||
formBoatConfig.AddEvent(new BoatDelegate(AddBoat));
|
formBoatConfig.AddEvent(new Action<DrawingBoat>(AddBoat));
|
||||||
// TODO Call method AddEvent from formCarConfig
|
// TODO Call method AddEvent from formCarConfig
|
||||||
formBoatConfig.Show();
|
formBoatConfig.Show();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user