- Corretto calcolo dimensione split

- Corretto copia sash in interfaccia
This commit is contained in:
Annamaria Sassi
2025-09-30 15:22:43 +02:00
parent 86fe2e6404
commit c33525d5bc
9 changed files with 129 additions and 347 deletions
+35 -21
View File
@@ -505,7 +505,15 @@
for (int j = 0; j < 2 && (i * 2 + j <= item.SashList.Count - 1); j++)
{
SashDimension sash = item.SashList[i * 2 + j];
Area anta = item.AreaList[i * 2 + j];
Area anta;
@if (item.AreaList[i * 2 + j] is Splitted)
{
anta = item.AreaList[i * 2 + j];
}
else
{
anta = item;
}
<div class="col-sm-6">
<div class="border mb-2">
<div class="card-body py-2">
@@ -547,28 +555,34 @@
<label class="form-check-label fs-6 text-dark" for="HandleSashLabel@(i * 2 + j + 1)">Handle</label>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="input-group mb-2 justify-content-center">
<button class="btn btn-outline-secondary btn-sm" @onclick="() => anta.AddSplit(anta)">Aggiungi split</button>
</div>
</div>
<div class="col-sm-6">
<div class="input-group mb-2 justify-content-center">
<button class="btn btn-outline-secondary btn-sm">Aggiungi inglesina</button>
</div>
</div>
</div>
<div class="row d-grid d-md-flex justify-content-center">
@for (int k = 1; k <= i * 2 + j; k++)
{
int IndexCopy = k;
int IndexModify = i * 2 + j;
<div class="col-sm-6 my-1">
<div class="input-group justify-content-center">
<button class="btn btn-outline-secondary btn-sm" @onclick="() => CopyContentSash(item, IndexCopy, IndexModify)">Copy sash @(k)</button>
@if (!(anta.AreaList[0] is Split))
{
<div class="row">
<div class="col-sm-6">
<div class="input-group mb-2 justify-content-center">
<button class="btn btn-outline-secondary btn-sm" @onclick="() => anta.AddSplit(anta)">Aggiungi split</button>
</div>
</div>
<div class="col-sm-6">
<div class="input-group mb-2 justify-content-center">
<button class="btn btn-outline-secondary btn-sm">Aggiungi inglesina</button>
</div>
</div>
</div>
}
<div class="row d-grid d-md-flex justify-content-center">
@for (int k = 0; k <= item.SashList.Count - 1; k++)
{
@if (k != i * 2 + j)
{
int IndexCopy = k;
int IndexModify = i * 2 + j;
<div class="col-sm-6 my-1">
<div class="input-group justify-content-center">
<button class="btn btn-outline-secondary btn-sm" @onclick="() => CopyContentSash(item, IndexCopy, IndexModify)">Copy sash @(k + 1)</button>
</div>
</div>
}
}
</div>
</div>