Убраны лишние строчки.

This commit is contained in:
Павел Сорокин 2022-09-30 09:34:58 +04:00
parent b661207897
commit eb6e8d6cce

View File

@ -24,24 +24,8 @@ namespace Liner
toolStripStatusLabelSpeed.Text = $"Скорость: {ship.Ship.Speed}";
toolStripStatusLabelWeight.Text = $"Вес: {ship.Ship.Weight}";
toolStripStatusLabelBodyColor.Text = $"Цвет: {ship.Ship.BodyColor.Name}";
if (comboBoxSelectorMap.Text == "Простая карта")
{
pictureBoxShip.Image = _abstractMap.CreateMap(pictureBoxShip.Width, pictureBoxShip.Height, new DrawingObjectShip(ship));
new DrawingObjectShip(ship);
}
if (comboBoxSelectorMap.Text == "Море и айсберги")
{
pictureBoxShip.Image = _abstractMap.CreateMap(pictureBoxShip.Width, pictureBoxShip.Height, new DrawingObjectShip(ship));
new DrawingObjectShip(ship);
}
if (comboBoxSelectorMap.Text == "Болото")
{
pictureBoxShip.Image = _abstractMap.CreateMap(pictureBoxShip.Width, pictureBoxShip.Height, new DrawingObjectShip(ship));
new DrawingObjectShip(ship);
}
pictureBoxShip.Image = _abstractMap.CreateMap(pictureBoxShip.Width, pictureBoxShip.Height, new DrawingObjectShip(ship));
new DrawingObjectShip(ship);
}
@ -55,7 +39,6 @@ namespace Liner
}
private void ButtonMove_Click(object sender, EventArgs e)
{
//получаем имя кнопки
string name = ((Button)sender)?.Name ?? string.Empty;
Direction dir = Direction.None;
switch (name)
@ -73,19 +56,7 @@ namespace Liner
dir = Direction.Right;
break;
}
if (comboBoxSelectorMap.Text == "Простая карта")
{
pictureBoxShip.Image = _abstractMap?.MoveObject(dir);
}
if (comboBoxSelectorMap.Text == "Море и айсберги")
{
pictureBoxShip.Image = _abstractMap?.MoveObject(dir);
}
if (comboBoxSelectorMap.Text == "Болото")
{
pictureBoxShip.Image = _abstractMap?.MoveObject(dir);
}
pictureBoxShip.Image = _abstractMap?.MoveObject(dir);
}
private void ButtonCreateModif_Click(object sender, EventArgs e)