update tempo con sel tendina
This commit is contained in:
@@ -1,12 +1,6 @@
|
||||
|
||||
<div class="row align-items-center flex-wrap">
|
||||
@*<div class="col-12 text-end">
|
||||
<div class="form-check form-switch fs-3">
|
||||
<input class="form-check-input" type="checkbox" @bind="@ShowMS">
|
||||
<label class="form-check-label">@txtSelMS</label>
|
||||
</div>
|
||||
</div>*@
|
||||
<div class="col-8">
|
||||
<div class="row align-items-center flex-wrap my-3">
|
||||
<div class="col-12 col-md-8">
|
||||
@if (tcMode == "mc")
|
||||
{
|
||||
<div class="input-group">
|
||||
@@ -16,13 +10,31 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="input-group my-3">
|
||||
<div class="input-group">
|
||||
<span class="input-group-text">@labelTempoIN</span>
|
||||
<input type="time" class="form-control" @bind="@selTempoMS" step="1">
|
||||
<select @bind="@selOre" class="form-select">
|
||||
@for (int i = 0; i < 24; i++)
|
||||
{
|
||||
<option value="@i">@i.ToString("00")</option>
|
||||
}
|
||||
</select>
|
||||
<select @bind="@selMin" class="form-select">
|
||||
@for (int i = 0; i < 60; i++)
|
||||
{
|
||||
<option value="@i">@i.ToString("00")</option>
|
||||
}
|
||||
</select>
|
||||
<select @bind="@selSec" class="form-select">
|
||||
@for (int i = 0; i < 60; i++)
|
||||
{
|
||||
<option value="@i">@i.ToString("00")</option>
|
||||
}
|
||||
</select>
|
||||
@* <input type="time" class="form-control" @bind="@selTempoMS" step="1"> *@
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="col-12 col-md-4">
|
||||
→ @lblTempo
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -101,6 +101,34 @@ namespace MP_TAB3.Components
|
||||
}
|
||||
}
|
||||
|
||||
protected int selOre
|
||||
{
|
||||
get => TempoMS.Hours;
|
||||
set
|
||||
{
|
||||
TempoMS = new TimeSpan(value, selMin, selSec);
|
||||
E_TCRich.InvokeAsync(TempoMC);
|
||||
}
|
||||
}
|
||||
protected int selMin
|
||||
{
|
||||
get => TempoMS.Minutes;
|
||||
set
|
||||
{
|
||||
TempoMS = new TimeSpan(selOre,value, selSec);
|
||||
E_TCRich.InvokeAsync(TempoMC);
|
||||
}
|
||||
}
|
||||
protected int selSec
|
||||
{
|
||||
get => TempoMS.Seconds;
|
||||
set
|
||||
{
|
||||
TempoMS = new TimeSpan(selOre, selMin, value);
|
||||
E_TCRich.InvokeAsync(TempoMC);
|
||||
}
|
||||
}
|
||||
|
||||
protected bool ShowMS { get; set; } = true;
|
||||
|
||||
[Inject]
|
||||
@@ -205,7 +233,7 @@ namespace MP_TAB3.Components
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "ore:min:sec";
|
||||
answ = "h:m:s";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user