some minir fixes

This commit is contained in:
Zakharov_Rostislav 2023-11-09 15:23:09 +04:00
parent 8492a60df1
commit 25af5744ca

View File

@ -104,20 +104,19 @@ namespace ProjectBattleship
{
return;
}
var obj = _storage[listBoxStorages.SelectedItem.ToString() ??
var storage = _storage[listBoxStorages.SelectedItem.ToString() ??
string.Empty];
if (obj == null)
if (storage == null)
{
return;
}
FormShipConfig form = new(pictureBoxCollection.Width, pictureBoxCollection.Height);
form.Show();
ShipDelegate? shipDelegate = new((m) => {
bool q = (obj + m);
if (q)
ShipDelegate? shipDelegate = new((ship) => {
if (storage + ship)
{
MessageBox.Show("Объект добавлен");
pictureBoxCollection.Image = obj.ShowShips();
pictureBoxCollection.Image = storage.ShowShips();
}
else
{