164 lines
6.9 KiB
Plaintext
164 lines
6.9 KiB
Plaintext
@page "/TestComponenti"
|
|
|
|
@inject NavigationManager NavMan
|
|
@implements IDisposable
|
|
|
|
<PageTitle>Test</PageTitle>
|
|
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h1>Test Componenti custom</h1>
|
|
</div>
|
|
<div class="card-body py-1">
|
|
<div class="row">
|
|
<div class="col-3">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
Test Image
|
|
</div>
|
|
<div class="card-body py-1">
|
|
<img src="_content/EgwCoreLib.Razor/images/LogoEgw.png" class="img-fluid" width="200" height="200" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-3">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
Input password
|
|
</div>
|
|
<div class="card-body py-1">
|
|
<ul class="list-group">
|
|
<li class="list-group-item">
|
|
Standard
|
|
<PasswordBox></PasswordBox>
|
|
</li>
|
|
<li class="list-group-item">
|
|
Cambio label
|
|
<PasswordBox ItemLabel="pwd"></PasswordBox>
|
|
</li>
|
|
<li class="list-group-item">
|
|
Show disabilitato
|
|
<PasswordBox DisableShow="true"></PasswordBox>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-3">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
Input Speciali
|
|
</div>
|
|
<div class="card-body py-1">
|
|
<small>Test copia clipboard, GUID (presudo)random</small>
|
|
<CopyToClipboard Text="@textToCopy"></CopyToClipboard>
|
|
<br />
|
|
<small>Test copia clipboard, valore hidden</small>
|
|
<CopyToClipboard Text="@textToCopy" ShowText="false"></CopyToClipboard>
|
|
<hr />
|
|
<small>Input numerico con gestione cifre (es x double)</small>
|
|
<NumInput CssClass="form-control" @bind-Value="@valDecimale"></NumInput>
|
|
<div>
|
|
<b>@valDecimale</b>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-3">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
QueryString
|
|
</div>
|
|
<div class="card-body py-1">
|
|
|
|
|
|
Test valori QueryString
|
|
<ul class="list-group">
|
|
<li class="list-group-item d-flex justify-content-between">
|
|
QString <b>Nome</b>:
|
|
<span class="badge bg-primary rounded-pill">
|
|
@if (!string.IsNullOrEmpty(qsNome))
|
|
{
|
|
@qsNome
|
|
}
|
|
else
|
|
{
|
|
<span>-</span>
|
|
}
|
|
</span>
|
|
</li>
|
|
<li class="list-group-item d-flex justify-content-between">
|
|
QString <b>Intero</b>:
|
|
<span class="badge bg-primary rounded-pill">
|
|
@if (qsIntero > 0)
|
|
{
|
|
@qsIntero
|
|
}
|
|
else
|
|
{
|
|
<span>-</span>
|
|
}
|
|
</span>
|
|
</li>
|
|
<li class="list-group-item">
|
|
<NavLink type="button" class="btn btn-primary bg-gradient text-light w-100" href="TestComponenti">
|
|
<i class="fa-solid fa-wrench" aria-hidden="true"></i>
|
|
<small>Reload Vuoto</small>
|
|
</NavLink>
|
|
</li>
|
|
<li class="list-group-item">
|
|
<NavLink type="button" class="btn btn-primary bg-gradient text-light w-100" href="@($"TestComponenti?Nome=Test_{DateTime.Now:mm}")">
|
|
<i class="fa-solid fa-wrench" aria-hidden="true"></i>
|
|
<small>Reload Nome</small>
|
|
</NavLink>
|
|
</li>
|
|
<li class="list-group-item">
|
|
<NavLink type="button" class="btn btn-primary bg-gradient text-light w-100" href="@($"TestComponenti?Intero={DateTime.Now:ss}")">
|
|
<i class="fa-solid fa-wrench" aria-hidden="true"></i>
|
|
<small>Reload Intero</small>
|
|
</NavLink>
|
|
</li>
|
|
<li class="list-group-item">
|
|
<NavLink type="button" class="btn btn-primary bg-gradient text-light w-100" href="@($"TestComponenti?Nome=Test_{DateTime.Now:mm}&Intero={DateTime.Now:ss}")">
|
|
<i class="fa-solid fa-wrench" aria-hidden="true"></i>
|
|
<small>Reload All</small>
|
|
</NavLink>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
@code {
|
|
|
|
protected string textToCopy = $"{Guid.NewGuid()}";
|
|
protected decimal valDecimale = 12345;
|
|
|
|
private string qsNome = "";
|
|
private int qsIntero = -1;
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
// base.OnInitialized();
|
|
qsNome = NavMan.ExtractQueryStringByKey<string>("Nome");
|
|
qsIntero = NavMan.ExtractQueryStringByKey<int>("Intero");
|
|
NavMan.LocationChanged += LocationChanged;
|
|
}
|
|
async void LocationChanged(object sender, LocationChangedEventArgs e)
|
|
{
|
|
qsNome = NavMan.ExtractQueryStringByKey<string>("Nome");
|
|
qsIntero = NavMan.ExtractQueryStringByKey<int>("Intero");
|
|
StateHasChanged();
|
|
}
|
|
|
|
void IDisposable.Dispose()
|
|
{
|
|
NavMan.LocationChanged -= LocationChanged;
|
|
}
|
|
}
|