mirror of
https://gitlab.com/Hukuta47/cartrix.git
synced 2026-12-05 20:40:55 +00:00
Подготовил проект к работе
This commit is contained in:
1 parent
213c590e95
commit
3d043f0016
50 files changed
+22
-7413
No files matched your search
@@ -1,79 +0,0 @@
|
||||
@page "/Printer/{PrinterId:int}"
|
||||
@inject NavigationManager NavManager
|
||||
@inject DialogService DialogService
|
||||
@using Newtonsoft.Json;
|
||||
|
||||
<RadzenCard Variant="Variant.Flat">
|
||||
<RadzenRow >
|
||||
<RadzenColumn>
|
||||
<RadzenCard Variant="Variant.Outlined" Style="height:auto;">
|
||||
<h4 style="margin:0 0 8px 0;">Состояние картриджа *CartridgeName*</h4>
|
||||
<RadzenRow >
|
||||
<RadzenLabel Text="Количество тоннера" Style="display:flex; align-items:center; height:100%;" />
|
||||
<div style="flex:1; display:flex; align-items:center;">
|
||||
<RadzenProgressBar ProgressBarStyle="ProgressBarStyle.Info"
|
||||
Style="--rz-progressbar-background-color:var(--rz-info-lighter); width:100%; display:block;"
|
||||
ShowValue="false" Max="100" Value="@PercentCartirge" />
|
||||
</div>
|
||||
<RadzenLabel Text="@($"{PercentCartirge}")" Style="display:flex; align-items:center;" />
|
||||
</RadzenRow>
|
||||
<RadzenRow JustifyContent="JustifyContent.SpaceBetween">
|
||||
<RadzenLabel Text="Количество распечатанных страниц"/>
|
||||
<RadzenLabel Text="@($"{PercentCartirge}")"/>
|
||||
</RadzenRow>
|
||||
<RadzenRow JustifyContent="JustifyContent.SpaceBetween">
|
||||
<RadzenLabel Text="Максимальное количество распечатанных страниц" />
|
||||
<RadzenLabel Text="@($"{PercentCartirge}")" />
|
||||
</RadzenRow>
|
||||
</RadzenCard>
|
||||
</RadzenColumn>
|
||||
</RadzenRow>
|
||||
</RadzenCard>
|
||||
<div class="rz-mt-3"/>
|
||||
<RadzenCard Variant="Variant.Flat">
|
||||
<RadzenRow>
|
||||
<RadzenButton>Обновить информацию</RadzenButton>
|
||||
<RadzenButton>Поменять расположение</RadzenButton>
|
||||
<RadzenButton Click="ShowInlineDialog">Web страница конфигурации</RadzenButton>
|
||||
</RadzenRow>
|
||||
</RadzenCard>
|
||||
<div class="rz-mt-3" />
|
||||
<RadzenCard Variant="Variant.Flat">
|
||||
<h1>*таблица с историей замены картриджей на принтере*</h1>
|
||||
</RadzenCard>
|
||||
|
||||
|
||||
@code {
|
||||
|
||||
HttpClient httpClient = new();
|
||||
|
||||
[Parameter] public int PrinterId { get; set; }
|
||||
// private PrinterDto? printer;
|
||||
|
||||
public int PercentCartirge = 20;
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
//var data = await httpClient.GetAsync($"http://localhost:5197/api/Printer/GetById/{PrinterId}");
|
||||
|
||||
// printer = JsonConvert.DeserializeObject<PrinterDto>(await data.Content.ReadAsStringAsync());
|
||||
}
|
||||
async Task ShowInlineDialog()
|
||||
{
|
||||
var options = new DialogOptions()
|
||||
{
|
||||
Width = "1400px",
|
||||
Height = "800px"
|
||||
};
|
||||
|
||||
var result = await DialogService.OpenAsync(
|
||||
"Веб интерфейс принтера",
|
||||
ds =>
|
||||
@<div style="margin: 0; padding: 0; width: 100%; height: 100%;">
|
||||
<iframe src=http://localhost:5197/scalar/" style="width: 100%; height: 100%; border: none;" />
|
||||
</div>,
|
||||
options
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user