Изменил(а) на 'HoistingCrane/HoistingCrane/FormMapWithSetHoistingCrane.cs'
Signed-off-by: RomanovEgor <romanov17903@gmail.com>
This commit is contained in:
parent
b673e852b5
commit
1a47187541
@ -30,7 +30,10 @@ namespace HoistingCrane
|
|||||||
break;
|
break;
|
||||||
case "Вторая карта":
|
case "Вторая карта":
|
||||||
map = new SecondMap();
|
map = new SecondMap();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if (map != null)
|
if (map != null)
|
||||||
{
|
{
|
||||||
@ -47,24 +50,26 @@ namespace HoistingCrane
|
|||||||
{
|
{
|
||||||
if (_mapHoistingCraneCollectionGeneric == null)
|
if (_mapHoistingCraneCollectionGeneric == null)
|
||||||
{
|
{
|
||||||
return;
|
var formHoistingCraneConfig = new FormHoistingCraneConfig();
|
||||||
}
|
formHoistingCraneConfig.AddEvent(AddHoistingCrane);
|
||||||
FormHoistingCrane form = new();
|
formHoistingCraneConfig.Show();
|
||||||
if (form.ShowDialog() == DialogResult.OK)
|
}
|
||||||
|
private void AddHoistingCrane(DrawingHoistingCrane drawingHoistingCrane)
|
||||||
|
{
|
||||||
|
DrawingObjectHoistingCrane hoistingCrane = new DrawingObjectHoistingCrane(drawingHoistingCrane);
|
||||||
|
if (_mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty] + hoistingCrane != -1)
|
||||||
{
|
{
|
||||||
DrawingObjectHoistingCrane hoistingCrane = new(form.SelectedHoistingCrane);
|
MessageBox.Show("Объект добавлен");
|
||||||
if (_mapHoistingCraneCollectionGeneric + hoistingCrane == 1)
|
pictureBox.Image = _mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty].ShowSet();
|
||||||
{
|
}
|
||||||
MessageBox.Show("Объект добавлен");
|
else
|
||||||
pictureBox.Image = _mapHoistingCraneCollectionGeneric.ShowSet();
|
{
|
||||||
}
|
MessageBox.Show("Не удалось добавить объект");
|
||||||
else
|
|
||||||
{
|
|
||||||
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))
|
||||||
|
Loading…
Reference in New Issue
Block a user