итог
This commit is contained in:
parent
1e245ddeea
commit
55a92737a2
@ -13,7 +13,7 @@ namespace Warship
|
|||||||
public partial class FormWarshipConfig : Form
|
public partial class FormWarshipConfig : Form
|
||||||
{
|
{
|
||||||
DrawingWarship _warship = null;
|
DrawingWarship _warship = null;
|
||||||
private event WarshipDelegate EventAddWarship;
|
private event Action<DrawingWarship> EventAddWarship;
|
||||||
public FormWarshipConfig()
|
public FormWarshipConfig()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@ -37,11 +37,11 @@ namespace Warship
|
|||||||
PictureBoxWarship.Image = bmp;
|
PictureBoxWarship.Image = bmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddEvent(WarshipDelegate ev)
|
public void AddEvent(Action<DrawingWarship> ev)
|
||||||
{
|
{
|
||||||
if (EventAddWarship == null)
|
if (EventAddWarship == null)
|
||||||
{
|
{
|
||||||
EventAddWarship = new WarshipDelegate(ev);
|
EventAddWarship = ev;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -39,7 +39,7 @@ namespace Warship
|
|||||||
|
|
||||||
public Bitmap ShowSet()
|
public Bitmap ShowSet()
|
||||||
{
|
{
|
||||||
Bitmap bmp = new(_pictureWidth, _pictureWidth);
|
Bitmap bmp = new(_pictureWidth, _pictureHeight);
|
||||||
Graphics gr = Graphics.FromImage(bmp);
|
Graphics gr = Graphics.FromImage(bmp);
|
||||||
DrawBackground(gr);
|
DrawBackground(gr);
|
||||||
DrawWarship(gr);
|
DrawWarship(gr);
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Warship
|
|
||||||
{
|
|
||||||
public delegate void WarshipDelegate(DrawingWarship warship);
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user