Третья лабораторная работа
This commit is contained in:
parent
e60bac054a
commit
acb396e653
@ -30,7 +30,7 @@ namespace HoistingCrane
|
|||||||
break;
|
break;
|
||||||
case "Вторая карта":
|
case "Вторая карта":
|
||||||
map = new SecondMap();
|
map = new SecondMap();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (map != null)
|
if (map != null)
|
||||||
{
|
{
|
||||||
@ -54,18 +54,17 @@ namespace HoistingCrane
|
|||||||
formHoistingCraneConfig.Show();
|
formHoistingCraneConfig.Show();
|
||||||
}
|
}
|
||||||
private void AddHoistingCrane(DrawingHoistingCrane drawingHoistingCrane)
|
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();
|
MessageBox.Show("Объект добавлен");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MessageBox.Show("Не удалось добавить объект");
|
MessageBox.Show("Не удалось добавить объект");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ButtonRemoveHoistingCrane_Click(object sender, EventArgs e)
|
private void ButtonRemoveHoistingCrane_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(maskedTextBoxPosition.Text))
|
if (string.IsNullOrEmpty(maskedTextBoxPosition.Text))
|
||||||
|
@ -107,7 +107,6 @@ namespace HoistingCrane
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawHoistingCranes(Graphics gr)
|
|
||||||
{
|
{
|
||||||
int heightEl = _pictureHeight / _placeSizeHeight;
|
int heightEl = _pictureHeight / _placeSizeHeight;
|
||||||
int widthEl = _pictureWidth / _placeSizeWidth;
|
int widthEl = _pictureWidth / _placeSizeWidth;
|
||||||
|
Loading…
Reference in New Issue
Block a user