Исправление
This commit is contained in:
parent
82904c3f20
commit
3cee8a2eab
@ -118,6 +118,5 @@ namespace Artilleries
|
|||||||
EventAddArtillery?.Invoke(_artillery);
|
EventAddArtillery?.Invoke(_artillery);
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,12 @@ namespace Artilleries
|
|||||||
private void buttonAddArtillery_Click(object sender, EventArgs e)
|
private void buttonAddArtillery_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var formArtilleryConfig = new FormArtilleryConfig();
|
var formArtilleryConfig = new FormArtilleryConfig();
|
||||||
formArtilleryConfig.AddEvent((artillery) => {
|
formArtilleryConfig.AddEvent((artillery) => {
|
||||||
|
if (listBoxMaps.SelectedIndex == -1)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (_mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? String.Empty] + new DrawingObjectArtillery(artillery) != -1)
|
if (_mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? String.Empty] + new DrawingObjectArtillery(artillery) != -1)
|
||||||
{
|
{
|
||||||
MessageBox.Show("Объект добавлен");
|
MessageBox.Show("Объект добавлен");
|
||||||
|
Loading…
Reference in New Issue
Block a user