Compare commits
No commits in common. "9fa0365307fead49b4d7cfda7de941daf021bd38" and "d31c6e46177e6e5a9bde9a26b37697d6e0e30de7" have entirely different histories.
9fa0365307
...
d31c6e4617
@ -56,7 +56,7 @@ namespace HoistingCrane.CollectionGenericObjects
|
|||||||
public DrawningTrackedVehicle? GetRandomObject()
|
public DrawningTrackedVehicle? GetRandomObject()
|
||||||
{
|
{
|
||||||
Random rnd = new();
|
Random rnd = new();
|
||||||
return arr?.Get(rnd.Next(GetMaxCount));
|
return _collection?.Get(rnd.Next(GetMaxCount));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -65,15 +65,15 @@ namespace HoistingCrane.CollectionGenericObjects
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public Bitmap? Show()
|
public Bitmap? Show()
|
||||||
{
|
{
|
||||||
Bitmap bitmap = new(pictureWidth, pictureHeight);
|
Bitmap bitmap = new(_pictureWidth, _pictureHeight);
|
||||||
Graphics graphics = Graphics.FromImage(bitmap);
|
Graphics graphics = Graphics.FromImage(bitmap);
|
||||||
DrawBackgound(graphics);
|
DrawBackgound(graphics);
|
||||||
SetObjectsPosition();
|
SetObjectsPosition();
|
||||||
for (int i = 0; i < (arr?.Count ?? 0); ++i)
|
for (int i = 0; i < (_collection?.Count ?? 0); ++i)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
DrawningTrackedVehicle? obj = arr?.Get(i);
|
DrawningTrackedVehicle? obj = _collection?.Get(i);
|
||||||
obj?.DrawTransport(graphics);
|
obj?.DrawTransport(graphics);
|
||||||
}
|
}
|
||||||
catch (Exception) { }
|
catch (Exception) { }
|
||||||
|
Loading…
Reference in New Issue
Block a user