Изменил(а) на 'HoistingCrane/HoistingCrane/FormMapWithSetHoistingCrane.cs'

Signed-off-by: RomanovEgor <romanov17903@gmail.com>
This commit is contained in:
RomanovEgor 2022-12-25 10:42:46 +04:00 committed by 10Г Егор Романов
parent b673e852b5
commit 1a47187541

View File

@ -31,6 +31,9 @@ namespace HoistingCrane
case "Вторая карта":
map = new SecondMap();
break;
}
if (map != null)
{
@ -47,16 +50,17 @@ namespace HoistingCrane
{
if (_mapHoistingCraneCollectionGeneric == null)
{
return;
var formHoistingCraneConfig = new FormHoistingCraneConfig();
formHoistingCraneConfig.AddEvent(AddHoistingCrane);
formHoistingCraneConfig.Show();
}
FormHoistingCrane form = new();
if (form.ShowDialog() == DialogResult.OK)
private void AddHoistingCrane(DrawingHoistingCrane drawingHoistingCrane)
{
DrawingObjectHoistingCrane hoistingCrane = new(form.SelectedHoistingCrane);
if (_mapHoistingCraneCollectionGeneric + hoistingCrane == 1)
DrawingObjectHoistingCrane hoistingCrane = new DrawingObjectHoistingCrane(drawingHoistingCrane);
if (_mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty] + hoistingCrane != -1)
{
MessageBox.Show("Объект добавлен");
pictureBox.Image = _mapHoistingCraneCollectionGeneric.ShowSet();
pictureBox.Image = _mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty].ShowSet();
}
else
{
@ -64,7 +68,8 @@ namespace HoistingCrane
}
}
}
}
}
private void ButtonRemoveHoistingCrane_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(maskedTextBoxPosition.Text))