Исправления
This commit is contained in:
parent
c707897b00
commit
3895ad8a7e
@ -165,24 +165,23 @@ namespace AccordionBus
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var otherMap = other as AbstractMap;
|
||||
if (otherMap == null)
|
||||
if (other == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (_width != otherMap._width)
|
||||
if (_width != other._width)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (_height != otherMap._height)
|
||||
if (_height != other._height)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (_size_x != otherMap._size_x)
|
||||
if (_size_x != other._size_x)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (_size_y != otherMap._size_y)
|
||||
if (_size_y != other._size_y)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -190,7 +189,7 @@ namespace AccordionBus
|
||||
{
|
||||
for (int j = 0; j < _map.GetLength(1); j++)
|
||||
{
|
||||
if (_map[i, j] != otherMap._map[i, j])
|
||||
if (_map[i, j] != other._map[i, j])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -157,6 +157,11 @@ namespace AccordionBus
|
||||
_logger.LogWarning($"Ошибка переполнения хранилища: {ex.Message}");
|
||||
MessageBox.Show($"Ошибка переполнения хранилища: {ex.Message}", "Результат", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
catch (ArgumentException ex)
|
||||
{
|
||||
_logger.LogWarning($"Ошибка добавления: {ex.Message}");
|
||||
MessageBox.Show($"Ошибка добавления: {ex.Message}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogWarning($"Неизвестная ошибка: {ex.Message}");
|
||||
|
@ -52,7 +52,7 @@ namespace AccordionBus
|
||||
// Проверка на уникальность
|
||||
if (_places.Contains(bus))
|
||||
{
|
||||
return -1;
|
||||
throw new ArgumentException("Объект с такими характеристиками уже существует в наборе.");
|
||||
}
|
||||
//проверка позиции
|
||||
if (Count == _maxCount)
|
||||
|
Loading…
x
Reference in New Issue
Block a user