206 lines
8.3 KiB
Plaintext
206 lines
8.3 KiB
Plaintext
@page "/TestComponenti"
|
|
|
|
@inject NavigationManager NavMan
|
|
@implements IDisposable
|
|
|
|
<PageTitle>Test</PageTitle>
|
|
|
|
<div class="card shadow">
|
|
<div class="card-header">
|
|
<h1>Test Componenti custom</h1>
|
|
</div>
|
|
<div class="card-body py-4">
|
|
<div class="row">
|
|
<div class="col-3">
|
|
<div class="card shadow">
|
|
<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 shadow">
|
|
<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 shadow">
|
|
<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 shadow">
|
|
<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 class="col-3">
|
|
<div class="card ">
|
|
<div class="card-header"><h4>Test toggler</h4></div>
|
|
<div class="card-body">
|
|
<Toggler SelFilter="@TogFilter"></Toggler>
|
|
<br/>
|
|
<NumInput Value="@numero"></NumInput>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-3">
|
|
<span class="form-check form-switch">
|
|
<label class="form-check-label">Small Pager</label>
|
|
<input class="form-check-input" type="checkbox" @bind="@ShowSmallPager">
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-footer">
|
|
@if(ShowSmallPager)
|
|
{
|
|
<DataPager currPage="1" totalCount="@numero" NumPages="4" DisplSize="DataPager.ObjSize.small"></DataPager>
|
|
}
|
|
else
|
|
{
|
|
<DataPager currPage="1" totalCount="@numero"></DataPager>
|
|
}
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
@code {
|
|
|
|
Toggler.SelectGlobalToggle TogFilter { get; set; } = new Toggler.SelectGlobalToggle();
|
|
protected string textToCopy = $"{Guid.NewGuid()}";
|
|
protected decimal valDecimale = 12345;
|
|
|
|
private string qsNome = "";
|
|
private int qsIntero = -1;
|
|
private int numero = 0;
|
|
|
|
private bool ShowSmallPager { get; set; } = false;
|
|
|
|
protected Random rnd = new Random();
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
// base.OnInitialized();
|
|
qsNome = NavMan.ExtractQueryStringByKey<string>("Nome");
|
|
qsIntero = NavMan.ExtractQueryStringByKey<int>("Intero");
|
|
NavMan.LocationChanged += LocationChanged;
|
|
// toggler!
|
|
TogFilter = new()
|
|
{
|
|
isActive = true,
|
|
leftString = "opzione sx",
|
|
rightString = "opzione dx"
|
|
};
|
|
|
|
//test input
|
|
numero = rnd.Next(100, 300);
|
|
}
|
|
async void LocationChanged(object sender, LocationChangedEventArgs e)
|
|
{
|
|
qsNome = NavMan.ExtractQueryStringByKey<string>("Nome");
|
|
qsIntero = NavMan.ExtractQueryStringByKey<int>("Intero");
|
|
StateHasChanged();
|
|
}
|
|
|
|
void IDisposable.Dispose()
|
|
{
|
|
NavMan.LocationChanged -= LocationChanged;
|
|
}
|
|
}
|