Третья лабораторная работа

This commit is contained in:
10Г Егор Романов 2022-10-10 19:53:02 +03:00
parent e60bac054a
commit acb396e653
2 changed files with 9 additions and 11 deletions

View File

@ -30,7 +30,7 @@ namespace HoistingCrane
break;
case "Вторая карта":
map = new SecondMap();
break;
break;
}
if (map != null)
{
@ -54,18 +54,17 @@ namespace HoistingCrane
formHoistingCraneConfig.Show();
}
private void AddHoistingCrane(DrawingHoistingCrane drawingHoistingCrane)
{
DrawingObjectHoistingCrane hoistingCrane = new DrawingObjectHoistingCrane(drawingHoistingCrane);
if (_mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty] + hoistingCrane != -1)
{
MessageBox.Show("Объект добавлен");
pictureBox.Image = _mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty].ShowSet();
}
else
{
MessageBox.Show("Не удалось добавить объект");
{
MessageBox.Show("Объект добавлен");
}
else
{
MessageBox.Show("Не удалось добавить объект");
}
}
}
private void ButtonRemoveHoistingCrane_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(maskedTextBoxPosition.Text))

View File

@ -107,7 +107,6 @@ namespace HoistingCrane
}
}
private void DrawHoistingCranes(Graphics gr)
{
int heightEl = _pictureHeight / _placeSizeHeight;
int widthEl = _pictureWidth / _placeSizeWidth;