81 lines
2.4 KiB
Plaintext
81 lines
2.4 KiB
Plaintext
@using WebDoorCreator.UI.Components.SvgComp
|
|
@page "/TestPage"
|
|
|
|
<h3>TestPage</h3>
|
|
|
|
|
|
<div class="row mx-2">
|
|
@for (int i = 0; i < 8; i++)
|
|
{
|
|
stepText = $"Block_{idxObj:00}";
|
|
<div class="col px-0">
|
|
<StepArrow ObjId="@idxObj" StepText="@stepText" BlockStyle="@blockStyle(idxObj)" ObjW="500" ObjH="100"></StepArrow>
|
|
</div>
|
|
idxObj++;
|
|
}
|
|
</div>
|
|
<div class="row my-2">
|
|
<div class="col-6">
|
|
<DoorSvgObj LineColor="#8E44AD" LineWidth="8" ObjH="200" ObjW="900" LeftTextClass="col-10 fs-1 fw-bold" RightTextClass="col-2" EC_ExeFunct="@(()=> exeFun())" ObjId="1" TextData="@msgList" Message1="messaggio 1" Message2="messaggio 2" ImagePath="@svgUrl(196)"></DoorSvgObj>
|
|
</div>
|
|
<div class="col-6">
|
|
<DoorSvgObj LineColor="#8E44AD" LineWidth="8" ObjH="200" ObjW="900" LeftTextClass="col-10 fs-1 fw-bold" RightTextClass="col-2" EC_ExeFunct="@(()=> exeFun())" ObjId="2" TextData="@msgList" Message1="messaggio 1" Message2="messaggio 2" ShowPlusMinus="true" ImagePath="@svgUrl(186)"></DoorSvgObj>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="row my-2">
|
|
@for (int i = 183; i < 205; i++)
|
|
{
|
|
<div class="col-1 text-center border rounded-2 m-2" style="height:100%; background: linear-gradient(#AFCFD1, #92B2C4);">
|
|
<b>@i</b><br/>
|
|
<img width="80" height="80" src="@svgUrl(i)" />
|
|
</div>
|
|
}
|
|
</div>
|
|
|
|
|
|
@code {
|
|
protected string svgUrl(int doorId)
|
|
{
|
|
return $"api/DoorImage/GetImage.svg?DoorId={doorId}";
|
|
}
|
|
|
|
protected int idxObj { get; set; } = 1;
|
|
protected string stepText { get; set; } = "---";
|
|
protected string blockStyle(int idx)
|
|
{
|
|
string answ = "";
|
|
int resto = idx % 3;
|
|
switch (resto)
|
|
{
|
|
case 1:
|
|
answ = "fill:rgb(0,255,0);";
|
|
break;
|
|
case 2:
|
|
answ = "fill:rgb(0,0,255);";
|
|
break;
|
|
case 0:
|
|
default:
|
|
answ = "fill:rgb(255,0,0)";
|
|
break;
|
|
}
|
|
return answ;
|
|
}
|
|
|
|
protected Dictionary<string, string> msgList = new Dictionary<string, string>();
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
msgList = new Dictionary<string, string>();
|
|
msgList.Add("T1", "Titolo");
|
|
msgList.Add("M1", "Messaggio 1");
|
|
msgList.Add("M2", "MEssaggio 2");
|
|
}
|
|
|
|
protected async Task exeFun()
|
|
{
|
|
await Task.Delay(1);
|
|
}
|
|
}
|