Изменил(а) на 'HoistingCrane/HoistingCrane/FormMapWithSetHoistingCrane.cs'
Signed-off-by: RomanovEgor <romanov17903@gmail.com>
This commit is contained in:
parent
b673e852b5
commit
1a47187541
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user