Лабораторная работа №3 (исправления)
This commit is contained in:
parent
8b33c79a8b
commit
cdbe8f783e
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user