- Corretto calcolo dimensione split
- Corretto copia sash in interfaccia
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -543,9 +543,9 @@ namespace WebWindowComplex
|
||||
{
|
||||
// Se il nodo ha figli, salvo il numero nell'oggetto
|
||||
if (node.AreaList.Count >= 1)
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "SH", maxRow, col, i, node.AreaList.Count));
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "WIN", maxRow, col, i, node.AreaList.Count));
|
||||
else
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "SH", maxRow, col, i, 0));
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "WIN", maxRow, col, i, 0));
|
||||
}
|
||||
}
|
||||
maxCol++;
|
||||
@@ -554,9 +554,9 @@ namespace WebWindowComplex
|
||||
{
|
||||
// Se il nodo ha figli, salvo il numero nell'oggetto
|
||||
if (node.AreaList.Count >= 1)
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "SH", row, col, 0, node.AreaList.Count));
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "WIN", row, col, 0, node.AreaList.Count));
|
||||
else
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "SH", row, col, 0, 0));
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "WIN", row, col, 0, 0));
|
||||
maxCol++;
|
||||
}
|
||||
row++;
|
||||
@@ -760,7 +760,7 @@ namespace WebWindowComplex
|
||||
// Rimuovo riempimento da anta selezionata
|
||||
sashSplitted.AreaList.RemoveAt(0);
|
||||
// Creo la copia dell'anta scelta
|
||||
Area a = sashItem.AreaList[IndexCopy - 1].AreaList[0].Copy(sashSplitted);
|
||||
Area a = sashItem.AreaList[IndexCopy].AreaList[0].Copy(sashSplitted);
|
||||
// Aggiungo copia all'anta selezionata
|
||||
sashItem.AreaList[IndexModify].AreaList.Add(a);
|
||||
await DoPreviewSvg();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>2.7.9.3011</Version>
|
||||
<Version>2.7.9.3015</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
|
||||
@@ -32,62 +32,4 @@
|
||||
<Exec Command="powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\post-build.ps1 -ProjectPath $(ProjectPath)" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Project>
|
||||
+11
-10
@@ -2710,8 +2710,13 @@ namespace WebWindowComplex
|
||||
for (var nInd = 0; nInd <= nIndex - 1; nInd++)
|
||||
dRes += RelativeDimList[nInd].dDimension;
|
||||
dRes = (100 - dRes) / (RelativeDimList.Count - nIndex - 1);
|
||||
for (var Ind = nIndex + 1; Ind <= RelativeDimList.Count - 1; Ind++)
|
||||
RelativeDimList[Ind].SetDimension(dRes);
|
||||
if (dRes != 0)
|
||||
{
|
||||
for (var Ind = nIndex + 1; Ind <= RelativeDimList.Count - 1; Ind++)
|
||||
RelativeDimList[Ind].SetDimension(dRes);
|
||||
}
|
||||
else
|
||||
return;
|
||||
}
|
||||
else if (RelativeDimList.Count > 1)
|
||||
{
|
||||
@@ -2721,14 +2726,10 @@ namespace WebWindowComplex
|
||||
dRes += RelativeDimList[Ind].dDimension;
|
||||
}
|
||||
dRes = (100 - dRes);
|
||||
RelativeDimList[nIndex - 1].SetDimension(dRes);
|
||||
//for (var nInd = 0; nInd <= nIndex - 1; nInd++)
|
||||
// RelativeDimList[nInd].SetDimension(dRes);
|
||||
//for (var Ind = nIndex + 1; Ind <= RelativeDimList.Count - 1; Ind++)
|
||||
// dRes += RelativeDimList[Ind].dDimension;
|
||||
//dRes = (100 - dRes) / (nIndex - 1);
|
||||
//for (var nInd = 0; nInd <= nIndex - 1; nInd++)
|
||||
// RelativeDimList[nInd].SetDimension(dRes);
|
||||
if (dRes != 0)
|
||||
RelativeDimList[nIndex - 1].SetDimension(dRes);
|
||||
else
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user