Vaksman V.D. Lab work 7 #10

Closed
just_valery__ wants to merge 3 commits from Lab7 into Lab6
Showing only changes of commit 6f7fc52f5d - Show all commits

View File

@ -167,11 +167,11 @@ namespace WarmlyShip
int pos = Convert.ToInt32(maskedTextBoxPosition.Text);
try
{
var deletedAirplane = _mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty] - pos;
if (deletedAirplane != null)
var deletedShip = _mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty] - pos;
if (deletedShip != null)
{
MessageBox.Show("Объект удален");
_logger.LogInformation("Из текущей карты удален объект {@Airplane}", deletedAirplane);
_logger.LogInformation("Из текущей карты удален объект {@ship}", deletedShip);
pictureBox.Image = _mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty].ShowSet();
}
else