mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-21 18:37:18 +02:00
51 lines
1.3 KiB
C#
51 lines
1.3 KiB
C#
using MediatR;
|
|
using Microsoft.AspNetCore.Components;
|
|
using Microsoft.Extensions.Localization;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using WotBlitzStatisticsPro.Blazor.GraphQl;
|
|
using WotBlitzStatisticsPro.Blazor.Services;
|
|
|
|
namespace WotBlitzStatisticsPro.Blazor.Pages
|
|
{
|
|
public class PlayerInfoTanksTreeBase: ComponentBase
|
|
{
|
|
[Parameter]
|
|
public IEnumerable<ITank> TanksList { get; set; }
|
|
|
|
[Inject]
|
|
public IStringLocalizer<App> Localize { get; set; }
|
|
|
|
[Inject]
|
|
public IMediator Mediator { get; set; }
|
|
|
|
[Inject]
|
|
public IMediaQueriesService MediaQueriesService { get; set; }
|
|
|
|
public int FrameHeigth { get; set; }
|
|
|
|
public int CardWidth { get; } = 200;
|
|
public int CardHeigth { get; } = 120;
|
|
|
|
public string FrameStyle
|
|
{
|
|
get
|
|
{
|
|
return $"min-height: {FrameHeigth}px; overflow-y: auto; overflow-x: auto;";
|
|
}
|
|
}
|
|
|
|
protected async override Task OnInitializedAsync()
|
|
{
|
|
//var screenWidth = await MediaQueriesService.WindowWidth();
|
|
var screenHeight = await MediaQueriesService.WindowHeight();
|
|
|
|
//FrameWidth = Convert.ToInt32(((decimal)screenWidth) * 0.94m);
|
|
FrameHeigth = screenHeight - 390;
|
|
}
|
|
|
|
|
|
}
|
|
}
|