Лабораторная работа №3 (исправления)

This commit is contained in:
DjonniStorm 2024-03-20 01:26:33 +04:00
parent 8b33c79a8b
commit cdbe8f783e

View File

@ -164,27 +164,7 @@ public partial class FormCleaningCarCollection : Form
{
return;
}
DrawningTruck? truck = null;
int counter = 100;
while (truck == null)
{
truck = _company.GetRandomObject();
counter--;
if (counter <= 0)
{
break;
}
}
if (truck == null)
{
return;
}
FormCleaningCar form = new()
{
SetCar = truck
};
form.ShowDialog();
pictureBox.Image = _company.Show();
}
}