2020-05-31 05:51:06 +01:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2020-05-24 22:10:20 +01:00
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Marechai.ViewModels;
|
|
|
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
|
|
|
|
|
|
namespace Marechai.Pages.Machines
|
|
|
|
|
{
|
|
|
|
|
public partial class View
|
|
|
|
|
{
|
2020-05-31 05:51:06 +01:00
|
|
|
bool[] _gpuVisible;
|
|
|
|
|
bool _loaded;
|
2020-05-24 22:10:20 +01:00
|
|
|
MachineViewModel _machine;
|
2020-05-31 05:51:06 +01:00
|
|
|
List<Guid> _photos;
|
2020-05-24 22:10:20 +01:00
|
|
|
bool[] _processorVisible;
|
|
|
|
|
bool[] _soundVisible;
|
|
|
|
|
[Parameter]
|
|
|
|
|
public int Id { get; set; }
|
|
|
|
|
|
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
|
|
|
{
|
|
|
|
|
_machine = await Service.GetMachine(Id);
|
|
|
|
|
|
|
|
|
|
_processorVisible = new bool[_machine.Processors.Count];
|
|
|
|
|
_gpuVisible = new bool[_machine.Gpus.Count];
|
|
|
|
|
_soundVisible = new bool[_machine.SoundSynthesizers.Count];
|
2020-05-31 05:51:06 +01:00
|
|
|
_photos = await MachinePhotosService.GetGuidsByMachineAsync(Id);
|
2020-05-24 22:10:20 +01:00
|
|
|
|
|
|
|
|
_loaded = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|