Compare commits

..

No commits in common. "9fa0365307fead49b4d7cfda7de941daf021bd38" and "d31c6e46177e6e5a9bde9a26b37697d6e0e30de7" have entirely different histories.

View File

@ -56,7 +56,7 @@ namespace HoistingCrane.CollectionGenericObjects
public DrawningTrackedVehicle? GetRandomObject()
{
Random rnd = new();
return arr?.Get(rnd.Next(GetMaxCount));
return _collection?.Get(rnd.Next(GetMaxCount));
}
/// <summary>
@ -65,15 +65,15 @@ namespace HoistingCrane.CollectionGenericObjects
/// <returns></returns>
public Bitmap? Show()
{
Bitmap bitmap = new(pictureWidth, pictureHeight);
Bitmap bitmap = new(_pictureWidth, _pictureHeight);
Graphics graphics = Graphics.FromImage(bitmap);
DrawBackgound(graphics);
SetObjectsPosition();
for (int i = 0; i < (arr?.Count ?? 0); ++i)
for (int i = 0; i < (_collection?.Count ?? 0); ++i)
{
try
{
DrawningTrackedVehicle? obj = arr?.Get(i);
DrawningTrackedVehicle? obj = _collection?.Get(i);
obj?.DrawTransport(graphics);
}
catch (Exception) { }