WebWindowComplex e WebWindowTest: aggiunta pagina di navigazione per ogni split
This commit is contained in:
@@ -3,14 +3,14 @@
|
||||
@inject NavigationManager NavigationManager
|
||||
|
||||
<div class="top-row ps-3 navbar navbar-dark">
|
||||
<div class="container-fluid px-0">
|
||||
<div class="container-fluid px-0 text-center">
|
||||
@if (!showText)
|
||||
{
|
||||
<a class="navbar-brand p-0" @onclick="() => ToggleCompress()">Wind <i class="fas fa-caret-square-right"></i></a>
|
||||
<a class="navbar-brand text-center" @onclick="() => ToggleCompress()">Wind <i class="fas fa-caret-square-right"></i></a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<a class="navbar-brand" @onclick="() => ToggleCompress()">Window <i class="fas fa-caret-square-left"></i></a>
|
||||
<a class="navbar-brand text-center" @onclick="() => ToggleCompress()">Window <i class="fas fa-caret-square-left"></i></a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>2.7.10.214</Version>
|
||||
<Version>2.7.10.313</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione JWD per LUX</Description>
|
||||
@@ -58,6 +58,17 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -62,36 +62,19 @@ namespace WebWindowComplex
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Indica l'indice rispetto al vettore dei fill
|
||||
/// Se non è un fill vale -1
|
||||
/// Indica l'indice rispetto al vettore del tipo corrispondente
|
||||
/// Se non è uno split/sash/fill vale -1
|
||||
/// </summary>
|
||||
private int m_numFill;
|
||||
public int NumFill
|
||||
private int m_indexItem;
|
||||
public int IndexItem
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_numFill;
|
||||
return m_indexItem;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_numFill = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Indica l'indice rispetto al vettore delle sash
|
||||
/// Se non è una sash vale -1
|
||||
/// </summary>
|
||||
private int m_numSash;
|
||||
public int NumSash
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_numSash;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_numSash = value;
|
||||
m_indexItem = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,14 +95,13 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
public ItemTable(AreaTypes elementType, string s_description, int n_row, int n_col, int n_numFill, int n_numSash, int n_numChild)
|
||||
public ItemTable(AreaTypes elementType, string s_description, int n_row, int n_col, int n_numItem, int n_numChild)
|
||||
{
|
||||
Type = elementType;
|
||||
m_desc = s_description;
|
||||
Row = n_row;
|
||||
Col = n_col;
|
||||
NumFill = n_numFill;
|
||||
NumSash = n_numSash;
|
||||
IndexItem = n_numItem;
|
||||
NumChild = n_numChild;
|
||||
}
|
||||
}
|
||||
|
||||
+163
-159
@@ -7,7 +7,7 @@
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
@if (string.IsNullOrEmpty(CurrJwd))
|
||||
{
|
||||
<li class="nav-item">
|
||||
<li class="nav-item m-1">
|
||||
@if (currStep == CompileStep.Template)
|
||||
{
|
||||
<a data-target="#Template" class="nav-link active fw-bold" aria-current="true" @onclick="() => AdvStep(CompileStep.Template)">Template</a>
|
||||
@@ -20,17 +20,21 @@
|
||||
}
|
||||
@if (FrameWindow != null)
|
||||
{
|
||||
<li class="nav-item">
|
||||
<li class="nav-item m-1">
|
||||
<a data-target="#Gerarchia" class="@tabNavCss(CompileStep.Gerarchia)" aria-current="true" @onclick="() => NextStepAndPreview(CompileStep.Gerarchia)">Gerarchia</a>
|
||||
</li>
|
||||
@* <li class="nav-item">
|
||||
<a data-target="#Frame" class="@tabNavCss(CompileStep.Frame)" aria-current="true" @onclick="() => NextStepAndPreview(CompileStep.Frame)">Frame</a>
|
||||
</li>
|
||||
</li>
|
||||
@if (SplitList.Count > 0)
|
||||
{
|
||||
<li class="nav-item">
|
||||
<a data-target="#Split" class="@tabNavCss(CompileStep.Split)" aria-current="true" @onclick="() => NextStepAndPreview(CompileStep.Split)">Split</a>
|
||||
</li>
|
||||
@for (int i = 0; i < SplitList.Count; i++)
|
||||
{
|
||||
int Index = i;
|
||||
<li class="nav-item">
|
||||
<a data-target="#Split" class="@tabNavCss(CompileStep.Split, Index)" aria-current="true" @onclick="() => NextStepAndPreview(CompileStep.Split, Index)">Split @(SplitList.Count == 1 ? "" : Index + 1)</a>
|
||||
</li>
|
||||
}
|
||||
}
|
||||
@if (SashList.Count > 0)
|
||||
{
|
||||
@@ -53,7 +57,7 @@
|
||||
}
|
||||
}
|
||||
*@
|
||||
<li class="nav-item">
|
||||
<li class="nav-item m-1">
|
||||
<a data-target="#General" class="@tabNavCss(CompileStep.General)" aria-current="true" @onclick="() => NextStepAndPreview(CompileStep.General)">General</a>
|
||||
</li>
|
||||
}
|
||||
@@ -81,7 +85,7 @@
|
||||
{
|
||||
@if (currStep == CompileStep.Template)
|
||||
{
|
||||
<table class="table table-hover align-middle">
|
||||
<table class="table table-hover align-middle shadow-sm">
|
||||
<thead class="fs-5">
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
@@ -110,7 +114,7 @@
|
||||
@if (currStep == CompileStep.Gerarchia)
|
||||
{
|
||||
<div class="display-6">
|
||||
<table class="table table-sm table-hover align-middle">
|
||||
<table class="table table-sm table-hover align-middle shadow">
|
||||
<tbody>
|
||||
@for (int i = 0; i < ItemTableList.Count; i++)
|
||||
{
|
||||
@@ -118,7 +122,7 @@
|
||||
@for (int j = 0; j < m_maxCol; j++)
|
||||
{
|
||||
CompileStep cs = CompileStep.Frame;
|
||||
int indSash = -1;
|
||||
int ind = -1;
|
||||
@if (j + 1 == ItemTableList[i].Col)
|
||||
{
|
||||
@if (ItemTableList[i].Type is Json.WindowConst.AreaTypes.FRAME)
|
||||
@@ -128,19 +132,20 @@
|
||||
else if (ItemTableList[i].Type is Json.WindowConst.AreaTypes.SPLIT)
|
||||
{
|
||||
cs = CompileStep.Split;
|
||||
ind = ItemTableList[i].IndexItem;
|
||||
}
|
||||
else if (ItemTableList[i].Type is Json.WindowConst.AreaTypes.SASH)
|
||||
{
|
||||
cs = CompileStep.Sash;
|
||||
indSash = ItemTableList[i].NumSash;
|
||||
ind = ItemTableList[i].IndexItem;
|
||||
}
|
||||
else if (ItemTableList[i].Type is Json.WindowConst.AreaTypes.FILL)
|
||||
{
|
||||
cs = CompileStep.Fill;
|
||||
indSash = ItemTableList[i].NumFill;
|
||||
ind = ItemTableList[i].IndexItem;
|
||||
}
|
||||
<td>
|
||||
<button class="btn btn-sm btn-secondary" style="font-size: 1rem;" @onclick="() => NextStepAndPreview(cs, indSash)" title="Vai a step @(cs)">@ItemTableList[i].Desc</button>
|
||||
<button class="btn btn-sm btn-secondary" style="font-size: 1rem;" @onclick="() => NextStepAndPreview(cs, ind)" title="Vai a step @(cs)">@ItemTableList[i].Desc</button>
|
||||
</td>
|
||||
}
|
||||
else
|
||||
@@ -166,15 +171,11 @@
|
||||
<div class="text-start p-1 display-4">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="border mb-2 shadow-sm rounded">
|
||||
<div class="border mb-3 shadow-sm rounded">
|
||||
<div class="card-body py-2">
|
||||
<div class="row">
|
||||
<div class="col-sm-6 my-2">
|
||||
<h3 class="card-title">Frame</h3>
|
||||
</div>
|
||||
<div class="row my-2">
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
</div>
|
||||
<h3 class="card-title">Frame</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -273,18 +274,24 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
@if (!(FrameWindow.AreaList[0] is Split) || (SashList.Count == 0 && SplitList.Count == 0))
|
||||
{
|
||||
<div class="col-sm-6">
|
||||
@if (!(FrameWindow.AreaList[0] is Split) || (SashList.Count == 0 && SplitList.Count == 0))
|
||||
{
|
||||
<div class="border mb-2 shadow-sm rounded">
|
||||
<div class="card-body py-2">
|
||||
<h5 class="card-title">Area frame</h5>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="row my-2">
|
||||
<div class="col-4">
|
||||
<h3 class="card-title">Area frame</h3>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
@if (SashList.Count == 0 && SplitList.Count == 0)
|
||||
{
|
||||
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => FrameWindow.AddSash()">Aggiungi window</button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
@if (!(FrameWindow.AreaList[0] is Split))
|
||||
{
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
@@ -292,67 +299,63 @@
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@if (SashList.Count == 0 && SplitList.Count == 0)
|
||||
{
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => FrameWindow.AddSash()">Aggiungi window</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else if (currStep == CompileStep.Split)
|
||||
{
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="text-start p-1 display-4">
|
||||
<div class="row">
|
||||
@for (int i = 0; i < SplitList.Count; i++)
|
||||
{
|
||||
Split currSplit = SplitList[i];
|
||||
<div class="@splitCss(currSplit)">
|
||||
@if (currSplit >= SplitList.Count || currSplit == -1)
|
||||
{
|
||||
currStep = CompileStep.Gerarchia;
|
||||
}
|
||||
else
|
||||
{
|
||||
Split item = SplitList[currSplit];
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="text-start p-1 display-4">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="border mb-2 shadow-sm rounded">
|
||||
<div class="card-body py-2">
|
||||
<h5>@(descParentSplit(currSplit))</h5>
|
||||
<div class="row my-2">
|
||||
<div class="col-sm-4">
|
||||
<h5 class="card-title">@(descParentSplit(item))</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="border mb-2">
|
||||
<div class="border mb-2 shadow-sm rounded">
|
||||
<div class="card-body py-2">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<h5>Split</h5>
|
||||
<div class="col-sm-4">
|
||||
<h5 class="card-title">Split</h5>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="col-sm-4">
|
||||
@if ((item.nSplitQtyVert == 1 && item.nSplitQtyHoriz == 0) || (item.nSplitQtyVert == 0 && item.nSplitQtyHoriz == 1))
|
||||
{
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => SwapTwoAree(item)">Swap Aree</button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => RemoveArea(currSplit)">Remove split</button>
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => RemoveArea(item)">Remove split</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6"></div>
|
||||
<div class="col-sm-6">
|
||||
@if ((currSplit.nSplitQtyVert == 1 && currSplit.nSplitQtyHoriz == 0) || (currSplit.nSplitQtyVert == 0 && currSplit.nSplitQtyHoriz == 1))
|
||||
{
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => SwapTwoAree(currSplit)">Swap Aree</button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="@splitContentCss(currSplit)">
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="ShapeSplit@(m_SplitList.IndexOf(currSplit) + 1)">Shape</label>
|
||||
<select class="form-select" id="ShapeSplit@(m_SplitList.IndexOf(currSplit) + 1)" @bind="@currSplit.SelSplitShapeIndex">
|
||||
<label class="input-group-text" for="ShapeSplit@(SplitList.IndexOf(item) + 1)">Shape</label>
|
||||
<select class="form-select" id="ShapeSplit@(SplitList.IndexOf(item) + 1)" @bind="@item.SelSplitShapeIndex">
|
||||
<option value="0">Vertical</option>
|
||||
<option value="1">Horizontal</option>
|
||||
<option value="2">Grid</option>
|
||||
@@ -362,46 +365,46 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@if (currSplit.nSplitQtyVert > 0)
|
||||
@if (item.nSplitQtyVert > 0)
|
||||
{
|
||||
<div class="@splitContentCss(currSplit)">
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="SplitQty@(m_SplitList.IndexOf(currSplit) + 1)">QtyVert</span>
|
||||
<input type="number" class="form-control" placeholder="0" aria-label="basic-addon1Split" @bind="@currSplit.nSplitQtyVert">
|
||||
<span class="input-group-text" id="SplitQty@(SplitList.IndexOf(item) + 1)">QtyVert</span>
|
||||
<input type="number" class="form-control" placeholder="0" aria-label="basic-addon1Split" @bind="@item.nSplitQtyVert">
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@if (currSplit.nSplitQtyHoriz > 0)
|
||||
@if (item.nSplitQtyHoriz > 0)
|
||||
{
|
||||
<div class="@splitContentCss(currSplit)">
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="SplitQty@(m_SplitList.IndexOf(currSplit) + 1)">QtyHoriz</span>
|
||||
<input type="number" class="form-control" placeholder="0" aria-label="basic-addon1Split" @bind="@currSplit.nSplitQtyHoriz">
|
||||
<span class="input-group-text" id="SplitQty@(SplitList.IndexOf(item) + 1)">QtyHoriz</span>
|
||||
<input type="number" class="form-control" placeholder="0" aria-label="basic-addon1Split" @bind="@item.nSplitQtyHoriz">
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="row">
|
||||
@if (currSplit.SplitVertList.Count > 0)
|
||||
@if (item.SplitVertList.Count > 0)
|
||||
{
|
||||
<div class="@splitContentCss(currSplit)">
|
||||
@foreach (var dim in currSplit.SplitVertList)
|
||||
<div class="col-sm-6">
|
||||
@foreach (var dim in item.SplitVertList)
|
||||
{
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="SplitDimension@(currSplit.SplitVertList.IndexOf(dim) + 1)">Width</span>
|
||||
<span class="input-group-text" id="SplitDimension@(item.SplitVertList.IndexOf(dim) + 1)">Width</span>
|
||||
<input type="number" class="form-control" aria-label="basic-addon2Split" @bind="@dim.dDimension">
|
||||
<span class="input-group-text">%</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
@if (currSplit.SplitHorizList.Count > 0)
|
||||
@if (item.SplitHorizList.Count > 0)
|
||||
{
|
||||
<div class="@splitContentCss(currSplit)">
|
||||
@foreach (var dim in currSplit.SplitHorizList)
|
||||
<div class="col-sm-6">
|
||||
@foreach (var dim in item.SplitHorizList)
|
||||
{
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="SplitDimension@(currSplit.SplitHorizList.IndexOf(dim) + 1)">Height</span>
|
||||
<span class="input-group-text" id="SplitDimension@(item.SplitHorizList.IndexOf(dim) + 1)">Height</span>
|
||||
<input type="number" class="form-control" aria-label="basic-addon2Split" @bind="@dim.dDimension">
|
||||
<span class="input-group-text">%</span>
|
||||
</div>
|
||||
@@ -410,16 +413,16 @@
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@if (currSplit.SelSplitShape == Json.WindowConst.SplitShapes.GRID)
|
||||
@if (item.SelSplitShape == Json.WindowConst.SplitShapes.GRID)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="@splitContentCss(currSplit)">
|
||||
<div class="col-sm-6">
|
||||
<div class="d-flex justify-content-start fs-5 mb-2">
|
||||
<div class="px-1">
|
||||
<input class="form-check-input ml-auto" type="checkbox" name="SplitStartVert" id="SplitStartVert@(m_SplitList.IndexOf(currSplit) + 1)" checked="@currSplit.bSplitStartVert" @oninput="(ChangeEventArgs e) => changeStartVert(e, currSplit)">
|
||||
<input class="form-check-input ml-auto" type="checkbox" name="SplitStartVert" id="SplitStartVert@(SplitList.IndexOf(item) + 1)" checked="@item.bSplitStartVert" @oninput="(ChangeEventArgs e) => changeStartVert(e, item)">
|
||||
</div>
|
||||
<div class="px-2">
|
||||
<label class="form-check-label fs-6 text-dark" for="SplitStartVert@(m_SplitList.IndexOf(currSplit) + 1)">StartVert</label>
|
||||
<label class="form-check-label fs-6 text-dark" for="SplitStartVert@(SplitList.IndexOf(item) + 1)">StartVert</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -431,41 +434,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="row">
|
||||
@for (int i = 0; i < SplittedList.Count; i++)
|
||||
{
|
||||
Splitted currSplitted = SplittedList[i];
|
||||
<div class="col-sm-6">
|
||||
<div class="border mb-2 shadow-sm">
|
||||
<div class="card-body py-2">
|
||||
<h5>Area split @(i + 1)</h5>
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<div class="input-group mb-2">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => currSplitted.AddSash()">Add sash</button>
|
||||
</div>
|
||||
</div>
|
||||
@for (int j = 0; j < SashList.Count; j++)
|
||||
{
|
||||
int Index = j;
|
||||
<div class="col-4">
|
||||
<div class="input-group mb-2">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => CopySash(currSplitted, Index)">Copy sash @(SashList.Count == 1 ? "" : (j + 1))</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
else if (currStep == CompileStep.Sash)
|
||||
{
|
||||
@@ -707,51 +680,82 @@
|
||||
{
|
||||
Fill item = FillList[currFill];
|
||||
<div class="container">
|
||||
<div class="text-start p-1 display-4 ">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="border mb-2 shadow-sm rounded">
|
||||
<div class="card-body py-2">
|
||||
<div class="row my-2">
|
||||
<div class="col-sm-4 justify-content-center">
|
||||
<h3 class="card-title text-center">Fill @(currFill + 1)</h3>
|
||||
</div>
|
||||
@* <div class="col-sm-4 justify-content-start">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<select class="form-select" id="Fill@(currFill + 1)" @bind="@item.SelFillTypeIndex">
|
||||
<option value="0">Glass</option>
|
||||
<option value="1">Wood</option>
|
||||
</select>
|
||||
<div class="row">
|
||||
<div class="text-start p-1 display-4 ">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="border mb-3 shadow-sm rounded">
|
||||
<div class="card-body py-2">
|
||||
<div class="row my-2">
|
||||
<div class="col-sm-4 justify-content-center">
|
||||
<h3 class="card-title text-center">Fill @(currFill + 1)</h3>
|
||||
</div>
|
||||
</div> *@
|
||||
<div class="col-sm-4 justify-content-center">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="@buttonFillCss(WebWindowComplex.Json.WindowConst.FillTypes.GLASS)" @onclick="() => ChangeOneFill(WebWindowComplex.Json.WindowConst.FillTypes.GLASS)">Glass</button>
|
||||
<div class="col-sm-4 justify-content-center">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="@buttonFillCss(WebWindowComplex.Json.WindowConst.FillTypes.GLASS)" @onclick="() => ChangeOneFill(WebWindowComplex.Json.WindowConst.FillTypes.GLASS)">Glass</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4 justify-content-center">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="@buttonFillCss(WebWindowComplex.Json.WindowConst.FillTypes.WOOD)" @onclick="() => ChangeOneFill(WebWindowComplex.Json.WindowConst.FillTypes.WOOD)">Wood</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4 justify-content-center">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="@buttonFillCss(WebWindowComplex.Json.WindowConst.FillTypes.WOOD)" @onclick="() => ChangeOneFill(WebWindowComplex.Json.WindowConst.FillTypes.WOOD)">Wood</button>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<h5 class="text-center">Selected all fill</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<h5 class="text-center">Selected all fill</h5>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => ChangeAllFill(WebWindowComplex.Json.WindowConst.FillTypes.GLASS)">All glass</button>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => ChangeAllFill(WebWindowComplex.Json.WindowConst.FillTypes.GLASS)">All glass</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => ChangeAllFill(WebWindowComplex.Json.WindowConst.FillTypes.WOOD)">All wood</button>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => ChangeAllFill(WebWindowComplex.Json.WindowConst.FillTypes.WOOD)">All wood</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@for (int i = 0; i < SplittedList.Count; i++)
|
||||
{
|
||||
Splitted currSplitted = SplittedList[i];
|
||||
@if (currSplitted.AreaList[0].Equals(item))
|
||||
{
|
||||
<div class="border mb-2 shadow-sm rounded">
|
||||
<div class="card-body py-2">
|
||||
<div class="row my-2">
|
||||
<div class="col-sm-4 justify-content-center">
|
||||
@if (SplittedList.Count > 1)
|
||||
{
|
||||
<h3 class="card-title text-center">Area split @(i + 1)</h3>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h3 class="card-title text-center">Area split</h3>
|
||||
}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => currSplitted.AddSash()">Add sash</button>
|
||||
</div>
|
||||
</div>
|
||||
@for (int j = 0; j < SashList.Count; j++)
|
||||
{
|
||||
int Index = j;
|
||||
<div class="col-4">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => CopySash(currSplitted, Index)">Copy sash @(SashList.Count == 1 ? "" : (j + 1))</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -860,9 +864,9 @@
|
||||
@if (currStep != CompileStep.Template)
|
||||
{
|
||||
<div class="col-6">
|
||||
<div class="card text-center table-svg shadow rounded">
|
||||
@outSvg
|
||||
</div>
|
||||
@* <div class="card text-center table-svg shadow rounded"> *@
|
||||
@outSvg
|
||||
@* </div> *@
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,6 @@ using Newtonsoft.Json.Linq;
|
||||
using System.Reflection.Metadata;
|
||||
using System.Reflection.Metadata.Ecma335;
|
||||
using System.Runtime.InteropServices;
|
||||
using WebWindowComplex;
|
||||
using WebWindowComplex.DTO;
|
||||
using WebWindowComplex.Json;
|
||||
using static WebWindowComplex.Json.WindowConst;
|
||||
@@ -346,6 +345,7 @@ namespace WebWindowComplex
|
||||
UpdateLists();
|
||||
currSash = -1;
|
||||
currFill = -1;
|
||||
currSplit = -1;
|
||||
currStep = CompileStep.Gerarchia;
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
@@ -526,9 +526,9 @@ namespace WebWindowComplex
|
||||
case AreaTypes.FRAME:
|
||||
{
|
||||
if (node.AreaList.Count >= 1)
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.FRAME, "FR", row, col, -1, -1, node.AreaList.Count));
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.FRAME, "FR", row, col, -1, node.AreaList.Count));
|
||||
else
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.FRAME, "FR", row, col, -1, -1, 0));
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.FRAME, "FR", row, col, -1, 0));
|
||||
row++;
|
||||
col++;
|
||||
maxRow++;
|
||||
@@ -549,9 +549,9 @@ namespace WebWindowComplex
|
||||
nWIndow = SashList.Count == 1 ? "" : $"{i + 1}";
|
||||
// Se il nodo ha figli, salvo il numero nell'oggetto
|
||||
if (node.AreaList.Count >= 1)
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "WIN" + nWIndow, maxRow, col, -1, i, node.AreaList.Count));
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "WIN" + nWIndow, maxRow, col, i, node.AreaList.Count));
|
||||
else
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "WIN" + nWIndow, maxRow, col, -1, i, 0));
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "WIN" + nWIndow, maxRow, col, i, 0));
|
||||
}
|
||||
}
|
||||
maxCol++;
|
||||
@@ -560,9 +560,9 @@ namespace WebWindowComplex
|
||||
{
|
||||
// Se il nodo ha figli, salvo il numero nell'oggetto
|
||||
if (node.AreaList.Count >= 1)
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "WIN", row, col, -1, 0, node.AreaList.Count));
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "WIN", row, col, 0, node.AreaList.Count));
|
||||
else
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "WIN", row, col, -1, 0, 0));
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "WIN", row, col, 0, 0));
|
||||
maxCol++;
|
||||
}
|
||||
row++;
|
||||
@@ -575,13 +575,13 @@ namespace WebWindowComplex
|
||||
if ((node.ParentArea.AreaList.Count > 1 && node.ParentArea.AreaList[0].Equals(node)) ||
|
||||
(node.ParentArea.ParentArea != null && node.ParentArea.ParentArea.AreaList.Count > 1 && node.ParentArea.ParentArea.AreaList[0].AreaList[0].Equals(node)))
|
||||
maxCol++;
|
||||
int nFill;
|
||||
string nFill;
|
||||
for (int i = 0; i < FillList.Count; i++)
|
||||
{
|
||||
if (FillList[i].Equals(node))
|
||||
{
|
||||
nFill = i + 1;
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.FILL, "FL" + nFill, maxRow, col, i, -1, 0));
|
||||
nFill = FillList.Count == 1 ? "" : $"{i + 1}";
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.FILL, "FL" + nFill, maxRow, col, i, 0));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -592,22 +592,37 @@ namespace WebWindowComplex
|
||||
}
|
||||
case AreaTypes.SPLIT:
|
||||
{
|
||||
// Se il nodo ha fratelli o cugini
|
||||
if (node.ParentArea.AreaList.Count > 1 || (node.ParentArea.ParentArea != null && node.ParentArea.ParentArea.AreaList.Count > 1))
|
||||
{
|
||||
if (node.ParentArea.AreaList[0].Equals(node) || node.ParentArea.ParentArea.AreaList[0].Equals(node))
|
||||
maxCol++;
|
||||
if (node.AreaList.Count >= 1 || node.AreaList.Count >= 1)
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SPLIT, "SP", maxRow, col, -1, -1, node.AreaList.Count));
|
||||
else
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SPLIT, "SP", maxRow, col, -1, -1, 0));
|
||||
for (int i = 0; i < SplitList.Count; i++)
|
||||
{
|
||||
if (SplitList[i].Equals(node))
|
||||
{
|
||||
string nSplit = SplitList.Count == 1 ? "" : $"{i + 1}";
|
||||
if (node.AreaList.Count >= 1)
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SPLIT, "SP" + nSplit, maxRow, col, i, node.AreaList.Count));
|
||||
else
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SPLIT, "SP" + nSplit, maxRow, col, i, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (node.AreaList.Count >= 1 || node.AreaList.Count >= 1)
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SPLIT, "SP", row, col, -1, -1, node.AreaList.Count));
|
||||
else
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SPLIT, "SP", row, col, -1, -1, 0));
|
||||
maxCol++;
|
||||
for (int i = 0; i < SplitList.Count; i++)
|
||||
{
|
||||
if (SplitList[i].Equals(node))
|
||||
{
|
||||
string nSplit = SplitList.Count == 1 ? "" : $"{i + 1}";
|
||||
if (node.AreaList.Count >= 1)
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SPLIT, "SP" + nSplit, row, col, i, node.AreaList.Count));
|
||||
else
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SPLIT, "SP" + nSplit, row, col, i, 0));
|
||||
maxCol++;
|
||||
}
|
||||
}
|
||||
}
|
||||
row++;
|
||||
col++;
|
||||
@@ -819,6 +834,7 @@ namespace WebWindowComplex
|
||||
private CompileStep currStep;
|
||||
private int currAnta = 0;
|
||||
private int currSash = -1;
|
||||
private int currSplit = -1;
|
||||
private int currFill = -1;
|
||||
private Frame? m_Frame;
|
||||
private List<Sash> m_SashList = new List<Sash>();
|
||||
@@ -876,14 +892,30 @@ namespace WebWindowComplex
|
||||
private async void NextStepAndPreview(CompileStep newStep, int Index = -1)
|
||||
{
|
||||
currStep = newStep;
|
||||
if (newStep == CompileStep.Sash)
|
||||
currSash = Index;
|
||||
else
|
||||
currSash = -1;
|
||||
if (newStep == CompileStep.Fill)
|
||||
currFill = Index;
|
||||
else
|
||||
currFill = -1;
|
||||
switch (newStep)
|
||||
{
|
||||
case CompileStep.Sash:
|
||||
{
|
||||
currSash = Index;
|
||||
currFill = -1;
|
||||
currSplit = -1;
|
||||
break;
|
||||
}
|
||||
case CompileStep.Fill:
|
||||
{
|
||||
currFill = Index;
|
||||
currSash = -1;
|
||||
currSplit = -1;
|
||||
break;
|
||||
}
|
||||
case CompileStep.Split:
|
||||
{
|
||||
currSplit = Index;
|
||||
currSash = -1;
|
||||
currFill = -1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
@@ -896,6 +928,7 @@ namespace WebWindowComplex
|
||||
currStep = newStep;
|
||||
currSash = -1;
|
||||
currFill = -1;
|
||||
currSplit = -1;
|
||||
}
|
||||
|
||||
private void M_CurrWindow_OnPreview(object? sender, OnPreviewEventArgs e)
|
||||
@@ -927,6 +960,13 @@ namespace WebWindowComplex
|
||||
else
|
||||
return "nav-link text-secondary";
|
||||
}
|
||||
else if (testStep == CompileStep.Split)
|
||||
{
|
||||
if ((currSplit == 0 && Index == 0) || (currSplit == 1 && Index == 1))
|
||||
return "nav-link active fw-bold";
|
||||
else
|
||||
return "nav-link text-secondary";
|
||||
}
|
||||
return (testStep == currStep) ? "nav-link active fw-bold" : "nav-link text-secondary";
|
||||
}
|
||||
|
||||
@@ -939,31 +979,13 @@ namespace WebWindowComplex
|
||||
return (currStep == CompileStep.Template) ? "col-12" : "col-6";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calcola larghezza border descrizione split
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private string splitCss(Split currSplit)
|
||||
{
|
||||
return (currSplit.SelSplitShape == SplitShapes.GRID) ? "col-sm-12" : "col-sm-6";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calcola larghezza border descrizione split
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private string splitContentCss(Split currSplit)
|
||||
{
|
||||
return (currSplit.SelSplitShape == SplitShapes.GRID) ? "col-sm-6" : "col-sm-12";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calcola larghezza colonna header nav
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private string headerCss()
|
||||
{
|
||||
return (currStep == CompileStep.Template) ? "col-8 d-grid gap-2 d-md-flex justify-content-md-start" : "col-8 d-grid gap-2 d-md-flex justify-content-md-start";
|
||||
return (currStep == CompileStep.Template) ? "col-8 d-grid px-2 d-md-flex justify-content-md-start" : "col-8 d-grid px-2 d-md-flex justify-content-md-start";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -972,7 +994,7 @@ namespace WebWindowComplex
|
||||
/// <returns></returns>
|
||||
private string buttonCss()
|
||||
{
|
||||
return (currStep == CompileStep.Template) ? "col-4 d-grid gap-1 d-md-flex justify-content-md-end" : "col-4 d-grid gap-1 d-md-flex justify-content-md-end";
|
||||
return (currStep == CompileStep.Template) ? "col-4 d-grid gap-1 d-md-flex justify-content-md-end align-items-center" : "col-4 d-grid gap-1 d-md-flex justify-content-md-end align-items-center";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -982,7 +1004,7 @@ namespace WebWindowComplex
|
||||
private string buttonFillCss(FillTypes currFillTypes)
|
||||
{
|
||||
if (FillList.ElementAt(currFill).SelFillType == currFillTypes)
|
||||
return "btn btn-secondary btn-sm shadow";
|
||||
return "btn btn-secondary btn-sm";
|
||||
else
|
||||
return "btn btn-outline-secondary btn-sm";
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>2.7.10.214</Version>
|
||||
<Version>2.7.10.313</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
|
||||
@@ -34,3 +34,12 @@
|
||||
|
||||
</Project>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>2.7.10.214</Version>
|
||||
<Version>2.7.10.313</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione JWD per LUX</Description>
|
||||
@@ -40,3 +40,5 @@
|
||||
</Target>
|
||||
</Project>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -62,36 +62,19 @@ namespace WebWindowTest
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Indica l'indice rispetto al vettore dei fill
|
||||
/// Se non è un fill vale -1
|
||||
/// Indica l'indice rispetto al vettore del tipo corrispondente
|
||||
/// Se non è uno split/sash/fill vale -1
|
||||
/// </summary>
|
||||
private int m_numFill;
|
||||
public int NumFill
|
||||
private int m_indexItem;
|
||||
public int IndexItem
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_numFill;
|
||||
return m_indexItem;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_numFill = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Indica l'indice rispetto al vettore delle sash
|
||||
/// Se non è una sash vale -1
|
||||
/// </summary>
|
||||
private int m_numSash;
|
||||
public int NumSash
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_numSash;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_numSash = value;
|
||||
m_indexItem = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,14 +95,13 @@ namespace WebWindowTest
|
||||
}
|
||||
}
|
||||
|
||||
public ItemTable(AreaTypes elementType, string s_description,int n_row, int n_col,int n_numFill, int n_numSash, int n_numChild)
|
||||
public ItemTable(AreaTypes elementType, string s_description,int n_row, int n_col, int n_numItem, int n_numChild)
|
||||
{
|
||||
Type = elementType;
|
||||
m_desc = s_description;
|
||||
Row = n_row;
|
||||
Col = n_col;
|
||||
NumFill = n_numFill;
|
||||
NumSash = n_numSash;
|
||||
IndexItem = n_numItem;
|
||||
NumChild = n_numChild;
|
||||
}
|
||||
}
|
||||
|
||||
+162
-158
@@ -7,7 +7,7 @@
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
@if (string.IsNullOrEmpty(CurrJwd))
|
||||
{
|
||||
<li class="nav-item">
|
||||
<li class="nav-item m-1">
|
||||
@if (currStep == CompileStep.Template)
|
||||
{
|
||||
<a data-target="#Template" class="nav-link active fw-bold" aria-current="true" @onclick="() => AdvStep(CompileStep.Template)">Template</a>
|
||||
@@ -20,17 +20,21 @@
|
||||
}
|
||||
@if (FrameWindow != null)
|
||||
{
|
||||
<li class="nav-item">
|
||||
<li class="nav-item m-1">
|
||||
<a data-target="#Gerarchia" class="@tabNavCss(CompileStep.Gerarchia)" aria-current="true" @onclick="() => NextStepAndPreview(CompileStep.Gerarchia)">Gerarchia</a>
|
||||
</li>
|
||||
@* <li class="nav-item">
|
||||
<a data-target="#Frame" class="@tabNavCss(CompileStep.Frame)" aria-current="true" @onclick="() => NextStepAndPreview(CompileStep.Frame)">Frame</a>
|
||||
</li>
|
||||
</li>
|
||||
@if (SplitList.Count > 0)
|
||||
{
|
||||
<li class="nav-item">
|
||||
<a data-target="#Split" class="@tabNavCss(CompileStep.Split)" aria-current="true" @onclick="() => NextStepAndPreview(CompileStep.Split)">Split</a>
|
||||
</li>
|
||||
@for (int i = 0; i < SplitList.Count; i++)
|
||||
{
|
||||
int Index = i;
|
||||
<li class="nav-item">
|
||||
<a data-target="#Split" class="@tabNavCss(CompileStep.Split, Index)" aria-current="true" @onclick="() => NextStepAndPreview(CompileStep.Split, Index)">Split @(SplitList.Count == 1 ? "" : Index + 1)</a>
|
||||
</li>
|
||||
}
|
||||
}
|
||||
@if (SashList.Count > 0)
|
||||
{
|
||||
@@ -53,7 +57,7 @@
|
||||
}
|
||||
}
|
||||
*@
|
||||
<li class="nav-item">
|
||||
<li class="nav-item m-1">
|
||||
<a data-target="#General" class="@tabNavCss(CompileStep.General)" aria-current="true" @onclick="() => NextStepAndPreview(CompileStep.General)">General</a>
|
||||
</li>
|
||||
}
|
||||
@@ -81,7 +85,7 @@
|
||||
{
|
||||
@if (currStep == CompileStep.Template)
|
||||
{
|
||||
<table class="table table-hover align-middle">
|
||||
<table class="table table-hover align-middle shadow-sm">
|
||||
<thead class="fs-5">
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
@@ -110,7 +114,7 @@
|
||||
@if (currStep == CompileStep.Gerarchia)
|
||||
{
|
||||
<div class="display-6">
|
||||
<table class="table table-sm table-hover align-middle">
|
||||
<table class="table table-sm table-hover align-middle shadow">
|
||||
<tbody>
|
||||
@for (int i = 0; i < ItemTableList.Count; i++)
|
||||
{
|
||||
@@ -118,7 +122,7 @@
|
||||
@for (int j = 0; j < m_maxCol; j++)
|
||||
{
|
||||
CompileStep cs = CompileStep.Frame;
|
||||
int indSash = -1;
|
||||
int ind = -1;
|
||||
@if (j + 1 == ItemTableList[i].Col)
|
||||
{
|
||||
@if (ItemTableList[i].Type is Json.WindowConst.AreaTypes.FRAME)
|
||||
@@ -128,19 +132,20 @@
|
||||
else if (ItemTableList[i].Type is Json.WindowConst.AreaTypes.SPLIT)
|
||||
{
|
||||
cs = CompileStep.Split;
|
||||
ind = ItemTableList[i].IndexItem;
|
||||
}
|
||||
else if (ItemTableList[i].Type is Json.WindowConst.AreaTypes.SASH)
|
||||
{
|
||||
cs = CompileStep.Sash;
|
||||
indSash = ItemTableList[i].NumSash;
|
||||
ind = ItemTableList[i].IndexItem;
|
||||
}
|
||||
else if (ItemTableList[i].Type is Json.WindowConst.AreaTypes.FILL)
|
||||
{
|
||||
cs = CompileStep.Fill;
|
||||
indSash = ItemTableList[i].NumFill;
|
||||
ind = ItemTableList[i].IndexItem;
|
||||
}
|
||||
<td>
|
||||
<button class="btn btn-sm btn-secondary" style="font-size: 1rem;" @onclick="() => NextStepAndPreview(cs, indSash)" title="Vai a step @(cs)">@ItemTableList[i].Desc</button>
|
||||
<button class="btn btn-sm btn-secondary" style="font-size: 1rem;" @onclick="() => NextStepAndPreview(cs, ind)" title="Vai a step @(cs)">@ItemTableList[i].Desc</button>
|
||||
</td>
|
||||
}
|
||||
else
|
||||
@@ -166,15 +171,11 @@
|
||||
<div class="text-start p-1 display-4">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="border mb-2 shadow-sm rounded">
|
||||
<div class="border mb-3 shadow-sm rounded">
|
||||
<div class="card-body py-2">
|
||||
<div class="row">
|
||||
<div class="col-sm-6 my-2">
|
||||
<h3 class="card-title">Frame</h3>
|
||||
</div>
|
||||
<div class="row my-2">
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
</div>
|
||||
<h3 class="card-title">Frame</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -273,18 +274,24 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
@if (!(FrameWindow.AreaList[0] is Split) || (SashList.Count == 0 && SplitList.Count == 0))
|
||||
{
|
||||
<div class="col-sm-6">
|
||||
@if (!(FrameWindow.AreaList[0] is Split) || (SashList.Count == 0 && SplitList.Count == 0))
|
||||
{
|
||||
<div class="border mb-2 shadow-sm rounded">
|
||||
<div class="card-body py-2">
|
||||
<h5 class="card-title">Area frame</h5>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="row my-2">
|
||||
<div class="col-4">
|
||||
<h3 class="card-title">Area frame</h3>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
@if (SashList.Count == 0 && SplitList.Count == 0)
|
||||
{
|
||||
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => FrameWindow.AddSash()">Aggiungi window</button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
@if (!(FrameWindow.AreaList[0] is Split))
|
||||
{
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
@@ -292,67 +299,63 @@
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@if (SashList.Count == 0 && SplitList.Count == 0)
|
||||
{
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => FrameWindow.AddSash()">Aggiungi window</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else if (currStep == CompileStep.Split)
|
||||
{
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="text-start p-1 display-4">
|
||||
<div class="row">
|
||||
@for (int i = 0; i < SplitList.Count; i++)
|
||||
{
|
||||
Split currSplit = SplitList[i];
|
||||
<div class="@splitCss(currSplit)">
|
||||
@if (currSplit >= SplitList.Count || currSplit == -1)
|
||||
{
|
||||
currStep = CompileStep.Gerarchia;
|
||||
}
|
||||
else
|
||||
{
|
||||
Split item = SplitList[currSplit];
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="text-start p-1 display-4">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="border mb-2 shadow-sm rounded">
|
||||
<div class="card-body py-2">
|
||||
<h5>@(descParentSplit(currSplit))</h5>
|
||||
<div class="row my-2">
|
||||
<div class="col-sm-4">
|
||||
<h5 class="card-title">@(descParentSplit(item))</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="border mb-2">
|
||||
<div class="border mb-2 shadow-sm rounded">
|
||||
<div class="card-body py-2">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<h5>Split</h5>
|
||||
<div class="col-sm-4">
|
||||
<h5 class="card-title">Split</h5>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="col-sm-4">
|
||||
@if ((item.nSplitQtyVert == 1 && item.nSplitQtyHoriz == 0) || (item.nSplitQtyVert == 0 && item.nSplitQtyHoriz == 1))
|
||||
{
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => SwapTwoAree(item)">Swap Aree</button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => RemoveArea(currSplit)">Remove split</button>
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => RemoveArea(item)">Remove split</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6"></div>
|
||||
<div class="col-sm-6">
|
||||
@if ((currSplit.nSplitQtyVert == 1 && currSplit.nSplitQtyHoriz == 0) || (currSplit.nSplitQtyVert == 0 && currSplit.nSplitQtyHoriz == 1))
|
||||
{
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => SwapTwoAree(currSplit)">Swap Aree</button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="@splitContentCss(currSplit)">
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="ShapeSplit@(m_SplitList.IndexOf(currSplit) + 1)">Shape</label>
|
||||
<select class="form-select" id="ShapeSplit@(m_SplitList.IndexOf(currSplit) + 1)" @bind="@currSplit.SelSplitShapeIndex">
|
||||
<label class="input-group-text" for="ShapeSplit@(SplitList.IndexOf(item) + 1)">Shape</label>
|
||||
<select class="form-select" id="ShapeSplit@(SplitList.IndexOf(item) + 1)" @bind="@item.SelSplitShapeIndex">
|
||||
<option value="0">Vertical</option>
|
||||
<option value="1">Horizontal</option>
|
||||
<option value="2">Grid</option>
|
||||
@@ -362,46 +365,46 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@if (currSplit.nSplitQtyVert > 0)
|
||||
@if (item.nSplitQtyVert > 0)
|
||||
{
|
||||
<div class="@splitContentCss(currSplit)">
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="SplitQty@(m_SplitList.IndexOf(currSplit) + 1)">QtyVert</span>
|
||||
<input type="number" class="form-control" placeholder="0" aria-label="basic-addon1Split" @bind="@currSplit.nSplitQtyVert">
|
||||
<span class="input-group-text" id="SplitQty@(SplitList.IndexOf(item) + 1)">QtyVert</span>
|
||||
<input type="number" class="form-control" placeholder="0" aria-label="basic-addon1Split" @bind="@item.nSplitQtyVert">
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@if (currSplit.nSplitQtyHoriz > 0)
|
||||
@if (item.nSplitQtyHoriz > 0)
|
||||
{
|
||||
<div class="@splitContentCss(currSplit)">
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="SplitQty@(m_SplitList.IndexOf(currSplit) + 1)">QtyHoriz</span>
|
||||
<input type="number" class="form-control" placeholder="0" aria-label="basic-addon1Split" @bind="@currSplit.nSplitQtyHoriz">
|
||||
<span class="input-group-text" id="SplitQty@(SplitList.IndexOf(item) + 1)">QtyHoriz</span>
|
||||
<input type="number" class="form-control" placeholder="0" aria-label="basic-addon1Split" @bind="@item.nSplitQtyHoriz">
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="row">
|
||||
@if (currSplit.SplitVertList.Count > 0)
|
||||
@if (item.SplitVertList.Count > 0)
|
||||
{
|
||||
<div class="@splitContentCss(currSplit)">
|
||||
@foreach (var dim in currSplit.SplitVertList)
|
||||
<div class="col-sm-6">
|
||||
@foreach (var dim in item.SplitVertList)
|
||||
{
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="SplitDimension@(currSplit.SplitVertList.IndexOf(dim) + 1)">Width</span>
|
||||
<span class="input-group-text" id="SplitDimension@(item.SplitVertList.IndexOf(dim) + 1)">Width</span>
|
||||
<input type="number" class="form-control" aria-label="basic-addon2Split" @bind="@dim.dDimension">
|
||||
<span class="input-group-text">%</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
@if (currSplit.SplitHorizList.Count > 0)
|
||||
@if (item.SplitHorizList.Count > 0)
|
||||
{
|
||||
<div class="@splitContentCss(currSplit)">
|
||||
@foreach (var dim in currSplit.SplitHorizList)
|
||||
<div class="col-sm-6">
|
||||
@foreach (var dim in item.SplitHorizList)
|
||||
{
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="SplitDimension@(currSplit.SplitHorizList.IndexOf(dim) + 1)">Height</span>
|
||||
<span class="input-group-text" id="SplitDimension@(item.SplitHorizList.IndexOf(dim) + 1)">Height</span>
|
||||
<input type="number" class="form-control" aria-label="basic-addon2Split" @bind="@dim.dDimension">
|
||||
<span class="input-group-text">%</span>
|
||||
</div>
|
||||
@@ -410,16 +413,16 @@
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@if (currSplit.SelSplitShape == Json.WindowConst.SplitShapes.GRID)
|
||||
@if (item.SelSplitShape == Json.WindowConst.SplitShapes.GRID)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="@splitContentCss(currSplit)">
|
||||
<div class="col-sm-6">
|
||||
<div class="d-flex justify-content-start fs-5 mb-2">
|
||||
<div class="px-1">
|
||||
<input class="form-check-input ml-auto" type="checkbox" name="SplitStartVert" id="SplitStartVert@(m_SplitList.IndexOf(currSplit) + 1)" checked="@currSplit.bSplitStartVert" @oninput="(ChangeEventArgs e) => changeStartVert(e, currSplit)">
|
||||
<input class="form-check-input ml-auto" type="checkbox" name="SplitStartVert" id="SplitStartVert@(SplitList.IndexOf(item) + 1)" checked="@item.bSplitStartVert" @oninput="(ChangeEventArgs e) => changeStartVert(e, item)">
|
||||
</div>
|
||||
<div class="px-2">
|
||||
<label class="form-check-label fs-6 text-dark" for="SplitStartVert@(m_SplitList.IndexOf(currSplit) + 1)">StartVert</label>
|
||||
<label class="form-check-label fs-6 text-dark" for="SplitStartVert@(SplitList.IndexOf(item) + 1)">StartVert</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -431,41 +434,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="row">
|
||||
@for (int i = 0; i < SplittedList.Count; i++)
|
||||
{
|
||||
Splitted currSplitted = SplittedList[i];
|
||||
<div class="col-sm-6">
|
||||
<div class="border mb-2 shadow-sm">
|
||||
<div class="card-body py-2">
|
||||
<h5>Area split @(i + 1)</h5>
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<div class="input-group mb-2">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => currSplitted.AddSash()">Add sash</button>
|
||||
</div>
|
||||
</div>
|
||||
@for (int j = 0; j < SashList.Count; j++)
|
||||
{
|
||||
int Index = j;
|
||||
<div class="col-4">
|
||||
<div class="input-group mb-2">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => CopySash(currSplitted, Index)">Copy sash @(SashList.Count == 1 ? "" : (j + 1))</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
else if (currStep == CompileStep.Sash)
|
||||
{
|
||||
@@ -707,51 +680,82 @@
|
||||
{
|
||||
Fill item = FillList[currFill];
|
||||
<div class="container">
|
||||
<div class="text-start p-1 display-4 ">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="border mb-2 shadow-sm rounded">
|
||||
<div class="card-body py-2">
|
||||
<div class="row my-2">
|
||||
<div class="col-sm-4 justify-content-center">
|
||||
<h3 class="card-title text-center">Fill @(currFill + 1)</h3>
|
||||
</div>
|
||||
@* <div class="col-sm-4 justify-content-start">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<select class="form-select" id="Fill@(currFill + 1)" @bind="@item.SelFillTypeIndex">
|
||||
<option value="0">Glass</option>
|
||||
<option value="1">Wood</option>
|
||||
</select>
|
||||
<div class="row">
|
||||
<div class="text-start p-1 display-4 ">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="border mb-3 shadow-sm rounded">
|
||||
<div class="card-body py-2">
|
||||
<div class="row my-2">
|
||||
<div class="col-sm-4 justify-content-center">
|
||||
<h3 class="card-title text-center">Fill @(currFill + 1)</h3>
|
||||
</div>
|
||||
</div> *@
|
||||
<div class="col-sm-4 justify-content-center">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="@buttonFillCss(WebWindowTest.Json.WindowConst.FillTypes.GLASS)" @onclick="() => ChangeOneFill(WebWindowTest.Json.WindowConst.FillTypes.GLASS)">Glass</button>
|
||||
<div class="col-sm-4 justify-content-center">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="@buttonFillCss(WebWindowTest.Json.WindowConst.FillTypes.GLASS)" @onclick="() => ChangeOneFill(WebWindowTest.Json.WindowConst.FillTypes.GLASS)">Glass</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4 justify-content-center">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="@buttonFillCss(WebWindowTest.Json.WindowConst.FillTypes.WOOD)" @onclick="() => ChangeOneFill(WebWindowTest.Json.WindowConst.FillTypes.WOOD)">Wood</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4 justify-content-center">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="@buttonFillCss(WebWindowTest.Json.WindowConst.FillTypes.WOOD)" @onclick="() => ChangeOneFill(WebWindowTest.Json.WindowConst.FillTypes.WOOD)">Wood</button>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<h5 class="text-center">Selected all fill</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<h5 class="text-center">Selected all fill</h5>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => ChangeAllFill(WebWindowTest.Json.WindowConst.FillTypes.GLASS)">All glass</button>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => ChangeAllFill(WebWindowTest.Json.WindowConst.FillTypes.GLASS)">All glass</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => ChangeAllFill(WebWindowTest.Json.WindowConst.FillTypes.WOOD)">All wood</button>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => ChangeAllFill(WebWindowTest.Json.WindowConst.FillTypes.WOOD)">All wood</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@for (int i = 0; i < SplittedList.Count; i++)
|
||||
{
|
||||
Splitted currSplitted = SplittedList[i];
|
||||
@if (currSplitted.AreaList[0].Equals(item))
|
||||
{
|
||||
<div class="border mb-2 shadow-sm rounded">
|
||||
<div class="card-body py-2">
|
||||
<div class="row my-2">
|
||||
<div class="col-sm-4 justify-content-center">
|
||||
@if (SplittedList.Count > 1)
|
||||
{
|
||||
<h3 class="card-title text-center">Area split @(i + 1)</h3>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h3 class="card-title text-center">Area split</h3>
|
||||
}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => currSplitted.AddSash()">Add sash</button>
|
||||
</div>
|
||||
</div>
|
||||
@for (int j = 0; j < SashList.Count; j++)
|
||||
{
|
||||
int Index = j;
|
||||
<div class="col-4">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => CopySash(currSplitted, Index)">Copy sash @(SashList.Count == 1 ? "" : (j + 1))</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -860,9 +864,9 @@
|
||||
@if (currStep != CompileStep.Template)
|
||||
{
|
||||
<div class="col-6">
|
||||
<div class="card text-center table-svg shadow rounded">
|
||||
@* <div class="card text-center table-svg shadow rounded"> *@
|
||||
@outSvg
|
||||
</div>
|
||||
@* </div> *@
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
+70
-47
@@ -345,6 +345,7 @@ namespace WebWindowTest
|
||||
UpdateLists();
|
||||
currSash = -1;
|
||||
currFill = -1;
|
||||
currSplit = -1;
|
||||
currStep = CompileStep.Gerarchia;
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
@@ -525,9 +526,9 @@ namespace WebWindowTest
|
||||
case AreaTypes.FRAME:
|
||||
{
|
||||
if (node.AreaList.Count >= 1)
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.FRAME, "FR", row, col, -1, -1, node.AreaList.Count));
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.FRAME, "FR", row, col, -1, node.AreaList.Count));
|
||||
else
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.FRAME, "FR", row, col, -1, -1, 0));
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.FRAME, "FR", row, col, -1, 0));
|
||||
row++;
|
||||
col++;
|
||||
maxRow++;
|
||||
@@ -548,9 +549,9 @@ namespace WebWindowTest
|
||||
nWIndow = SashList.Count == 1 ? "" : $"{i + 1}";
|
||||
// Se il nodo ha figli, salvo il numero nell'oggetto
|
||||
if (node.AreaList.Count >= 1)
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "WIN" + nWIndow, maxRow, col, -1, i, node.AreaList.Count));
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "WIN" + nWIndow, maxRow, col, i, node.AreaList.Count));
|
||||
else
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "WIN" + nWIndow, maxRow, col, -1, i, 0));
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "WIN" + nWIndow, maxRow, col, i, 0));
|
||||
}
|
||||
}
|
||||
maxCol++;
|
||||
@@ -559,9 +560,9 @@ namespace WebWindowTest
|
||||
{
|
||||
// Se il nodo ha figli, salvo il numero nell'oggetto
|
||||
if (node.AreaList.Count >= 1)
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "WIN", row, col, -1, 0, node.AreaList.Count));
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "WIN", row, col, 0, node.AreaList.Count));
|
||||
else
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "WIN", row, col, -1, 0, 0));
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "WIN", row, col, 0, 0));
|
||||
maxCol++;
|
||||
}
|
||||
row++;
|
||||
@@ -574,13 +575,13 @@ namespace WebWindowTest
|
||||
if ((node.ParentArea.AreaList.Count > 1 && node.ParentArea.AreaList[0].Equals(node)) ||
|
||||
(node.ParentArea.ParentArea != null && node.ParentArea.ParentArea.AreaList.Count > 1 && node.ParentArea.ParentArea.AreaList[0].AreaList[0].Equals(node)))
|
||||
maxCol++;
|
||||
int nFill;
|
||||
string nFill;
|
||||
for (int i = 0; i < FillList.Count; i++)
|
||||
{
|
||||
if (FillList[i].Equals(node))
|
||||
{
|
||||
nFill = i + 1;
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.FILL, "FL" + nFill, maxRow, col, i, -1, 0));
|
||||
nFill = FillList.Count == 1 ? "" : $"{i + 1}";
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.FILL, "FL" + nFill, maxRow, col, i, 0));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -591,22 +592,37 @@ namespace WebWindowTest
|
||||
}
|
||||
case AreaTypes.SPLIT:
|
||||
{
|
||||
// Se il nodo ha fratelli o cugini
|
||||
if (node.ParentArea.AreaList.Count > 1 || (node.ParentArea.ParentArea != null && node.ParentArea.ParentArea.AreaList.Count > 1))
|
||||
{
|
||||
if (node.ParentArea.AreaList[0].Equals(node) || node.ParentArea.ParentArea.AreaList[0].Equals(node))
|
||||
maxCol++;
|
||||
if (node.AreaList.Count >= 1 || node.AreaList.Count >= 1)
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SPLIT, "SP", maxRow, col, -1, -1, node.AreaList.Count));
|
||||
else
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SPLIT, "SP", maxRow, col, -1, -1, 0));
|
||||
for(int i = 0; i < SplitList.Count; i++)
|
||||
{
|
||||
if (SplitList[i].Equals(node))
|
||||
{
|
||||
string nSplit = SplitList.Count == 1 ? "" : $"{i + 1}";
|
||||
if (node.AreaList.Count >= 1)
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SPLIT, "SP" + nSplit, maxRow, col, i, node.AreaList.Count));
|
||||
else
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SPLIT, "SP" + nSplit, maxRow, col, i, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (node.AreaList.Count >= 1 || node.AreaList.Count >= 1)
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SPLIT, "SP", row, col, -1, -1, node.AreaList.Count));
|
||||
else
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SPLIT, "SP", row, col, -1, -1, 0));
|
||||
maxCol++;
|
||||
for (int i = 0; i < SplitList.Count; i++)
|
||||
{
|
||||
if (SplitList[i].Equals(node))
|
||||
{
|
||||
string nSplit = SplitList.Count == 1 ? "" : $"{i + 1}";
|
||||
if (node.AreaList.Count >= 1)
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SPLIT, "SP" + nSplit, row, col, i, node.AreaList.Count));
|
||||
else
|
||||
ItemTableList.Add(new ItemTable(AreaTypes.SPLIT, "SP" + nSplit, row, col, i, 0));
|
||||
maxCol++;
|
||||
}
|
||||
}
|
||||
}
|
||||
row++;
|
||||
col++;
|
||||
@@ -818,6 +834,7 @@ namespace WebWindowTest
|
||||
private CompileStep currStep;
|
||||
private int currAnta = 0;
|
||||
private int currSash = -1;
|
||||
private int currSplit = -1;
|
||||
private int currFill = -1;
|
||||
private Frame? m_Frame;
|
||||
private List<Sash> m_SashList = new List<Sash>();
|
||||
@@ -875,14 +892,30 @@ namespace WebWindowTest
|
||||
private async void NextStepAndPreview(CompileStep newStep, int Index = -1)
|
||||
{
|
||||
currStep = newStep;
|
||||
if (newStep == CompileStep.Sash)
|
||||
currSash = Index;
|
||||
else
|
||||
currSash = -1;
|
||||
if (newStep == CompileStep.Fill)
|
||||
currFill = Index;
|
||||
else
|
||||
currFill = -1;
|
||||
switch (newStep)
|
||||
{
|
||||
case CompileStep.Sash:
|
||||
{
|
||||
currSash = Index;
|
||||
currFill = -1;
|
||||
currSplit = -1;
|
||||
break;
|
||||
}
|
||||
case CompileStep.Fill:
|
||||
{
|
||||
currFill = Index;
|
||||
currSash = -1;
|
||||
currSplit = -1;
|
||||
break;
|
||||
}
|
||||
case CompileStep.Split:
|
||||
{
|
||||
currSplit = Index;
|
||||
currSash = -1;
|
||||
currFill = -1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
@@ -895,6 +928,7 @@ namespace WebWindowTest
|
||||
currStep = newStep;
|
||||
currSash = -1;
|
||||
currFill = -1;
|
||||
currSplit = -1;
|
||||
}
|
||||
|
||||
private void M_CurrWindow_OnPreview(object? sender, OnPreviewEventArgs e)
|
||||
@@ -926,7 +960,14 @@ namespace WebWindowTest
|
||||
else
|
||||
return "nav-link text-secondary";
|
||||
}
|
||||
return (testStep == currStep) ? "nav-link active fw-bold" : "nav-link text-secondary";
|
||||
else if (testStep == CompileStep.Split)
|
||||
{
|
||||
if ((currSplit == 0 && Index == 0) || (currSplit == 1 && Index == 1))
|
||||
return "nav-link active fw-bold";
|
||||
else
|
||||
return "nav-link text-secondary";
|
||||
}
|
||||
return (testStep == currStep) ? "nav-link active fw-bold" : "nav-link text-secondary";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -938,31 +979,13 @@ namespace WebWindowTest
|
||||
return (currStep == CompileStep.Template) ? "col-12" : "col-6";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calcola larghezza border descrizione split
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private string splitCss(Split currSplit)
|
||||
{
|
||||
return (currSplit.SelSplitShape == SplitShapes.GRID ) ? "col-sm-12" : "col-sm-6";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calcola larghezza border descrizione split
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private string splitContentCss(Split currSplit)
|
||||
{
|
||||
return (currSplit.SelSplitShape == SplitShapes.GRID) ? "col-sm-6" : "col-sm-12";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calcola larghezza colonna header nav
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private string headerCss()
|
||||
{
|
||||
return (currStep == CompileStep.Template) ? "col-8 d-grid gap-1 px-2 d-md-flex justify-content-md-start" : "col-8 d-grid gap-1 px-2 d-md-flex justify-content-md-start";
|
||||
return (currStep == CompileStep.Template) ? "col-8 d-grid px-2 d-md-flex justify-content-md-start" : "col-8 d-grid px-2 d-md-flex justify-content-md-start";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -971,7 +994,7 @@ namespace WebWindowTest
|
||||
/// <returns></returns>
|
||||
private string buttonCss()
|
||||
{
|
||||
return (currStep == CompileStep.Template) ? "col-4 d-grid gap-1 d-md-flex justify-content-md-end" : "col-4 d-grid gap-1 d-md-flex justify-content-md-end";
|
||||
return (currStep == CompileStep.Template) ? "col-4 d-grid gap-1 d-md-flex justify-content-md-end align-items-center" : "col-4 d-grid gap-1 d-md-flex justify-content-md-end align-items-center";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user