Modificata gestione joint sash
This commit is contained in:
@@ -1,138 +1,140 @@
|
||||
@using static WebWindowComplex.LayoutConst
|
||||
|
||||
<table class="table table-sm table-hover align-middle shadow table-borderless">
|
||||
<colgroup>
|
||||
@for (int i = 0; i < maxCol; i++)
|
||||
{
|
||||
<col style="min-width: 120px;" />
|
||||
}
|
||||
</colgroup>
|
||||
<tbody>
|
||||
@for (int i = 0; i < ItemTableList.Count; i++)
|
||||
{
|
||||
<tr>
|
||||
@for (int j = 0; j < maxCol; j++)
|
||||
{
|
||||
var index = RowCollapsedDict.Keys.Order().Where(k => k <= i).LastOrDefault();
|
||||
@if ((RowCollapsedDict.ContainsValue(true) && RowCollapsedDict.GetValueOrDefault(index))
|
||||
&& i - 1 > 0 && ItemTableList.ElementAt(i).Col > ItemTableList.ElementAt(index-1).Col){
|
||||
continue;
|
||||
}
|
||||
else
|
||||
<div class="table-responsive">
|
||||
<table class="table table-responsive table-sm mx-auto table-hover align-middle table-borderless">
|
||||
<colgroup>
|
||||
@for (int i = 0; i < maxCol; i++)
|
||||
{
|
||||
<col style="min-width: 80px;" />
|
||||
}
|
||||
</colgroup>
|
||||
<tbody>
|
||||
@for (int i = 0; i < ItemTableList.Count; i++)
|
||||
{
|
||||
<tr>
|
||||
@for (int j = 0; j < maxCol; j++)
|
||||
{
|
||||
CompileStep cs = CompileStep.Frame;
|
||||
int row = i;
|
||||
int ind = -1;
|
||||
string s = "Vai a step ";
|
||||
@if (j + 1 == ItemTableList[i].Col)
|
||||
{
|
||||
@if (ItemTableList[i].Type is Json.WindowConst.AreaTypes.FRAME)
|
||||
{
|
||||
cs = CompileStep.Frame;
|
||||
s = s + cs.ToString();
|
||||
}
|
||||
else if (ItemTableList[i].Type is Json.WindowConst.AreaTypes.SPLIT)
|
||||
{
|
||||
cs = CompileStep.Split;
|
||||
ind = ItemTableList[i].IndexItem;
|
||||
s = s + cs.ToString() + ((ind + 1) > 0 ? (ind + 1): "");
|
||||
}
|
||||
else if (ItemTableList[i].Type is Json.WindowConst.AreaTypes.SASH)
|
||||
{
|
||||
cs = CompileStep.Sash;
|
||||
ind = ItemTableList[i].IndexItem;
|
||||
s = s + cs.ToString() + ((ind + 1) > 0 ? (ind + 1) : "");
|
||||
}
|
||||
else if (ItemTableList[i].Type is Json.WindowConst.AreaTypes.FILL)
|
||||
{
|
||||
cs = CompileStep.Fill;
|
||||
ind = ItemTableList[i].IndexItem;
|
||||
s = s + cs.ToString() + ((ind + 1) > 0 ? (ind + 1) : "");
|
||||
}
|
||||
<td colspan="2">
|
||||
@* <div class="d-flex flex-row align-items-center justify-content-center">*@
|
||||
<div class="card text-center p-1 shadow-sm hover-shadow w-100">
|
||||
<div class="d-flex gap-2">
|
||||
<button class="btn btn-sm btn-rounded flex-grow-1" @onclick="() => RaiseNextStep(cs, ind)" title="@(s)"
|
||||
style="font-size: 1rem;flex-basis: 80%;">
|
||||
@ItemTableList[i].Desc
|
||||
</button>
|
||||
@if (ItemTableList[row].NumChild > 4)
|
||||
{
|
||||
<button class="btn btn-sm" @onclick="() => ChangeCollapsed(ItemTableList[row].Row)"
|
||||
style="--bs-btn-padding-y: .25rem; --bs-btn-padding-x: .5rem; --bs-btn-font-size: .75rem; flex-basis: 20%;">
|
||||
<i class="@hwIcon(ItemTableList[i].Row)" style="width:0.5rem;"></i>
|
||||
</button>
|
||||
}
|
||||
@if (ItemTableList[i].Type is Json.WindowConst.AreaTypes.SASH ||
|
||||
ItemTableList[i].Type is Json.WindowConst.AreaTypes.SPLIT)
|
||||
{
|
||||
<button class="btn btn-sm" style="font-size: 1rem; flex-basis: 20%;" @onclick="() => Remove(cs, ind)" title="Remove">
|
||||
<i class="fa-solid fa-trash"></i>
|
||||
</button>
|
||||
}
|
||||
@if (ItemTableList[i].Type is Json.WindowConst.AreaTypes.FRAME &&
|
||||
((SashList.Count == 0 && SplitList.Count == 0) || !(FrameWindow.AreaList.First() is Split)))
|
||||
{
|
||||
<div class="dropdown px-4">
|
||||
<button class="btn btn-sm dropdown-toggle" type="button" @onclick="ToggleDropdownFrame">
|
||||
<i class="fa-solid fa-plus"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu @(isOpenFrame ? "show" : "")" style="min-width:5rem; max-width:10rem">
|
||||
@if(SashList.Count == 0 && SplitList.Count == 0)
|
||||
{
|
||||
<li><button class="dropdown-item" @onclick="RaiseAddSash">Sash</button></li>
|
||||
}
|
||||
@if (!(FrameWindow.AreaList.First() is Split))
|
||||
{
|
||||
<li><button class="dropdown-item" @onclick="RaiseAddSplit">Split</button></li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
@if (ItemTableList[i].Type is Json.WindowConst.AreaTypes.FILL && SplittedList != null && SplittedList.Count > 0)
|
||||
{
|
||||
int currIndexFill = ItemTableList[i].IndexItem;
|
||||
Splitted? currSplitted = SplittedList.Where(x => x.AreaList.First().Equals(FillList[currIndexFill])).FirstOrDefault();
|
||||
@if (currSplitted != null)
|
||||
{
|
||||
@if (currSplitted.ParentArea != null && currSplitted.ParentWindow != null)
|
||||
{
|
||||
<div class="dropdown px-4">
|
||||
<button class="btn btn-sm dropdown-toggle" type="button" @onclick="() => ToggleDropdownFill(currIndexFill)">
|
||||
<i class="fa-solid fa-plus"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu @(isOpenFill.ElementAt(currIndexFill) ? "show" : "")" style="min-width:5rem; max-width:10rem">
|
||||
<li><button class="dropdown-item" @onclick="() => AddSashIntoFill(currIndexFill)">Add Sash</button></li>
|
||||
@for (int k = 0; k < SashList.Count; k++)
|
||||
{
|
||||
int Index = k;
|
||||
<li><button class="dropdown-item" @onclick="() => CopySashIntoFill(Index, currIndexFill)">Copy Sash @(SashList.Count == 1 ? "" : (Index + 1))</button></li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@* <div class="card text-center m-1 p-1 shadow-sm hover-shadow">
|
||||
<button class="btn btn-sm btn-danger btn-rounded"
|
||||
style="font-size: 1rem;">
|
||||
<i class="bi bi-trash3-fill"></i>
|
||||
</button>
|
||||
</div> *@
|
||||
@* </div> *@
|
||||
</td>
|
||||
var index = RowCollapsedDict.Keys.Order().Where(k => k <= i).LastOrDefault();
|
||||
@if ((RowCollapsedDict.ContainsValue(true) && RowCollapsedDict.GetValueOrDefault(index))
|
||||
&& i - 1 > 0 && ItemTableList.ElementAt(i).Col > ItemTableList.ElementAt(index-1).Col){
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
@* <td>@FillTable(i, j)</td> *@
|
||||
<td> </td>
|
||||
CompileStep cs = CompileStep.Frame;
|
||||
int row = i;
|
||||
int ind = -1;
|
||||
string s = "Vai a step ";
|
||||
@if (j + 1 == ItemTableList[i].Col)
|
||||
{
|
||||
@if (ItemTableList[i].Type is Json.WindowConst.AreaTypes.FRAME)
|
||||
{
|
||||
cs = CompileStep.Frame;
|
||||
s = s + cs.ToString();
|
||||
}
|
||||
else if (ItemTableList[i].Type is Json.WindowConst.AreaTypes.SPLIT)
|
||||
{
|
||||
cs = CompileStep.Split;
|
||||
ind = ItemTableList[i].IndexItem;
|
||||
s = s + cs.ToString() + ((ind + 1) > 0 ? (ind + 1): "");
|
||||
}
|
||||
else if (ItemTableList[i].Type is Json.WindowConst.AreaTypes.SASH)
|
||||
{
|
||||
cs = CompileStep.Sash;
|
||||
ind = ItemTableList[i].IndexItem;
|
||||
s = s + cs.ToString() + ((ind + 1) > 0 ? (ind + 1) : "");
|
||||
}
|
||||
else if (ItemTableList[i].Type is Json.WindowConst.AreaTypes.FILL)
|
||||
{
|
||||
cs = CompileStep.Fill;
|
||||
ind = ItemTableList[i].IndexItem;
|
||||
s = s + cs.ToString() + ((ind + 1) > 0 ? (ind + 1) : "");
|
||||
}
|
||||
<td colspan="2">
|
||||
@* <div class="d-flex flex-row align-items-center justify-content-center">*@
|
||||
<div class="card text-center p-1 shadow-sm hover-shadow w-100">
|
||||
<div class="d-flex gap-2">
|
||||
<button class="btn btn-sm btn-rounded flex-grow-1" @onclick="() => RaiseNextStep(cs, ind)" title="@(s)"
|
||||
style="font-size: 1rem;flex-basis: 80%;">
|
||||
@ItemTableList[i].Desc
|
||||
</button>
|
||||
@if (ItemTableList[row].NumChild > 4)
|
||||
{
|
||||
<button class="btn btn-sm" @onclick="() => ChangeCollapsed(ItemTableList[row].Row)"
|
||||
style="--bs-btn-padding-y: .25rem; --bs-btn-padding-x: .5rem; --bs-btn-font-size: .75rem; flex-basis: 20%;">
|
||||
<i class="@hwIcon(ItemTableList[i].Row)" style="width:0.5rem;"></i>
|
||||
</button>
|
||||
}
|
||||
@if (ItemTableList[i].Type is Json.WindowConst.AreaTypes.SASH ||
|
||||
ItemTableList[i].Type is Json.WindowConst.AreaTypes.SPLIT)
|
||||
{
|
||||
<button class="btn btn-sm" style="font-size: 1rem; flex-basis: 20%;" @onclick="() => Remove(cs, ind)" title="Remove">
|
||||
<i class="fa-solid fa-trash"></i>
|
||||
</button>
|
||||
}
|
||||
@if (ItemTableList[i].Type is Json.WindowConst.AreaTypes.FRAME &&
|
||||
((SashList.Count == 0 && SplitList.Count == 0) || !(FrameWindow.AreaList.First() is Split)))
|
||||
{
|
||||
<div class="dropdown px-4">
|
||||
<button class="btn btn-sm dropdown-toggle" type="button" @onclick="ToggleDropdownFrame">
|
||||
<i class="fa-solid fa-plus"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu @(isOpenFrame ? "show" : "")" style="min-width:5rem; max-width:10rem">
|
||||
@if(SashList.Count == 0 && SplitList.Count == 0)
|
||||
{
|
||||
<li><button class="dropdown-item" @onclick="RaiseAddSash">Sash</button></li>
|
||||
}
|
||||
@if (!(FrameWindow.AreaList.First() is Split))
|
||||
{
|
||||
<li><button class="dropdown-item" @onclick="RaiseAddSplit">Split</button></li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
@if (ItemTableList[i].Type is Json.WindowConst.AreaTypes.FILL && SplittedList != null && SplittedList.Count > 0)
|
||||
{
|
||||
int currIndexFill = ItemTableList[i].IndexItem;
|
||||
Splitted? currSplitted = SplittedList.Where(x => x.AreaList.First().Equals(FillList[currIndexFill])).FirstOrDefault();
|
||||
@if (currSplitted != null)
|
||||
{
|
||||
@if (currSplitted.ParentArea != null && currSplitted.ParentWindow != null)
|
||||
{
|
||||
<div class="dropdown px-4">
|
||||
<button class="btn btn-sm dropdown-toggle" type="button" @onclick="() => ToggleDropdownFill(currIndexFill)">
|
||||
<i class="fa-solid fa-plus"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu @(isOpenFill.ElementAt(currIndexFill) ? "show" : "")" style="min-width:5rem; max-width:10rem">
|
||||
<li><button class="dropdown-item" @onclick="() => AddSashIntoFill(currIndexFill)">Add Sash</button></li>
|
||||
@for (int k = 0; k < SashList.Count; k++)
|
||||
{
|
||||
int Index = k;
|
||||
<li><button class="dropdown-item" @onclick="() => CopySashIntoFill(Index, currIndexFill)">Copy Sash @(SashList.Count == 1 ? "" : (Index + 1))</button></li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@* <div class="card text-center m-1 p-1 shadow-sm hover-shadow">
|
||||
<button class="btn btn-sm btn-danger btn-rounded"
|
||||
style="font-size: 1rem;">
|
||||
<i class="bi bi-trash3-fill"></i>
|
||||
</button>
|
||||
</div> *@
|
||||
@* </div> *@
|
||||
</td>
|
||||
}
|
||||
else
|
||||
{
|
||||
@* <td>@FillTable(i, j)</td> *@
|
||||
<td> </td>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -156,10 +156,10 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
SashList.Add(addSashDim);
|
||||
}
|
||||
if (frame != null && (frame.SelShapeIndex == (int)Shapes.ARC
|
||||
|| frame.SelShapeIndex == (int)Shapes.DOUBLEARC
|
||||
|| frame.SelShapeIndex == (int)Shapes.ARC_FULL
|
||||
|| frame.SelShapeIndex == (int)Shapes.THREECENTERARC))
|
||||
if (m_CurrShape == "FullArc" ||
|
||||
m_CurrShape == "Arc" ||
|
||||
m_CurrShape == "SemiFullArc" ||
|
||||
m_CurrShape == "SemiArc")
|
||||
{
|
||||
if (SashList.ElementAt(value - 2) != null)
|
||||
SashList.ElementAt(value - 2)!.JointList.ElementAt(2).SelJointTypeIndex = (int)Joints.FULL_V;
|
||||
@@ -215,10 +215,10 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
SashList.RemoveAt(0);
|
||||
}
|
||||
if (frame != null && (frame.SelShapeIndex == (int)Shapes.ARC
|
||||
|| frame.SelShapeIndex == (int)Shapes.DOUBLEARC
|
||||
|| frame.SelShapeIndex == (int)Shapes.ARC_FULL
|
||||
|| frame.SelShapeIndex == (int)Shapes.THREECENTERARC))
|
||||
if (m_CurrShape == "FullArc" ||
|
||||
m_CurrShape == "Arc" ||
|
||||
m_CurrShape == "SemiFullArc" ||
|
||||
m_CurrShape == "SemiArc")
|
||||
{
|
||||
if (SashList.LastOrDefault() != null)
|
||||
{
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
</div>
|
||||
<div class="card-body bg-transparent">
|
||||
<div class="row justify-content-between align-middle flex-wrap">
|
||||
<div class="col-md-6 col-lg-6 d-flex flex-column pt-5">
|
||||
<div class="col-md-6 col-lg-6">
|
||||
@if (currStep == CompileStep.Tree)
|
||||
{
|
||||
<CardTree ItemTableList="m_ItemTableList"
|
||||
@@ -266,7 +266,7 @@
|
||||
</CardArcElement>
|
||||
} *@
|
||||
</div>
|
||||
<div class="col-md-6 col-lg-6 d-flex flex-column">
|
||||
<div class="col-md-6 col-lg-6">
|
||||
@outSvg
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>3.1.3.1218</Version>
|
||||
<Version>3.1.3.1309</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
|
||||
@@ -331,6 +331,9 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user