Sorokin P.V. Lab work 2 #2
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user
Много пустых строк