Лабораторная работа №5

This commit is contained in:
Stranni15k 2022-11-19 23:10:17 +04:00
parent 6d3d2b2283
commit 227bfeed97

View File

@ -12,7 +12,7 @@ namespace ElectricLocomotive
{ {
public partial class FormMapWithSetLocomotive : Form public partial class FormMapWithSetLocomotive : Form
{ {
private MapWithSetLocomotivGeneric<DrawningObjectLocomotive, AbstractMap> _mapShipCollectionGeneric; private MapWithSetLocomotivGeneric<DrawningObjectLocomotive, AbstractMap> _mapLocomotiveCollectionGeneric;
private readonly Dictionary<string, AbstractMap> _mapDict = new() private readonly Dictionary<string, AbstractMap> _mapDict = new()
{ {
{"Простая карта", new SimpleMap() }, {"Простая карта", new SimpleMap() },
@ -67,12 +67,12 @@ namespace ElectricLocomotive
} }
if (map != null) if (map != null)
{ {
_mapShipCollectionGeneric = new MapWithSetLocomotivGeneric<DrawningObjectLocomotive, AbstractMap>( _mapLocomotiveCollectionGeneric = new MapWithSetLocomotivGeneric<DrawningObjectLocomotive, AbstractMap>(
pictureBox1.Width, pictureBox1.Height, map); pictureBox1.Width, pictureBox1.Height, map);
} }
else else
{ {
_mapShipCollectionGeneric = null; _mapLocomotiveCollectionGeneric = null;
} }
} }
private void ButtonAddLocomotive_Click(object sender, EventArgs e) private void ButtonAddLocomotive_Click(object sender, EventArgs e)