Петрушин Егор ПИбд-22 Лабораторная работа №4 "Самоходная артиллерийская установка" #9
@ -89,8 +89,7 @@ namespace SelfPropelledArtilleryUnit
|
||||
}
|
||||
if (MessageBox.Show($"Удалить объект {listBoxStorages.SelectedItem}?", "Удаление", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
{
|
||||
_storage.DelSet(listBoxStorages.SelectedItem.ToString()
|
||||
?? string.Empty);
|
||||
_storage.DelSet(listBoxStorages.SelectedItem.ToString() ?? string.Empty);
|
||||
ReloadObjects();
|
||||
}
|
||||
}
|
||||
@ -139,8 +138,7 @@ namespace SelfPropelledArtilleryUnit
|
||||
{
|
||||
return;
|
||||
}
|
||||
var obj = _storage[listBoxStorages.SelectedItem.ToString() ??
|
||||
string.Empty];
|
||||
var obj = _storage[listBoxStorages.SelectedItem.ToString() ?? string.Empty];
|
||||
if (obj == null)
|
||||
{
|
||||
return;
|
||||
|
@ -136,7 +136,7 @@ namespace SelfPropelledArtilleryUnit.Generics
|
||||
for (int i = 0; i < _collection.Count; i++)
|
||||
{
|
||||
current = _collection[i];
|
||||
current?.SetPosition(stringCount * 200, 280 - j * 100);
|
||||
current?.SetPosition(stringCount * _placeSizeWidth, 280 - j * _placeSizeHeight);
|
||||
stringCount++;
|
||||
if (stringCount >= 3)
|
||||
{
|
||||
|
@ -103,12 +103,7 @@ namespace SelfPropelledArtilleryUnit.Generics
|
||||
{
|
||||
if (position < 0 || position >= _maxCount)
|
||||
return;
|
||||
if(_places[position] == null)
|
||||
{
|
||||
_places[position] = value;
|
||||
return;
|
||||
}
|
||||
_places.Insert(position, value);
|
||||
_places[position] = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user