Изменена логика добавления обхекта в классе FormPlaneCollection
This commit is contained in:
parent
0b208db4dd
commit
5a616231fd
@ -94,6 +94,12 @@ namespace ProjectStormtrooper
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void buttonAddPlane_Click(object sender, EventArgs e)
|
||||
{
|
||||
var formPlaneConfig = new FormPlaneConfig();
|
||||
formPlaneConfig.AddEvent(new PlaneDelegate(AddPlaneListener));
|
||||
formPlaneConfig.Show();
|
||||
}
|
||||
public void AddPlaneListener(DrawingPlane plane)
|
||||
{
|
||||
if (listBoxStorages.SelectedIndex == -1)
|
||||
{
|
||||
@ -107,7 +113,7 @@ namespace ProjectStormtrooper
|
||||
FormStormtrooper form = new();
|
||||
if (form.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
if (obj + form.SelectedPlane > -1)
|
||||
if (obj + plane > -1)
|
||||
{
|
||||
MessageBox.Show("Объект добавлен");
|
||||
pictureBoxCollection.Image = obj.ShowPlanes();
|
||||
|
Loading…
x
Reference in New Issue
Block a user