Migliorata interfaccia

This commit is contained in:
Annamaria Sassi
2026-02-18 16:41:17 +01:00
parent 7c836e3fbf
commit 4a5c6654cc
20 changed files with 537 additions and 467 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
<div class="card shadow-sm rounded">
<div class="card-header bg-light bg-opacity-25">
<div class="d-flex justify-content-between align-items-center">
<div class="d-flex justify-content-between align-items-center mt-2">
<div class="col d-flex justify-content-between">
<h5>Area frame</h5>
</div>
+201 -173
View File
@@ -1,16 +1,19 @@
@using EgwCoreLib.Razor
@if(mode == ModeView.View)
{
<div class="col-lg-6 col-md-12 my-2">
<div class="d-flex justify-content-between align-items-center">
<h6 class="fw-bold">Sash @(CurrSashGroup.SashList.Count == 1 ? "" : (IndexSash + 1))</h6>
@if(!User && CurrSashGroup.SashList.Count > 1)
{
<div class="dropdown">
<button class="btn btn-outline-secondary dropdown-toggle btn-sm" type="button" @onclick="ToggleDropdown">
Copy content
</button>
<ul class="dropdown-menu @(isOpen ? "show" : "")" style="min-width:5rem; max-width:10rem">
<div class="col-lg-12 col-md-12 my-2">
@if (!SashDimEditList.Contains(IndexSash))
{
<div class="d-flex justify-content-between align-items-center mb-2">
<div class="col-md-12 col-lg-6 d-grid px-2 d-md-flex justify-content-md-start flex-wrap">
<h6 class="fw-bold text-nowrap">Sash @(CurrSashGroup.SashList.Count == 1 ? "" : (IndexSash + 1))</h6>
</div>
<div class="col-md-12 col-lg-6 d-grid px-4 d-md-flex justify-content-md-end align-items-center flex-wrap">
@if(!User && CurrSashGroup.SashList.Count > 1)
{
<div class="dropdown px-4">
<button class="btn btn-outline-secondary dropdown-toggle btn-sm" type="button" data-bs-toggle="dropdown">
Copy content
</button>
<ul class="dropdown-menu" style="min-width:7rem; max-width:10rem">
@for (int k = 0; k <= CurrSashGroup.SashList.Count - 1; k++)
{
@if (k != IndexSash)
@@ -19,109 +22,73 @@
int IndexModify = IndexSash;
<li>
<button class="dropdown-item" @onclick="() => CopyContentSash(IndexCopy, IndexModify)">
Sash @(k + 1)
Sash @(k + 1)
</button>
</li>
}
}
</ul>
</div>
}
<button class="btn btn-outline-secondary btn-sm" type="button" @onclick="() => doEdit(IndexSash)">Edit</button>
</ul>
</div>
}
<button class="btn btn-outline-secondary btn-sm" type="button" @onclick="() => doEdit(IndexSash)">
<i class="fa-solid fa-pen"></i>
</button>
</div>
</div>
<div class="input-group mb-2 mt-2">
@if(User)
{
<span class="input-group-text">Tipology</span>
<input type="text" readonly class="form-control" value="@(CurrSashDim.OpeningTypeList.ElementAt(OpeningTypeIndex - 1))">
}
else
{
<label class="input-group-text">Tipology</label>
<select class="form-select" @bind="@OpeningTypeIndex">
@foreach (var openingType in CurrSashDim.OpeningTypeList)
<div class="row">
<div class="col-lg-5 col-md-12 my-2">
<div class="input-group mb-2">
@if(User)
{
<option value=@(openingType.Id)>@(openingType.Name)</option>
<span class="input-group-text">Tipology</span>
<input type="text" readonly class="form-control" value="@(CurrSashDim.OpeningTypeList.ElementAt(OpeningTypeIndex - 1))">
}
</select>
}
</div>
<div class="input-group mb-2">
<span class="input-group-text">Dimension</span>
<input type="number" class="form-control" @bind="@Dimension">
@* <InputDouble CssClass="form-control form-control text-end" Decimals="@CssDecimals()" Step="@CssStepNumber()" @bind-Value="@Dimension"></InputDouble> *@
<select class="form-select" style="max-width:6rem; background-color:#e9ecef" @bind="@MeasureTypeIndex">
@foreach (var mType in CurrSashDim.MeasureTypeList)
{
<option value=@(mType.Id)>
@switch (mType.Name)
else
{
<label class="input-group-text">Tipology</label>
<select class="form-select" @bind="@OpeningTypeIndex">
@foreach (var openingType in CurrSashDim.OpeningTypeList)
{
<option value=@(openingType.Id)>@(openingType.Name)</option>
}
</select>
}
</div>
</div>
<div class="col-lg-5 col-md-12 my-2">
<div class="input-group mb-2">
<span class="input-group-text">Dimension</span>
<input type="number" class="form-control" @bind="@Dimension">
@* <InputDouble CssClass="form-control form-control text-end" Decimals="@CssDecimals()" Step="@CssStepNumber()" @bind-Value="@Dimension"></InputDouble> *@
<select class="form-select" style="max-width:6rem; background-color:#e9ecef" @bind="@MeasureTypeIndex">
@foreach (var mType in CurrSashDim.MeasureTypeList)
{
case "Absolute":
<option value=@(mType.Id)>
@switch (mType.Name)
{
<span class="input-group-text">mm</span>
break;
case "Absolute":
{
<span class="input-group-text">mm</span>
break;
}
case "Proportional":
{
<span class="input-group-text">*</span>
break;
}
case "Percentage":
{
<span class="input-group-text">%</span>
break;
}
}
case "Proportional":
{
<span class="input-group-text">*</span>
break;
}
case "Percentage":
{
<span class="input-group-text">%</span>
break;
}
}
</option>
}
</select>
</div>
<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="Handle" checked="@CurrSashDim.bHasHandle" @onclick="() => ChangeHandle()">
</div>
<div class="px-2">
<label class="form-check-label fs-6 text-dark">Handle</label>
</div>
</div>
</div>
}
else
{
<div class="d-flex justify-content-between align-items-center mb-2">
<h6 class="fw-bold text-nowrap">Sash @(CurrSashGroup.SashList.Count == 1 ? "" : (IndexSash + 1))</h6>
@if (!User && !(CurrAnta.AreaList[0] is Split))
{
<div class="input-group mb-2 justify-content-center">
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AddSplitToSash()">Add split</button>
</div>
<div class="input-group mb-2 justify-content-center">
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AddInglesinaToSash()">Add inglesina</button>
</div>
}
<button type="button" class="btn-close" aria-label="Close" @onclick="() => ClosePopup(IndexSash)"></button>
</div>
<div class="row">
<div class="col-lg-6 col-md-12 my-2">
<div class="input-group mb-2">
@if(User)
{
<span class="input-group-text">Tipology</span>
<input type="text" readonly class="form-control" value="@(CurrSashDim.OpeningTypeList.ElementAt(OpeningTypeIndex - 1))">
}
else
{
<label class="input-group-text">Tipology</label>
<select class="form-select" @bind="@OpeningTypeIndex">
@foreach (var openingType in CurrSashDim.OpeningTypeList)
{
<option value=@(openingType.Id)>@(openingType.Name)</option>
</option>
}
</select>
}
</div>
</div>
<div class="input-group">
<div class="d-flex justify-content-start fs-5">
<div class="col-lg-2 col-md-12 my-2">
<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="Handle" checked="@CurrSashDim.bHasHandle" @onclick="() => ChangeHandle()">
</div>
@@ -131,82 +98,143 @@ else
</div>
</div>
</div>
<div class="col-lg-6 col-md-12 my-2">
<div class="input-group mb-2">
<span class="input-group-text">Dimension</span>
<input type="number" class="form-control" @bind="@Dimension">
@* <InputDouble CssClass="form-control form-control text-end" Decimals="@CssDecimals()" Step="@CssStepNumber()" @bind-Value="@Dimension"></InputDouble> *@
<select class="form-select" style="max-width:6rem; background-color:#e9ecef" @bind="@MeasureTypeIndex">
@foreach (var mType in CurrSashDim.MeasureTypeList)
}
else
{
<div class="d-flex justify-content-between align-items-center mb-2">
<div class="col-md-12 col-lg-6 d-grid px-2 d-md-flex justify-content-md-start flex-wrap">
<h6 class="fw-bold text-nowrap">Sash @(CurrSashGroup.SashList.Count == 1 ? "" : (IndexSash + 1))</h6>
</div>
<div class="col-md-12 col-lg-6 d-grid px-4 d-md-flex justify-content-md-end align-items-center flex-wrap">
@if (!User && !(CurrAnta.AreaList[0] is Split))
{
<div class="dropdown px-4">
<button class="btn btn-outline-secondary dropdown-toggle btn-sm" type="button" data-bs-toggle="dropdown">
Add
</button>
<ul class="dropdown-menu" style="min-width:5rem; max-width:10rem">
<li>
<button class="dropdown-item" @onclick="() => AddSplitToSash()">Split</button>
<button class="dropdown-item" @onclick="() => AddInglesinaToSash()">Inglesina</button>
</li>
</ul>
</div>
@* <div class="input-group mb-2 justify-content-center">
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AddSplitToSash()">Add split</button>
</div>
<div class="input-group mb-2 justify-content-center">
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AddInglesinaToSash()">Add inglesina</button>
</div> *@
}
<button type="button" class="btn-close" aria-label="Close" @onclick="() => ClosePopup(IndexSash)"></button>
</div>
</div>
<div class="row">
<div class="col-lg-5 col-md-12 my-2">
<div class="input-group mb-2">
@if (User)
{
<option value=@(mType.Id)>
@switch (mType.Name)
{
case "Absolute":
{
<span class="input-group-text">mm</span>
break;
}
case "Proportional":
{
<span class="input-group-text">*</span>
break;
}
case "Percentage":
{
<span class="input-group-text">%</span>
break;
}
}
</option>
<span class="input-group-text">Tipology</span>
<input type="text" readonly class="form-control" value="@(CurrSashDim.OpeningTypeList.ElementAt(OpeningTypeIndex - 1))">
}
else
{
<label class="input-group-text">Tipology</label>
<select class="form-select" @bind="@OpeningTypeIndex">
@foreach (var openingType in CurrSashDim.OpeningTypeList)
{
<option value=@(openingType.Id)>@(openingType.Name)</option>
}
</select>
}
</select>
</div>
</div>
</div>
<hr />
<div class="row">
<div class="col-lg-6 col-md-12 my-2">
<div class="row justify-content-between align-items-center">
<div class="col d-flex justify-content-start align-items-center">
<h6>Element</h6>
</div>
</div>
<div class="input-group mb-2">
@foreach (var element in CurrSashDim.ElementDimensionList)
<div class="col-lg-5 col-md-12 my-2">
<div class="input-group mb-2">
<span class="input-group-text">Dimension</span>
<input type="number" class="form-control" @bind="@Dimension">
@* <InputDouble CssClass="form-control form-control text-end" Decimals="@CssDecimals()" Step="@CssStepNumber()" @bind-Value="@Dimension"></InputDouble> *@
<select class="form-select" style="max-width:6rem; background-color:#e9ecef" @bind="@MeasureTypeIndex">
@foreach (var mType in CurrSashDim.MeasureTypeList)
{
<option value=@(mType.Id)>
@switch (mType.Name)
{
case "Absolute":
{
<span class="input-group-text">mm</span>
break;
}
case "Proportional":
{
<span class="input-group-text">*</span>
break;
}
case "Percentage":
{
<span class="input-group-text">%</span>
break;
}
}
</option>
}
</select>
</div>
</div>
<div class="col-lg-2 col-md-12 my-2">
<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="Handle" checked="@CurrSashDim.bHasHandle" @onclick="() => ChangeHandle()">
</div>
<div class="px-2">
<label class="form-check-label fs-6 text-dark">Handle</label>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-md-12 my-2">
<div class="row justify-content-between align-items-center">
<div class="col d-flex justify-content-start align-items-center">
<h6>Element</h6>
</div>
</div>
<div class="input-group mb-2">
@foreach (var element in CurrSashDim.ElementDimensionList)
{
<EditElement CurrRec="element" EC_Update="UpdateElement"></EditElement>
}
</div>
</div>
<div class="col-lg-6 col-md-12">
<div class="row justify-content-between align-items-center">
<div class="col d-flex justify-content-start align-items-center">
<h6>Joints</h6>
</div>
@if (!User)
{
<div class="col d-flex">
<div class="input-group mb-2 justify-content-center">
<button class="@ButtonJointCss(WebWindowComplex.Json.WindowConst.Joints.ANGLED)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.ANGLED)">Angled</button>
</div>
</div>
<div class="col d-flex">
<div class="input-group mb-2 justify-content-center">
<button class="@ButtonJointCss(WebWindowComplex.Json.WindowConst.Joints.FULL_H)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.FULL_H)">Horizontal</button>
</div>
</div>
<div class="col d-flex">
<div class="input-group mb-2 justify-content-center">
<button class="@ButtonJointCss(WebWindowComplex.Json.WindowConst.Joints.FULL_V)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.FULL_V)">Vertical</button>
</div>
</div>
}
</div>
@foreach (Joint joint in CurrSashDim.JointList)
{
<EditElement CurrRec="element" EC_Update="UpdateElement"></EditElement>
<EditJoint CurrRec="joint" EC_Update="UpdateJoint"></EditJoint>
}
</div>
</div>
<div class="col-lg-6 col-md-12">
<div class="row justify-content-between align-items-center">
<div class="col d-flex justify-content-start align-items-center">
<h6>Joints</h6>
</div>
@if (!User)
{
<div class="col d-flex">
<div class="input-group mb-2 justify-content-center">
<button class="@ButtonJointCss(WebWindowComplex.Json.WindowConst.Joints.ANGLED)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.ANGLED)">Angled</button>
</div>
</div>
<div class="col d-flex">
<div class="input-group mb-2 justify-content-center">
<button class="@ButtonJointCss(WebWindowComplex.Json.WindowConst.Joints.FULL_H)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.FULL_H)">Horizontal</button>
</div>
</div>
<div class="col d-flex">
<div class="input-group mb-2 justify-content-center">
<button class="@ButtonJointCss(WebWindowComplex.Json.WindowConst.Joints.FULL_V)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.FULL_V)">Vertical</button>
</div>
</div>
}
</div>
@foreach (Joint joint in CurrSashDim.JointList)
{
<EditJoint CurrRec="joint" EC_Update="UpdateJoint"></EditJoint>
}
</div>
</div>
}
}
</div>
+12 -12
View File
@@ -21,6 +21,12 @@ namespace WebWindowComplex.Compo
[Parameter]
public SashDimension CurrSashDim { get; set; } = null!;
/// <summary>
/// Lista di ante che si stanno editando
/// </summary>
[Parameter]
public List<int> SashDimEditList { get; set; } = null!;
/// <summary>
/// Lista delle sash
/// </summary>
@@ -33,12 +39,6 @@ namespace WebWindowComplex.Compo
[CascadingParameter(Name = "User")]
public bool User { get; set; } = false!;
/// <summary>
/// Modalità di visualizzazione (view /edit)
/// </summary>
[Parameter]
public bool EditMode { get; set; } = false;
/// <summary>
/// Indice della sash corrente
/// </summary>
@@ -374,17 +374,17 @@ namespace WebWindowComplex.Compo
protected override void OnParametersSet()
{
if (EditMode)
mode = ModeView.Edit;
else
mode = ModeView.View;
//if (EditMode)
// mode = ModeView.Edit;
//else
// mode = ModeView.View;
}
private ModeView mode { get; set; } = ModeView.View;
private void doEdit(int index)
{
var args = new DataChangeMode
{
Edit = true,
//Edit = true,
IndexSashEdit = index,
IndexSashClose = -1
};
@@ -394,7 +394,7 @@ namespace WebWindowComplex.Compo
{
var args = new DataChangeMode
{
Edit = false,
//Edit = false,
IndexSashEdit = -1,
IndexSashClose = index
};
+1 -1
View File
@@ -1,6 +1,6 @@
<div class="card shadow-sm rounded">
<div class="card-body py-2">
<div class="d-flex justify-content-between align-items-center">
<div class="d-flex justify-content-between align-items-center mt-2">
<div class="col-4 d-flex justify-content-left">
<h5>Area split @(SplittedList.Count > 1 ? (SplittedList.IndexOf(CurrSplitted) + 1) : "")</h5>
</div>
+2 -2
View File
@@ -1,5 +1,5 @@
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#BottomRail">
<i class="fa-solid fa-pen-to-square"></i>
<button type="button" class="btn btn-secondary" data-bs-toggle="modal" data-bs-target="#BottomRail">
<i class="fa-solid fa-pen"></i>
</button>
<div class="modal fade" id="BottomRail" tabindex="-1" aria-labelledby="BottomRailLabel" aria-hidden="true">
+30 -25
View File
@@ -35,17 +35,23 @@
</div>
<hr />
<div class="row">
<div class="col-md-12 col-lg-6">
<div class="d-flex justify-content-start align-items-center">
<div class="col-md-12 col-lg-12">
<div class="d-flex justify-content-start align-items-center" style="min-height: 2.5rem;">
<h6 class="fw-bold">Dimension</h6>
</div>
@foreach (FrameDimension dimension in CurrFrameWindow.DimensionList)
{
<EditFrameDimensions CurrRec="dimension" EC_Update="UpdateDim"></EditFrameDimensions>
}
<div class="row">
@foreach (FrameDimension dimension in CurrFrameWindow.DimensionList)
{
<div class="@EditDimensionCss()">
<EditFrameDimensions CurrRec="dimension" EC_Update="UpdateDim"></EditFrameDimensions>
</div>
}
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 col-lg-6">
<div class="d-flex justify-content-start align-items-center">
<div class="d-flex justify-content-start align-items-center" style="min-height: 2.5rem;">
<h6 class="fw-bold">Threshold</h6>
</div>
<div class="input-group mb-2">
@@ -53,7 +59,6 @@
{
<span class="input-group-text">Tipology</span>
<input type="text" readonly class="form-control" value="@(CurrFrameWindow.ThresholdList.FirstOrDefault(x => x.Type == SelThreshold)?.Name)">
}
else
{
@@ -66,27 +71,27 @@
</select>
}
</div>
</div>
<div class="col-md-12 col-lg-6">
@if (SashList.Count == 0)
{
<div class="d-flex justify-content-start align-items-center mt-2">
<div class="d-flex justify-content-start align-items-center" style="min-height: 2.5rem;">
<h6 class="fw-bold">Bottom rail</h6>
</div>
<div class="row">
<div class="input-group mb-2">
<span class="input-group-text">Quantity</span>
@if (User)
<div class="input-group mb-2">
<span class="input-group-text">Quantity</span>
@if (User)
{
<input type="number" readonly class="form-control" value="@FrameBottomRailQty">
}
else
{
@if (CurrFrameWindow.BottomRailQty > 0)
{
<input type="number" readonly class="form-control" value="@FrameBottomRailQty">
<BottomRail CurrArea="CurrFrameWindow" EC_UpdateBottomRail="UpdateFrame"></BottomRail>
}
else
{
@if (CurrFrameWindow.BottomRailQty > 0)
{
<BottomRail CurrArea="CurrFrameWindow" EC_UpdateBottomRail="UpdateFrame"></BottomRail>
}
<input type="number" class="form-control" @bind="@FrameBottomRailQty">
}
</div>
<input type="number" class="form-control" @bind="@FrameBottomRailQty">
}
</div>
}
</div>
@@ -94,7 +99,7 @@
<hr />
<div class="row">
<div class="col-md-12 col-lg-6">
<div class="row justify-content-between align-items-center">
<div class="row justify-content-between align-items-center" style="min-height: 2.5rem;">
<div class="col d-flex justify-content-start align-items-center">
<h6 class="fw-bold">Joints</h6>
</div>
@@ -125,7 +130,7 @@
</div>
</div>
<div class="col-md-12 col-lg-6">
<div class="row justify-content-between align-items-center">
<div class="row justify-content-between align-items-center" style="min-height: 2.5rem;">
<div class="col d-flex justify-content-start align-items-center">
<h6 class="fw-bold">Element</h6>
</div>
@@ -313,6 +313,14 @@ namespace WebWindowComplex.Compo
return "btn btn-secondary btn-sm";
}
private string EditDimensionCss()
{
if(CurrFrameWindow.DimensionList.Count == 2)
return "col-md-12 col-lg-6";
else
return "col-md-12 col-lg-4";
}
#endregion Private Methods
}
+36 -57
View File
@@ -14,10 +14,6 @@
<button class="btn btn-outline-secondary btn-sm" @onclick="() => RemoveArea()">Remove sash group</button>
</div>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" checked="@CurrSashGroup.bIsDimensionLight" @onclick="() => ChangeTypeDimension()">
<label class="form-check-label" for="switchCheckDefault">Solo luce</label>
</div>
}
<div class="px-2">
<button class="btn btn-close" @onclick="ReqClose"></button>
@@ -25,8 +21,8 @@
</div>
</div>
<div class="card-body py-2">
<div class="row">
<div class="col-md-12 col-lg-6">
<div class="row pt-2">
<div class="col-md-12 col-lg-4">
<div class="input-group mb-2">
<span class="input-group-text">Qty sash</span>
@if (User)
@@ -39,11 +35,9 @@
}
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 col-lg-6">
<div class="col-md-12 col-lg-4">
<div class="input-group mb-2">
@if(User)
@if (User)
{
<span class="input-group-text">Tipology</span>
<input type="text" readonly class="form-control" value="@(CurrSashGroup.OrientationSashTypeList.FirstOrDefault(x => x.Id == OrientationSashTypeIndex).Name)">
@@ -60,7 +54,7 @@
}
</div>
</div>
<div class="col-md-12 col-lg-6">
<div class="col-md-12 col-lg-4">
<div class="input-group mb-2">
<span class="input-group-text">Qty bottom rail</span>
@if (User)
@@ -152,57 +146,42 @@
<div class="card shadow-sm rounded mb-4">
<div class="card-body py-2">
<div class="d-flex justify-content-end">
<div class="dropdown">
<button class="btn btn-outline-secondary dropdown-toggle btn-sm" type="button" @onclick="ToggleDropdown">
Measure
<div class="dropdown px-4">
<button class="btn btn-outline-secondary dropdown-toggle btn-sm" type="button" data-bs-toggle="dropdown">
Unità misura
</button>
<ul class="dropdown-menu @(isOpen ? "show" : "")" style="min-width:5rem; max-width:10rem">
<li>
<button class="dropdown-item" @onclick="() => SetMeasureType(MeasureTypes.ABSOLUTE)">
Absolute
</button>
</li>
<li>
<button class="dropdown-item" @onclick="() => SetMeasureType(MeasureTypes.PROPORTIONAL)">
Proportional
</button>
</li>
<li>
<button class="dropdown-item" @onclick="() => SetMeasureType(MeasureTypes.PERCENTAGE)">
Percentage
</button>
</li>
<ul class="dropdown-menu" style="min-width:5rem; max-width:10rem">
<li><button class="dropdown-item" @onclick="() => SetMeasureType(MeasureTypes.ABSOLUTE)">Absolute</button></li>
<li><button class="dropdown-item" @onclick="() => SetMeasureType(MeasureTypes.PROPORTIONAL)">Proportional</button></li>
<li><button class="dropdown-item" @onclick="() => SetMeasureType(MeasureTypes.PERCENTAGE)">Percentage</button></li>
</ul>
</div>
<div class="dropdown">
<button class="btn btn-outline-secondary dropdown-toggle btn-sm" type="button" data-bs-toggle="dropdown">
Measure type
</button>
<ul class="dropdown-menu" style="min-width:7rem; max-width:10rem">
<li><button class="dropdown-item" @onclick="() => ChangeTypeDimension(false)">Sash</button></li>
<li><button class="dropdown-item" @onclick="() => ChangeTypeDimension(true)">Glass</button></li>
</ul>
</div>
</div>
<div class="row">
@for (int i = 0; i < CurrSashGroup.SashList.Count; i++)
@for (int i = 0; i < CurrSashGroup.SashList.Count; i++)
{
<div class="row mt-2">
<AreaSash CurrSashDim="CurrSashGroup.SashList[i]"
IndexSash="i"
SashDimEditList="currSashDimEdit"
EC_UpdateSash="UpdateSash"
EC_UpdateSashDim="UpdateSashDimension"
EC_ReqResetDict="ResetDict"
EC_EditView="EditView">
</AreaSash>
</div>
@if (i < CurrSashGroup.SashList.Count - 1)
{
@if (editMode && currSashDimEdit.Contains(i))
{
<div class="col-12 my-2">
<AreaSash CurrSashDim="CurrSashGroup.SashList[i]"
IndexSash="i"
EditMode="editMode"
EC_UpdateSash="UpdateSash"
EC_UpdateSashDim="UpdateSashDimension"
EC_ReqResetDict="ResetDict"
EC_EditView="EditView">
</AreaSash>
</div>
}
else if(currSashDimEdit.Count == 0)
{
<AreaSash CurrSashDim="CurrSashGroup.SashList[i]"
IndexSash="i"
EditMode="editMode"
EC_UpdateSash="UpdateSash"
EC_UpdateSashDim="UpdateSashDimension"
EC_ReqResetDict="ResetDict"
EC_EditView="EditView">
</AreaSash>
}
<hr />
}
</div>
}
</div>
</div>
+25 -21
View File
@@ -221,24 +221,27 @@ namespace WebWindowComplex.Compo
/// Metodo per cambiare dimensione solo luce
/// </summary>
/// <returns></returns>
private Task ChangeTypeDimension()
private Task ChangeTypeDimension(bool type)
{
CurrSashGroup.bIsDimensionLight = !CurrSashGroup.bIsDimensionLight;
foreach (var CurrSashDim in CurrSashGroup.SashList)
if(CurrSashGroup.bIsDimensionLight != type)
{
if (CurrSashDim.SelMeasureType is MeasureTypes.ABSOLUTE)
CurrSashGroup.bIsDimensionLight = type;
foreach (var CurrSashDim in CurrSashGroup.SashList)
{
if (CurrSashGroup.bIsDimensionLight)
if (CurrSashDim.SelMeasureType is MeasureTypes.ABSOLUTE)
{
CurrSashDim.SetDimensionLight(CurrSashDim.dDimension -
CurrSashDim.ElementDimensionList.ElementAt(1).dDimension -
CurrSashDim.ElementDimensionList.Last().dDimension);
}
else
{
CurrSashDim.SetDimensionLight(CurrSashDim.dDimension +
CurrSashDim.ElementDimensionList.ElementAt(1).dDimension +
CurrSashDim.ElementDimensionList.Last().dDimension);
if (CurrSashGroup.bIsDimensionLight)
{
CurrSashDim.SetDimensionLight(CurrSashDim.dDimension -
CurrSashDim.ElementDimensionList.ElementAt(1).dDimension -
CurrSashDim.ElementDimensionList.Last().dDimension);
}
else
{
CurrSashDim.SetDimensionLight(CurrSashDim.dDimension +
CurrSashDim.ElementDimensionList.ElementAt(1).dDimension +
CurrSashDim.ElementDimensionList.Last().dDimension);
}
}
}
}
@@ -257,7 +260,7 @@ namespace WebWindowComplex.Compo
/// <returns></returns>
protected Task SetMeasureType(MeasureTypes type)
{
isOpen = !isOpen;
//isOpen = !isOpen;
for (int i = 0; i < CurrSashGroup.SashList.Count; i++)
{
CurrSashGroup.SashList.ElementAt(i).SetSelMeasureType(type, i);
@@ -363,7 +366,7 @@ namespace WebWindowComplex.Compo
private List<int> currSashDimEdit = new List<int>();
private void EditView(DataChangeMode args)
{
editMode = args.Edit;
//editMode = args.Edit;
if(args.IndexSashEdit != -1)
currSashDimEdit.Add(args.IndexSashEdit);
if (args.IndexSashClose != -1)
@@ -420,11 +423,12 @@ namespace WebWindowComplex.Compo
return EC_ReqFirstOptionHw.InvokeAsync(CurrSashGroup);
}
private bool isOpen = false;
private void ToggleDropdown()
{
isOpen = !isOpen;
}
//private bool isOpen = false;
//private void ToggleDropdown()
//{
// isOpen = !isOpen;
//}
#endregion Private Methods
}
+19 -1
View File
@@ -26,7 +26,25 @@
<button class="btn btn-outline-secondary btn-sm" @onclick="() => RemoveArea()">Remove split</button>
</div>
}
<div class="dropdown px-4">
<button class="btn btn-outline-secondary dropdown-toggle btn-sm" type="button" data-bs-toggle="dropdown">
Unità misura
</button>
<ul class="dropdown-menu" style="min-width:5rem; max-width:10rem">
<li><button class="dropdown-item" @onclick="() => SetMeasureType(MeasureTypes.ABSOLUTE)">Absolute</button></li>
<li><button class="dropdown-item" @onclick="() => SetMeasureType(MeasureTypes.PROPORTIONAL)">Proportional</button></li>
<li><button class="dropdown-item" @onclick="() => SetMeasureType(MeasureTypes.PERCENTAGE)">Percentage</button></li>
</ul>
</div>
<div class="dropdown">
<button class="btn btn-outline-secondary dropdown-toggle btn-sm" type="button" data-bs-toggle="dropdown">
Measure type
</button>
<ul class="dropdown-menu" style="min-width:7rem; max-width:10rem">
<li><button class="dropdown-item">Glass</button></li>
</ul>
</div>
@* <div class="dropdown">
<button class="btn btn-outline-secondary dropdown-toggle btn-sm" type="button" @onclick="ToggleDropdown">
Measure
</button>
@@ -47,7 +65,7 @@
</button>
</li>
</ul>
</div>
</div> *@
</div>
<div class="row">
<div class="col-md-12 col-lg-6">
@@ -2,7 +2,7 @@
<div class="@SplitDimCss()">
<div class="input-group mb-2">
<span class="input-group-text">@Name</span>
<span class="input-group-text">@(Name + " " + (Index+ 1))</span>
<input type="number" class="form-control" @bind="@CurrVal">
@* <InputDouble CssClass="form-control form-control text-end" Decimals="@CssDecimals()" Step="@CssStepNumber()" @bind-Value="@CurrVal"></InputDouble> *@
<select class="form-select" style="max-width:6rem; background-color:#e9ecef" @bind="@CurrType">
+6 -3
View File
@@ -540,9 +540,12 @@ namespace WebWindowComplex.Models
public void Remove()
{
ParentArea.AreaList.Remove(this);
Fill newFill = Fill.CreateFill(ParentArea, FillTypes.GLASS);
newFill.SetAreaType(AreaTypes.FILL);
ParentArea.AreaList.Add(newFill);
if(!(ParentArea is Fill))
{
Fill newFill = Fill.CreateFill(ParentArea, FillTypes.GLASS);
newFill.SetAreaType(AreaTypes.FILL);
ParentArea.AreaList.Add(newFill);
}
}
public List<SplitElementDimension> searchElemFromSubArea(int subArea)
+165 -158
View File
@@ -37,17 +37,17 @@
} *@
else
{
<div class="col-md-12 col-lg-6 d-flex flex-column">
<div class="d-flex flex-column">
<div class="card text-center table-svg shadow rounded">
<div class="card-header" style="background-color: #d5f1f2;">
<div class="card-header" style="background-color: #c5d6ed;">
<div class="row justify-content-between align-middle flex-wrap">
<div class="col-md-12 col-lg-6 d-grid px-2 d-md-flex justify-content-md-start flex-wrap">
<ul class="nav nav-tabs card-header-tabs">
<li class="nav-item m-1">
<button data-target="#Tree" class="@tabNavCss(CompileStep.Tree)" @onclick="() => NextStep(CompileStep.Tree)">Tree</button>
<button data-target="#Tree" class="@tabNavCss(CompileStep.Tree)" style="font-size: 1rem;" @onclick="() => NextStep(CompileStep.Tree)">Tree</button>
</li>
<li class="nav-item m-1">
<button data-target="#General" class="@tabNavCss(CompileStep.General)" @onclick="() => NextStep(CompileStep.General)">General</button>
<button data-target="#General" class="@tabNavCss(CompileStep.General)" style="font-size: 1rem;" @onclick="() => NextStep(CompileStep.General)">General</button>
</li>
@* @if (FrameWindow.Shape == Json.WindowConst.Shapes.ARC ||
FrameWindow.Shape == Json.WindowConst.Shapes.ARC_FULL ||
@@ -60,8 +60,8 @@
} *@
</ul>
</div>
<div class="col-md-12 col-lg-6 d-grid gap-1 d-md-flex justify-content-md-end align-items-center flex-wrap">
<div class="col d-flex justify-content-md-end">
<div class="col-md-12 col-lg-6 d-grid gap-4 px-4 d-md-flex justify-content-md-end align-items-center flex-wrap">
@* <div class="col d-flex justify-content-md-end">
<button class="btn btn-lg btn-primary" style="font-size: 1rem;" @onclick="DoReset">Reset</button>
</div>
<div class="col d-flex justify-content-md-end">
@@ -69,174 +69,181 @@
</div>
<div class="col d-flex justify-content-md-end">
<button class="btn btn-lg btn-primary" style="font-size: 1rem;" @onclick="DoClose">Close</button>
</div>
</div> *@
<button class="btn btn-lg btn-primary px-4" style="font-size: 1rem;" @onclick="DoReset">Reset</button>
<button class="btn btn-lg btn-primary px-4" style="font-size: 1rem;" @onclick="DoSave">Save</button>
<button class="btn btn-lg btn-primary px-4" style="font-size: 1rem;" @onclick="DoClose">Close</button>
</div>
</div>
</div>
<div class="card-body bg-transparent">
@if (currStep == CompileStep.Tree)
{
<CardTree ItemTableList="m_ItemTableList"
maxCol="m_maxCol"
RowCollapsedDict="RowCollapsed"
ChildDict="Child"
EC_NextStep="NextStepArgs"
EC_Collapsed="CollapsedRowTree">
</CardTree>
}
else if (currStep == CompileStep.Frame)
{
@if (m_CurrWindow != null)
{
m_PreviousWindow = m_CurrWindow;
}
<CascadingValue Value="baseUser" Name="User">
<CascadingValue Value="FrameWindow" Name="CurrFrameWindow">
<CascadingValue Value="m_SashList" Name="SashList">
<CascadingValue Value="m_SplitList" Name="SplitList">
<CardFrame EC_ReqResetDict="ReqResetDict"
EC_ReqOptionHw="UpdateHwOptionsFrame"
EC_ReqElement="UpdateElementFrame"
EC_UpdateFrame="UpdatePreviewFrame"
EC_ReqClose="ReturnTree">
</CardFrame>
</CascadingValue>
</CascadingValue>
</CascadingValue>
</CascadingValue>
}
else if (currStep == CompileStep.Split)
{
@if (currSplitIndex >= SplitList.Count || currSplitIndex == -1)
{
currStep = CompileStep.Tree;
}
else
{
<CascadingValue Value="baseUser" Name="User">
<CardSplit CurrSplit="SplitList[currSplitIndex]"
SashList="SashList"
SplitList="SplitList"
FrameWindow="FrameWindow"
EC_UpdateFrame="UpdatePreviewFrame"
EC_ReqResetDict="ReqResetDict"
EC_UpdateSplit="UpdatePreviewSplit"
EC_ReqElement="UpdateElementSplit"
EC_ReqClose="ReturnTree">
</CardSplit>
</CascadingValue>
}
}
else if (currStep == CompileStep.Sash)
{
@if (currSashIndex >= SashList.Count || currSashIndex == -1)
{
currStep = CompileStep.Tree;
}
else
{
<CascadingValue Value="baseUser" Name="User">
<CascadingValue Value="currLoading" Name="IsLoading">
<CascadingValue Value="SashList[currSashIndex]" Name="CurrSashGroup">
<CascadingValue Value="SashList" Name="SashList">
<CardSashGroup FrameWindow="FrameWindow"
EC_UpdateFrame="UpdatePreviewFrame"
EC_UpdateSashGroup="UpdatePreviewSashGroup"
EC_ReqResetDict="ReqResetDict"
EC_ReqOptionHw="UpdateHwOptionsSash"
EC_ReqFirstOptionHw="ReqFirstOptionHw"
EC_ReqElement="UpdateElementSash"
<div class="row justify-content-between align-middle flex-wrap">
<div class="col-md-6 col-lg-6 d-flex flex-column">
@if (currStep == CompileStep.Tree)
{
<CardTree ItemTableList="m_ItemTableList"
maxCol="m_maxCol"
RowCollapsedDict="RowCollapsed"
ChildDict="Child"
EC_NextStep="NextStepArgs"
EC_Collapsed="CollapsedRowTree">
</CardTree>
}
else if (currStep == CompileStep.Frame)
{
@if (m_CurrWindow != null)
{
m_PreviousWindow = m_CurrWindow;
}
<CascadingValue Value="baseUser" Name="User">
<CascadingValue Value="FrameWindow" Name="CurrFrameWindow">
<CascadingValue Value="m_SashList" Name="SashList">
<CascadingValue Value="m_SplitList" Name="SplitList">
<CardFrame EC_ReqResetDict="ReqResetDict"
EC_ReqOptionHw="UpdateHwOptionsFrame"
EC_ReqElement="UpdateElementFrame"
EC_UpdateFrame="UpdatePreviewFrame"
EC_ReqClose="ReturnTree">
</CardSashGroup>
</CardFrame>
</CascadingValue>
</CascadingValue>
</CascadingValue>
</CascadingValue>
</CascadingValue>
}
}
else if (currStep == CompileStep.Fill)
{
@if (currFillIndex >= FillList.Count || currFillIndex == -1)
{
currStep = CompileStep.Tree;
}
else
{
<CardFill CurrIndex="currFillIndex"
CurrFill="FillList[currFillIndex]"
User="baseUser"
EC_UpdateFill="UpdatePreviewFill"
EC_ReqClose="ReturnTree">
</CardFill>
<div class="card shadow-sm rounded mb-2">
<div class="card-body py-2">
<div class="d-flex justify-content-between align-items-center">
<div class="col-4 d-flex justify-content-left">
<h5 class="text-center text-nowrap">All fill</h5>
</div>
<div class="input-group mb-2 justify-content-center">
@if (baseUser)
{
<button class="@buttonFillCss(Json.WindowConst.FillTypes.GLASS)">All glass</button>
}
else
{
<button class="@buttonFillCss(Json.WindowConst.FillTypes.GLASS)" @onclick="() => ChangeAllFill(WebWindowComplex.Json.WindowConst.FillTypes.GLASS)">All glass</button>
}
</div>
<div class="input-group mb-2 justify-content-center">
@if (baseUser)
{
<button class="@buttonFillCss(Json.WindowConst.FillTypes.WOOD)">All wood</button>
}
else
{
<button class="@buttonFillCss(Json.WindowConst.FillTypes.WOOD)" @onclick="() => ChangeAllFill(WebWindowComplex.Json.WindowConst.FillTypes.WOOD)">All wood</button>
}
}
else if (currStep == CompileStep.Split)
{
@if (currSplitIndex >= SplitList.Count || currSplitIndex == -1)
{
currStep = CompileStep.Tree;
}
else
{
<CascadingValue Value="baseUser" Name="User">
<CardSplit CurrSplit="SplitList[currSplitIndex]"
SashList="SashList"
SplitList="SplitList"
FrameWindow="FrameWindow"
EC_UpdateFrame="UpdatePreviewFrame"
EC_ReqResetDict="ReqResetDict"
EC_UpdateSplit="UpdatePreviewSplit"
EC_ReqElement="UpdateElementSplit"
EC_ReqClose="ReturnTree">
</CardSplit>
</CascadingValue>
}
}
else if (currStep == CompileStep.Sash)
{
@if (currSashIndex >= SashList.Count || currSashIndex == -1)
{
currStep = CompileStep.Tree;
}
else
{
<CascadingValue Value="baseUser" Name="User">
<CascadingValue Value="currLoading" Name="IsLoading">
<CascadingValue Value="SashList[currSashIndex]" Name="CurrSashGroup">
<CascadingValue Value="SashList" Name="SashList">
<CardSashGroup FrameWindow="FrameWindow"
EC_UpdateFrame="UpdatePreviewFrame"
EC_UpdateSashGroup="UpdatePreviewSashGroup"
EC_ReqResetDict="ReqResetDict"
EC_ReqOptionHw="UpdateHwOptionsSash"
EC_ReqFirstOptionHw="ReqFirstOptionHw"
EC_ReqElement="UpdateElementSash"
EC_ReqClose="ReturnTree">
</CardSashGroup>
</CascadingValue>
</CascadingValue>
</CascadingValue>
</CascadingValue>
}
}
else if (currStep == CompileStep.Fill)
{
@if (currFillIndex >= FillList.Count || currFillIndex == -1)
{
currStep = CompileStep.Tree;
}
else
{
<CardFill CurrIndex="currFillIndex"
CurrFill="FillList[currFillIndex]"
User="baseUser"
EC_UpdateFill="UpdatePreviewFill"
EC_ReqClose="ReturnTree">
</CardFill>
<div class="card shadow-sm rounded mb-2">
<div class="card-body py-2">
<div class="d-flex justify-content-between align-items-center">
<div class="col-4 d-flex justify-content-left">
<h5 class="text-center text-nowrap">All fill</h5>
</div>
<div class="input-group mb-2 justify-content-center">
@if (baseUser)
{
<button class="@buttonFillCss(Json.WindowConst.FillTypes.GLASS)">All glass</button>
}
else
{
<button class="@buttonFillCss(Json.WindowConst.FillTypes.GLASS)" @onclick="() => ChangeAllFill(WebWindowComplex.Json.WindowConst.FillTypes.GLASS)">All glass</button>
}
</div>
<div class="input-group mb-2 justify-content-center">
@if (baseUser)
{
<button class="@buttonFillCss(Json.WindowConst.FillTypes.WOOD)">All wood</button>
}
else
{
<button class="@buttonFillCss(Json.WindowConst.FillTypes.WOOD)" @onclick="() => ChangeAllFill(WebWindowComplex.Json.WindowConst.FillTypes.WOOD)">All wood</button>
}
</div>
</div>
</div>
</div>
</div>
</div>
@if(!baseUser && SplittedList != null && SplittedList.Count > 0)
{
Splitted? currSplitted = SplittedList.Where(x => x.AreaList.First().Equals(FillList[currFillIndex])).FirstOrDefault();
@if(currSplitted != null)
{
@if (currSplitted.ParentArea != null && currSplitted.ParentWindow != null){
<AreaSplit SashList="SashList"
SplittedList="SplittedList"
CurrSplitted="currSplitted"
EC_UpdateSplitted="UpdatePreviewSplitted">
</AreaSplit>
@if(!baseUser && SplittedList != null && SplittedList.Count > 0)
{
Splitted? currSplitted = SplittedList.Where(x => x.AreaList.First().Equals(FillList[currFillIndex])).FirstOrDefault();
@if(currSplitted != null)
{
@if (currSplitted.ParentArea != null && currSplitted.ParentWindow != null){
<AreaSplit SashList="SashList"
SplittedList="SplittedList"
CurrSplitted="currSplitted"
EC_UpdateSplitted="UpdatePreviewSplitted">
</AreaSplit>
}
}
}
}
}
}
}
else if (currStep == CompileStep.General)
{
<General CurrWindow="m_CurrWindow"
ListPayload="ListPayload"
ListWarnings="listWarnings"
User="baseUser"
EC_UpdateGeneral="UpdatePreviewGeneral"
EC_ReqClose="ReturnTree">
</General>
}
@* else if (currStep == CompileStep.ArcElement)
{
<CardArcElement CurrFrame="FrameWindow"
SashList="m_SashList"
EC_UpdatePreview="UpdatePreviewFrame"
EC_ReqClose="ReturnTree">
</CardArcElement>
} *@
else if (currStep == CompileStep.General)
{
<General CurrWindow="m_CurrWindow"
ListPayload="ListPayload"
ListWarnings="listWarnings"
User="baseUser"
EC_UpdateGeneral="UpdatePreviewGeneral"
EC_ReqClose="ReturnTree">
</General>
}
@* else if (currStep == CompileStep.ArcElement)
{
<CardArcElement CurrFrame="FrameWindow"
SashList="m_SashList"
EC_UpdatePreview="UpdatePreviewFrame"
EC_ReqClose="ReturnTree">
</CardArcElement>
} *@
</div>
<div class="col-md-6 col-lg-6 d-flex flex-column">
@outSvg
</div>
</div>
</div>
</div>
</div>
<div class="col-md-12 col-lg-6 d-flex flex-column">
@outSvg
</div>
if (listWarnings != null && listWarnings.Count > 0)
{
<div class="alert alert-warning">
+4 -4
View File
@@ -1318,23 +1318,23 @@ namespace WebWindowComplex
if ((currSashIndex == 0 && Index == 0) || (currSashIndex == 1 && Index == 1))
return "nav-link active fw-bold";
else
return "nav-link text-secondary";
return "nav-link text-dark";
}
else if (testStep == CompileStep.Fill)
{
if ((currFillIndex == 0 && Index == 0) || (currFillIndex == 1 && Index == 1))
return "nav-link active fw-bold";
else
return "nav-link text-secondary";
return "nav-link text-dark";
}
else if (testStep == CompileStep.Split)
{
if ((currSplitIndex == 0 && Index == 0) || (currSplitIndex == 1 && Index == 1))
return "nav-link active fw-bold";
else
return "nav-link text-secondary";
return "nav-link text-dark";
}
return (testStep == currStep) ? "nav-link active fw-bold" : "nav-link text-secondary";
return (testStep == currStep) ? "nav-link active fw-bold" : "nav-link text-dark";
}
/// <summary>
+9 -1
View File
@@ -6,7 +6,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>3.1.2.1717</Version>
<Version>3.1.2.1816</Version>
<Authors>Annamaria Sassi</Authors>
<Company>Egalware</Company>
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
@@ -189,6 +189,14 @@