Compare commits
2 Commits
63fc8c48c4
...
beb7bdf552
Author | SHA1 | Date | |
---|---|---|---|
beb7bdf552 | |||
72081a1e24 |
@ -11,8 +11,12 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="EntityFramework" Version="6.2.0" />
|
||||
<PackageReference Include="EntityFramework.ru" Version="6.2.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
|
||||
<PackageReference Include="Serilog" Version="3.1.1" />
|
||||
<PackageReference Include="Serilog.Extensions.Logging" Version="8.0.0" />
|
||||
<PackageReference Include="Serilog.Settings.Configuration" Version="8.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -86,8 +86,11 @@ public abstract class AbstractCompany
|
||||
SetObjectsPosition();
|
||||
for (int i = 0; i < (_collection?.Count ?? 0); ++i)
|
||||
{
|
||||
DrawningGun? obj = _collection?.Get(i);
|
||||
obj?.DrawTransport(graphics);
|
||||
try
|
||||
{
|
||||
DrawningGun? obj = _collection?.Get(i);
|
||||
obj?.DrawTransport(graphics);
|
||||
}catch(Exception ) { }
|
||||
}
|
||||
return bitmap;
|
||||
}
|
||||
|
@ -45,19 +45,22 @@ public class GunSharingService : AbstractCompany
|
||||
int boarderOffsetY = 10;
|
||||
|
||||
int currentIndex = -1;
|
||||
|
||||
for (int j = 0; j < maxCountY; j++)
|
||||
try
|
||||
{
|
||||
for (int i = 0; i < maxCountX; i++)
|
||||
for (int j = 0; j < maxCountY; j++)
|
||||
{
|
||||
currentIndex++;
|
||||
if (_collection.Get(currentIndex) != null)
|
||||
for (int i = 0; i < maxCountX; i++)
|
||||
{
|
||||
currentIndex++;
|
||||
if (_collection.Get(currentIndex) != null)
|
||||
{
|
||||
|
||||
_collection.Get(currentIndex).SetPictureSize(_pictureWidth, _pictureHeight);
|
||||
_collection.Get(currentIndex).SetPosition(boarderOffsetX + i * _placeSizeWidth + i * offsetX, boarderOffsetY + j * _placeSizeHeight);
|
||||
_collection.Get(currentIndex).SetPictureSize(_pictureWidth, _pictureHeight);
|
||||
_collection.Get(currentIndex).SetPosition(boarderOffsetX + i * _placeSizeWidth + i * offsetX, boarderOffsetY + j * _placeSizeHeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}catch (Exception ) { }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Serilog;
|
||||
|
||||
namespace AntiAircraftGun
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user