прверка на повторяющиеся ключи в словаре
This commit is contained in:
parent
40f345bcb8
commit
d60cbc96e5
@ -42,7 +42,7 @@ namespace AntiAircraftGun
|
|||||||
/// <param name="map">Карта</param>
|
/// <param name="map">Карта</param>
|
||||||
public void AddMap(string name, AbstractMap map)
|
public void AddMap(string name, AbstractMap map)
|
||||||
{
|
{
|
||||||
_mapStorages.Add(name, new MapWithSetAntiAircraftGunsGeneric<DrawingObjectAntiAircraftGun, AbstractMap>(_pictureWidth, _pictureHeight, map));
|
if(!_mapStorages.ContainsKey(name)) _mapStorages.Add(name, new MapWithSetAntiAircraftGunsGeneric<DrawingObjectAntiAircraftGun, AbstractMap>(_pictureWidth, _pictureHeight, map));
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Удаление карты
|
/// Удаление карты
|
||||||
|
Loading…
Reference in New Issue
Block a user