From 3ff0237fe715b7646a30603b846f74d24e0d2305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B8=D0=BC=D0=B0?= Date: Fri, 30 Aug 2024 03:54:36 +0400 Subject: [PATCH] x --- .../ProjertTrain/FormTrainsCollection.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ProjertTrain/ProjertTrain/FormTrainsCollection.cs b/ProjertTrain/ProjertTrain/FormTrainsCollection.cs index 0b2a271..b056115 100644 --- a/ProjertTrain/ProjertTrain/FormTrainsCollection.cs +++ b/ProjertTrain/ProjertTrain/FormTrainsCollection.cs @@ -46,15 +46,15 @@ namespace ProjectTrain /// /// Добавление самолета в коллекцию /// - /// - private void SetTrain(DrawningTrain? plane) + /// + private void SetTrain(DrawningTrain? train) { - if (_company == null || plane == null) + if (_company == null || train == null) { return; } - if (_company + plane != -1) + if (_company + train != -1) { MessageBox.Show("Объект добавлен"); pictureBoxTrain.Image = _company.Show(); @@ -100,24 +100,24 @@ namespace ProjectTrain return; } - DrawningTrain? plane = null; + DrawningTrain? train = null; int counter = 100; - while (plane == null) + while (train == null) { - plane = _company.GetRandomObject(); + train = _company.GetRandomObject(); counter--; if (counter <= 0) { break; } } - if (plane == null) + if (train == null) { return; } FormTrain form = new() { - SetTrain = plane + SetTrain = train }; form.ShowDialog();