You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.8 KiB
60 lines
1.8 KiB
@implements IDisposable |
|
|
|
<Virtualize Items="@EconomyService.GetOverTime()" Context="economyAtSecond" ItemSize="400" OverscanCount="4"> |
|
<div style="display: grid; gap: 8px; grid-template-columns: 1fr 1fr;"> |
|
<div> |
|
<div> |
|
@economyAtSecond.Interval |
|
</div> |
|
<div> |
|
T @Interval.ToTime(economyAtSecond.Interval) | A @economyAtSecond.Alloy | E @economyAtSecond.Ether |
|
</div> |
|
<div> |
|
Worker Count: @(economyAtSecond.WorkerCount) |
|
</div> |
|
<div> |
|
Free Worker Count: @(economyAtSecond.WorkerCount - economyAtSecond.BusyWorkerCount) |
|
</div> |
|
<div> |
|
Busy Worker Count: @economyAtSecond.BusyWorkerCount |
|
</div> |
|
<div> |
|
Creating Worker Count: @economyAtSecond.CreatingWorkerCount |
|
</div> |
|
<br/> |
|
</div> |
|
<div> |
|
@foreach (var order in BuildOrderService.GetOrdersAt(economyAtSecond.Interval)) { |
|
<div> |
|
Requested: @order.Info().Name |
|
</div> |
|
} |
|
@foreach (var order in BuildOrderService.GetCompletedAt(economyAtSecond.Interval)) { |
|
<div> |
|
New: @order.Info().Name |
|
</div> |
|
} |
|
</div> |
|
</div> |
|
</Virtualize> |
|
|
|
|
|
@code { |
|
|
|
[Inject] |
|
IEconomyService EconomyService { get; set; } |
|
|
|
[Inject] |
|
IBuildOrderService BuildOrderService { get; set; } |
|
|
|
protected override void OnInitialized() { |
|
EconomyService.Subscribe(StateHasChanged); |
|
BuildOrderService.Subscribe(StateHasChanged); |
|
} |
|
|
|
void IDisposable.Dispose() { |
|
EconomyService.Unsubscribe(StateHasChanged); |
|
BuildOrderService.Unsubscribe(StateHasChanged); |
|
} |
|
|
|
} |