Lab5 defenetly Done
This commit is contained in:
parent
4e86ac6cb0
commit
41244fc58c
@ -1,16 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using ProjectAirBomber.DrawingObjects;
|
||||
|
||||
namespace ProjectAirBomber
|
||||
{
|
||||
/// <summary>
|
||||
/// Делегат для передачи объекта
|
||||
/// </summary>
|
||||
public delegate void PlaneDelegate(DrawingPlane plane);
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ namespace ProjectAirBomber
|
||||
}
|
||||
FormPlaneConfig form = new FormPlaneConfig(pictureBoxCollection.Width, pictureBoxCollection.Height);
|
||||
form.Show();
|
||||
PlaneDelegate? planeDelegate = new((plane) => {
|
||||
Action<DrawingPlane>? planeDelegate = new((plane) => {
|
||||
if (obj + plane)
|
||||
{
|
||||
MessageBox.Show("Объект добавлен");
|
||||
|
@ -21,10 +21,7 @@ namespace ProjectAirBomber
|
||||
/// Переменная
|
||||
/// </summary>
|
||||
DrawingPlane? _plane = null;
|
||||
/// <summary>
|
||||
/// Событие
|
||||
/// </summary>
|
||||
private event PlaneDelegate? EventAddPlane;
|
||||
Action<DrawingPlane>? EventAddPlane;
|
||||
/// <summary>
|
||||
/// Конструктор
|
||||
/// </summary>
|
||||
@ -60,7 +57,7 @@ namespace ProjectAirBomber
|
||||
/// Добавление события
|
||||
/// </summary>
|
||||
/// <param name="ev">Привязанный метод</param>
|
||||
public void AddEvent(PlaneDelegate ev)
|
||||
public void AddEvent(Action<DrawingPlane>? ev)
|
||||
{
|
||||
if (EventAddPlane == null)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user