Compare commits
2 Commits
d31c6e4617
...
9fa0365307
Author | SHA1 | Date | |
---|---|---|---|
|
9fa0365307 | ||
|
6a1f539b10 |
@ -56,7 +56,7 @@ namespace HoistingCrane.CollectionGenericObjects
|
||||
public DrawningTrackedVehicle? GetRandomObject()
|
||||
{
|
||||
Random rnd = new();
|
||||
return _collection?.Get(rnd.Next(GetMaxCount));
|
||||
return arr?.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 < (_collection?.Count ?? 0); ++i)
|
||||
for (int i = 0; i < (arr?.Count ?? 0); ++i)
|
||||
{
|
||||
try
|
||||
{
|
||||
DrawningTrackedVehicle? obj = _collection?.Get(i);
|
||||
DrawningTrackedVehicle? obj = arr?.Get(i);
|
||||
obj?.DrawTransport(graphics);
|
||||
}
|
||||
catch (Exception) { }
|
||||
|
Loading…
Reference in New Issue
Block a user