Aggiornati elenchi con bottoni
This commit is contained in:
@@ -3,17 +3,17 @@
|
||||
@if (!SashDimEditList.Contains(IndexSash))
|
||||
{
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div class="col-md-12 col-lg-6 d-grid px-2 d-md-flex justify-content-md-start flex-wrap">
|
||||
<div class="col-md-12 col-lg-4 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">
|
||||
<div class="col-md-12 col-lg-8 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">
|
||||
<button class="btn btn-outline-secondary dropdown-toggle btn-sm" type="button" @onclick="ToggleDropdown">
|
||||
Copy content
|
||||
</button>
|
||||
<ul class="dropdown-menu" style="min-width:7rem; max-width:10rem">
|
||||
<ul class="dropdown-menu @(isOpen ? "show" : "")" style="min-width:5rem; max-width:10rem">
|
||||
@for (int k = 0; k <= CurrSashGroup.SashList.Count - 1; k++)
|
||||
{
|
||||
@if (k != IndexSash)
|
||||
@@ -108,16 +108,11 @@
|
||||
<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 class="col-md-4">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AddSplitToSash()">Split</button>
|
||||
</div>
|
||||
<div class="col-md-4 px-2">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AddInglesinaToSash()">Inglesina</button>
|
||||
</div>
|
||||
}
|
||||
<button type="button" class="btn-close" aria-label="Close" @onclick="() => ClosePopup(IndexSash)"></button>
|
||||
@@ -187,8 +182,53 @@
|
||||
</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-lg-6 col-md-12">
|
||||
<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>Joints</h6>
|
||||
</div>
|
||||
@if (!User)
|
||||
{
|
||||
<div class="col d-flex justify-content-end align-items-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" type="button" @onclick="() => ChangeAll()">
|
||||
ChangeAll
|
||||
</button>
|
||||
</div>
|
||||
@if (ForceChangeAll)
|
||||
{
|
||||
<div class="row py-2">
|
||||
<div class="col-md-4">
|
||||
<button class="@ButtonJointCss(Json.WindowConst.Joints.ANGLED)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.ANGLED)">Angled</button>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<button class="@ButtonJointCss(Json.WindowConst.Joints.FULL_H)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.FULL_H)">Horizontal</button>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<button class="@ButtonJointCss(Json.WindowConst.Joints.FULL_V)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.FULL_V)">Vertical</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@* <div class="col d-flex justify-content-end align-items-center">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-outline-secondary dropdown-toggle btn-sm" type="button" data-bs-toggle="dropdown">
|
||||
Change
|
||||
</button>
|
||||
<ul class="dropdown-menu" style="min-width:5rem; max-width:10rem">
|
||||
<li><button class="@ButtonJointCss(Json.WindowConst.Joints.ANGLED)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.ANGLED)">Angled</button></li>
|
||||
<li><button class="@ButtonJointCss(Json.WindowConst.Joints.FULL_H)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.FULL_H)">Horizontal</button></li>
|
||||
<li><button class="@ButtonJointCss(Json.WindowConst.Joints.FULL_V)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.FULL_V)">Vertical</button></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div> *@
|
||||
}
|
||||
</div>
|
||||
@foreach (Joint joint in CurrSashDim.JointList)
|
||||
{
|
||||
<EditJoint CurrRec="joint" EC_Update="UpdateJoint"></EditJoint>
|
||||
}
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-12">
|
||||
<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>Element</h6>
|
||||
</div>
|
||||
@@ -200,35 +240,6 @@
|
||||
}
|
||||
</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>
|
||||
|
||||
@@ -404,6 +404,13 @@ namespace WebWindowComplex.Compo
|
||||
};
|
||||
_ = EC_EditView.InvokeAsync(args);
|
||||
}
|
||||
|
||||
private void ChangeAll()
|
||||
{
|
||||
ForceChangeAll = !ForceChangeAll;
|
||||
}
|
||||
|
||||
private bool ForceChangeAll = false;
|
||||
}
|
||||
|
||||
public class DataChangeMode {
|
||||
|
||||
@@ -99,27 +99,53 @@
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-6">
|
||||
<div class="row justify-content-between align-items-center" style="min-height: 2.5rem;">
|
||||
<div class="row justify-content-between align-items-center pb-2" style="min-height: 2.5rem;">
|
||||
<div class="col d-flex justify-content-start align-items-center">
|
||||
<h6 class="fw-bold">Joints</h6>
|
||||
</div>
|
||||
@if (!User)
|
||||
{
|
||||
<div class="col d-flex">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="@ButtonJointCss(Json.WindowConst.Joints.ANGLED)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.ANGLED)">Angled</button>
|
||||
</div>
|
||||
<div class="col d-flex justify-content-end align-items-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" type="button" @onclick="()=>ChangeAll()">
|
||||
ChangeAll
|
||||
</button>
|
||||
</div>
|
||||
<div class="col d-flex">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="@ButtonJointCss(Json.WindowConst.Joints.FULL_H)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.FULL_H)">Horizontal</button>
|
||||
@if (ForceChangeAll)
|
||||
{
|
||||
<div class="row py-2">
|
||||
<div class="col-md-4">
|
||||
<button class="@ButtonJointCss(Json.WindowConst.Joints.ANGLED)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.ANGLED)">Angled</button>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<button class="@ButtonJointCss(Json.WindowConst.Joints.FULL_H)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.FULL_H)">Horizontal</button>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<button class="@ButtonJointCss(Json.WindowConst.Joints.FULL_V)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.FULL_V)">Vertical</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-flex">
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="@ButtonJointCss(Json.WindowConst.Joints.FULL_V)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.FULL_V)">Vertical</button>
|
||||
}
|
||||
@* <div class="col d-flex justify-content-end align-items-center">
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text">All</label>
|
||||
<select class="form-select" @bind="ChangeAllJoints">
|
||||
<option value="@(Json.WindowConst.Joints.ANGLED)">Angled</option>
|
||||
<option value="@(Json.WindowConst.Joints.FULL_H)">Horizontal</option>
|
||||
<option value="@(Json.WindowConst.Joints.FULL_V)">Vertical</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div> *@
|
||||
@* <div class="col d-flex justify-content-end align-items-center">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-outline-secondary dropdown-toggle btn-sm" type="button" data-bs-toggle="dropdown">
|
||||
Change
|
||||
</button>
|
||||
<ul class="dropdown-menu" style="min-width:5rem; max-width:10rem">
|
||||
<li><button class="@ButtonJointCss(Json.WindowConst.Joints.ANGLED)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.ANGLED)">Angled</button></li>
|
||||
<li><button class="@ButtonJointCss(Json.WindowConst.Joints.FULL_H)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.FULL_H)">Horizontal</button></li>
|
||||
<li><button class="@ButtonJointCss(Json.WindowConst.Joints.FULL_V)" @onclick="() => ChangeAllJoints(WebWindowComplex.Json.WindowConst.Joints.FULL_V)">Vertical</button></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div> *@
|
||||
}
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
@@ -151,6 +151,32 @@ namespace WebWindowComplex.Compo
|
||||
}
|
||||
}
|
||||
|
||||
//protected WindowConst.Joints? ChangeAllJoints
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// WindowConst.Joints j = CurrFrameWindow.JointList.First().SelJointType;
|
||||
// foreach (Joint joint in CurrFrameWindow.JointList)
|
||||
// {
|
||||
// if (joint.SelJointType != j)
|
||||
// return null;
|
||||
// }
|
||||
// return j;
|
||||
// }
|
||||
// set
|
||||
// {
|
||||
// if(value != null)
|
||||
// {
|
||||
// foreach (Joint joint in CurrFrameWindow.JointList)
|
||||
// {
|
||||
// joint.SelJointType = (WindowConst.Joints)value;
|
||||
// }
|
||||
// var args = new DataUpdateFrame() { currFrame = CurrFrameWindow, svgNoHw = false };
|
||||
// _= EC_UpdateFrame.InvokeAsync(args);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Private Methods
|
||||
@@ -303,6 +329,13 @@ namespace WebWindowComplex.Compo
|
||||
}
|
||||
}
|
||||
|
||||
private void ChangeAll()
|
||||
{
|
||||
ForceChangeAll = !ForceChangeAll;
|
||||
}
|
||||
|
||||
private bool ForceChangeAll = false;
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per la visualizzazione dei pulsanti joint
|
||||
/// </summary>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
</div>
|
||||
<div class="card-body py-2">
|
||||
<div class="row pt-2">
|
||||
<div class="col-md-12 col-lg-4">
|
||||
<div class="col-md-12 col-lg-6">
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text">Qty sash</span>
|
||||
@if (User)
|
||||
@@ -35,7 +35,7 @@
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-4">
|
||||
<div class="col-md-12 col-lg-6">
|
||||
<div class="input-group mb-2">
|
||||
@if (User)
|
||||
{
|
||||
@@ -54,7 +54,7 @@
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-4">
|
||||
<div class="col-md-12 col-lg-6">
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text">Qty bottom rail</span>
|
||||
@if (User)
|
||||
@@ -145,18 +145,48 @@
|
||||
|
||||
<div class="card shadow-sm rounded mb-4">
|
||||
<div class="card-body py-2">
|
||||
<div class="d-flex justify-content-end">
|
||||
<div class="dropdown px-4">
|
||||
<div class="d-flex justify-content-end align-items-center">
|
||||
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#MeasureSettingModal">
|
||||
<i class="fa-solid fa-gear"></i>
|
||||
</button>
|
||||
<div class="modal fade" id="MeasureSettingModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5" id="staticBackdropLabel">Measure settings</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="d-flex justify-content-between align-items-center pb-2">
|
||||
<div class="col-md-6 px-2">
|
||||
<select class="form-select" @bind="@MeasureType">
|
||||
<option value="@MeasureTypes.ABSOLUTE">Absolute (mm)</option>
|
||||
<option value="@MeasureTypes.PROPORTIONAL">Proportional (*)</option>
|
||||
<option value="@MeasureTypes.PERCENTAGE">Percentage (%)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6 px-2">
|
||||
<select class="form-select" @bind="@ChangeType">
|
||||
<option value="0">Sash</option>
|
||||
<option value="1">Glass</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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="@MeasureTypeCss(MeasureTypes.ABSOLUTE)" @onclick="() => SetMeasureType(MeasureTypes.ABSOLUTE)">Absolute</button></li>
|
||||
<li><button class="@MeasureTypeCss(MeasureTypes.PROPORTIONAL)" @onclick="() => SetMeasureType(MeasureTypes.PROPORTIONAL)">Proportional</button></li>
|
||||
<li><button class="@MeasureTypeCss(MeasureTypes.PERCENTAGE)" @onclick="() => SetMeasureType(MeasureTypes.PERCENTAGE)">Percentage</button></li>
|
||||
<li><button class="@MeasureTypeCss(MeasureTypes.ABSOLUTE)" @onclick="() => SetMeasureType(MeasureTypes.PROPORTIONAL)">Proportional</button></li>
|
||||
<li><button class="@MeasureTypeCss(MeasureTypes.ABSOLUTE)" @onclick="() => SetMeasureType(MeasureTypes.PERCENTAGE)">Percentage</button></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="dropdown">
|
||||
</div> *@
|
||||
@* <div class="dropdown">
|
||||
<button class="btn btn-outline-secondary dropdown-toggle btn-sm" type="button" data-bs-toggle="dropdown">
|
||||
Measure type
|
||||
</button>
|
||||
@@ -164,7 +194,7 @@
|
||||
<li><button class="@TypeDimensionCss(false)" @onclick="() => ChangeTypeDimension(false)">Sash</button></li>
|
||||
<li><button class="@TypeDimensionCss(true)" @onclick="() => ChangeTypeDimension(true)">Glass</button></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div> *@
|
||||
</div>
|
||||
@for (int i = 0; i < CurrSashGroup.SashList.Count; i++)
|
||||
{
|
||||
|
||||
@@ -194,14 +194,74 @@ namespace WebWindowComplex.Compo
|
||||
}
|
||||
}
|
||||
|
||||
protected MeasureTypes MeasureType
|
||||
{
|
||||
get
|
||||
{
|
||||
MeasureTypes type = CurrSashGroup.SashList.First().SelMeasureType;
|
||||
for (int i = 1; i < CurrSashGroup.SashList.Count; i++)
|
||||
{
|
||||
if(CurrSashGroup.SashList.ElementAt(i).SelMeasureType != type)
|
||||
return MeasureTypes.NULL;
|
||||
}
|
||||
return type;
|
||||
}
|
||||
set
|
||||
{
|
||||
for (int i = 0; i < CurrSashGroup.SashList.Count; i++)
|
||||
{
|
||||
CurrSashGroup.SashList.ElementAt(i).SelMeasureTypeIndex = (int)value;
|
||||
}
|
||||
var args = new DataUpdateSash
|
||||
{
|
||||
currSash = CurrSashGroup,
|
||||
noSvg = true
|
||||
};
|
||||
_= EC_UpdateSashGroup.InvokeAsync(args);
|
||||
}
|
||||
}
|
||||
|
||||
protected int ChangeType
|
||||
{
|
||||
get
|
||||
{
|
||||
return CurrSashGroup.bIsDimensionLight ? 1 : 0;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value == 1)
|
||||
CurrSashGroup.bIsDimensionLight = true;
|
||||
else
|
||||
CurrSashGroup.bIsDimensionLight = false;
|
||||
foreach (var CurrSashDim in CurrSashGroup.SashList)
|
||||
{
|
||||
if (CurrSashDim.SelMeasureType is MeasureTypes.ABSOLUTE)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per rimuovere area corrente
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <summary>
|
||||
/// Metodo per rimuovere area corrente
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected async Task RemoveArea()
|
||||
{
|
||||
CurrSashGroup.Remove();
|
||||
@@ -264,20 +324,20 @@ namespace WebWindowComplex.Compo
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
/// <returns></returns>
|
||||
protected Task SetMeasureType(MeasureTypes type)
|
||||
{
|
||||
//isOpen = !isOpen;
|
||||
for (int i = 0; i < CurrSashGroup.SashList.Count; i++)
|
||||
{
|
||||
CurrSashGroup.SashList.ElementAt(i).SelMeasureTypeIndex = (int)type;
|
||||
}
|
||||
var args = new DataUpdateSash
|
||||
{
|
||||
currSash = CurrSashGroup,
|
||||
noSvg = true
|
||||
};
|
||||
return EC_UpdateSashGroup.InvokeAsync(args);
|
||||
}
|
||||
//protected Task SetMeasureType(MeasureTypes type)
|
||||
//{
|
||||
// //isOpen = !isOpen;
|
||||
// for (int i = 0; i < CurrSashGroup.SashList.Count; i++)
|
||||
// {
|
||||
// CurrSashGroup.SashList.ElementAt(i).SelMeasureTypeIndex = (int)type;
|
||||
// }
|
||||
// var args = new DataUpdateSash
|
||||
// {
|
||||
// currSash = CurrSashGroup,
|
||||
// noSvg = true
|
||||
// };
|
||||
// return EC_UpdateSashGroup.InvokeAsync(args);
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per aggiornare la sash dimension
|
||||
|
||||
@@ -12,6 +12,41 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body py-2">
|
||||
@*<div class="d-flex justify-content-end align-items-center pb-2">
|
||||
<div class="col-md-2">
|
||||
Misure:
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<select class="form-select" @bind="@MeasureType">
|
||||
<option value="@MeasureTypes.ABSOLUTE">Absolute (mm)</option>
|
||||
<option value="@MeasureTypes.PROPORTIONAL">Proportional (*)</option>
|
||||
<option value="@MeasureTypes.PERCENTAGE">Percentage (%)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<select class="form-select">
|
||||
<option value="1">Glass</option>
|
||||
</select>
|
||||
</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="@MeasureTypeCss(MeasureTypes.ABSOLUTE)" @onclick="() => SetMeasureType(MeasureTypes.ABSOLUTE)">Absolute</button></li>
|
||||
<li><button class="@MeasureTypeCss(MeasureTypes.PROPORTIONAL)" @onclick="() => SetMeasureType(MeasureTypes.PROPORTIONAL)">Proportional</button></li>
|
||||
<li><button class="@MeasureTypeCss(MeasureTypes.PERCENTAGE)" @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 fw-bold">Glass</button></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div> *@
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<h5>Split</h5>
|
||||
@if (!User)
|
||||
@@ -26,23 +61,34 @@
|
||||
<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="@MeasureTypeCss(MeasureTypes.ABSOLUTE)" @onclick="() => SetMeasureType(MeasureTypes.ABSOLUTE)">Absolute</button></li>
|
||||
<li><button class="@MeasureTypeCss(MeasureTypes.PROPORTIONAL)" @onclick="() => SetMeasureType(MeasureTypes.PROPORTIONAL)">Proportional</button></li>
|
||||
<li><button class="@MeasureTypeCss(MeasureTypes.PERCENTAGE)" @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 fw-bold">Glass</button></li>
|
||||
</ul>
|
||||
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#MeasureSettingModal">
|
||||
<i class="fa-solid fa-gear"></i>
|
||||
</button>
|
||||
<div class="modal fade" id="MeasureSettingModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5" id="staticBackdropLabel">Measure settings</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="d-flex justify-content-between align-items-center pb-2">
|
||||
<div class="col-md-6 px-2">
|
||||
<select class="form-select" @bind="@MeasureType">
|
||||
<option value="@MeasureTypes.ABSOLUTE">Absolute (mm)</option>
|
||||
<option value="@MeasureTypes.PROPORTIONAL">Proportional (*)</option>
|
||||
<option value="@MeasureTypes.PERCENTAGE">Percentage (%)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6 px-2">
|
||||
<select class="form-select">
|
||||
<option value="1">Glass</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
@@ -261,6 +261,21 @@ namespace WebWindowComplex.Compo
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task UpdateSplit(DataUpdateSplit updRec)
|
||||
{
|
||||
if (updRec.currSplit != null)
|
||||
{
|
||||
CurrSplit = updRec.currSplit;
|
||||
var args = new DataUpdateSplit()
|
||||
{
|
||||
currSplit = CurrSplit,
|
||||
noSvg = updRec.noSvg
|
||||
};
|
||||
//await EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req = DataAction.ResetDictShape });
|
||||
await EC_UpdateSplit.InvokeAsync(args);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per cambiare la dimensione principale
|
||||
/// </summary>
|
||||
@@ -332,6 +347,48 @@ namespace WebWindowComplex.Compo
|
||||
isOpen = !isOpen;
|
||||
}
|
||||
|
||||
protected MeasureTypes MeasureType
|
||||
{
|
||||
get
|
||||
{
|
||||
MeasureTypes type = MeasureTypes.NULL;
|
||||
if (CurrSplit.SplitVertList.Count > 0)
|
||||
type = CurrSplit.SplitVertList.First().SelMeasureType;
|
||||
else
|
||||
type = CurrSplit.SplitHorizList.First().SelMeasureType;
|
||||
for (int i = 1; i < CurrSplit.SplitVertList.Count; i++)
|
||||
{
|
||||
if (CurrSplit.SplitVertList.ElementAt(i).SelMeasureType != type)
|
||||
return MeasureTypes.NULL;
|
||||
}
|
||||
for (int i = 1; i < CurrSplit.SplitHorizList.Count; i++)
|
||||
{
|
||||
if (CurrSplit.SplitHorizList.ElementAt(i).SelMeasureType != type)
|
||||
return MeasureTypes.NULL;
|
||||
}
|
||||
return type;
|
||||
}
|
||||
set
|
||||
{
|
||||
foreach (var item in CurrSplit.SplitVertList)
|
||||
{
|
||||
item.SelMeasureType = value;
|
||||
//item.SetSelMeasureType(type);
|
||||
}
|
||||
foreach (var item in CurrSplit.SplitHorizList)
|
||||
{
|
||||
item.SelMeasureType = value;
|
||||
//item.SetSelMeasureType(type);
|
||||
}
|
||||
var args = new DataUpdateSplit()
|
||||
{
|
||||
currSplit = CurrSplit,
|
||||
noSvg = true
|
||||
};
|
||||
_= EC_UpdateSplit.InvokeAsync(args);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per cambiare il tipo di misura di tutti gli SplitDimension
|
||||
/// </summary>
|
||||
|
||||
@@ -397,7 +397,7 @@ namespace WebWindowComplex
|
||||
protected Task DoClose()
|
||||
{
|
||||
editLock = false;
|
||||
Log.Info("Richietsa Chiusura");
|
||||
Log.Info("Richiesta Chiusura");
|
||||
//return EC_OnClose.InvokeAsync(false);
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
@@ -437,7 +437,7 @@ namespace WebWindowComplex
|
||||
// verifico variazione JWD
|
||||
if (!prevJwd.Equals(CurrJwd) || doForce || prevReq != (int)DataReq.ReqSvg)
|
||||
{
|
||||
Log.Info("Richietsa svg");
|
||||
Log.Info("Richiesta svg");
|
||||
prevJwd = CurrJwd;
|
||||
prevReq = (int)DataReq.ReqSvg;
|
||||
Dictionary<string, string> Args = new Dictionary<string, string>();
|
||||
@@ -466,7 +466,7 @@ namespace WebWindowComplex
|
||||
// verifico variazione JWD
|
||||
if (!prevJwd.Equals(CurrJwd) || isFirst || prevReq != (int)DataReq.ReqHwOpt)
|
||||
{
|
||||
Log.Info("Richietsa Hardware option");
|
||||
Log.Info("Richiesta Hardware option");
|
||||
prevJwd = CurrJwd;
|
||||
prevReq = (int)DataReq.ReqHwOpt;
|
||||
Dictionary<string, string> Args = new Dictionary<string, string>();
|
||||
@@ -498,7 +498,7 @@ namespace WebWindowComplex
|
||||
if (!prevJwd.Equals(CurrJwd) || prevReq != (int)DataReq.ReqShape)
|
||||
//if (!prevLiveData.CurrJwd.Equals(CurrJwd))
|
||||
{
|
||||
Log.Info("Richietsa shape");
|
||||
Log.Info("Richiesta shape");
|
||||
prevJwd = CurrJwd;
|
||||
prevReq = (int)DataReq.ReqShape;
|
||||
Dictionary<string, string> Args = new Dictionary<string, string>();
|
||||
@@ -528,7 +528,7 @@ namespace WebWindowComplex
|
||||
// verifico variazione JWD
|
||||
if (!prevJwd.Equals(CurrJwd) || prevReq != (int)DataReq.ReqElement)
|
||||
{
|
||||
Log.Info("Richietsa Profili Elementi");
|
||||
Log.Info("Richiesta Profili Elementi");
|
||||
prevJwd = CurrJwd;
|
||||
prevReq = (int)DataReq.ReqElement;
|
||||
Dictionary<string, string> Args = new Dictionary<string, string>();
|
||||
@@ -547,7 +547,7 @@ namespace WebWindowComplex
|
||||
/// </summary>
|
||||
protected Task DoReset()
|
||||
{
|
||||
Log.Info("Richietsa reset");
|
||||
Log.Info("Richiesta reset");
|
||||
return Task.CompletedTask;
|
||||
// Da fare
|
||||
}
|
||||
@@ -559,7 +559,7 @@ namespace WebWindowComplex
|
||||
protected Task DoSave()
|
||||
{
|
||||
editLock = false;
|
||||
Log.Info("Richietsa Salvataggio");
|
||||
Log.Info("Richiesta Salvataggio");
|
||||
//return EC_OnClose.InvokeAsync(false);
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
@@ -654,7 +654,7 @@ namespace WebWindowComplex
|
||||
{
|
||||
listErrLink.Add("Window", $"Deserializing Error:{Environment.NewLine}{ex}");
|
||||
Log.Error($"Errore nel deserializzare jwd: {ex.Message}");
|
||||
// uso un oggetto "basico" per non fermarmi
|
||||
// costruisco una finestra base
|
||||
WindowFromJson = BuildFrameDefault();
|
||||
await DoPreviewSvg(true);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>3.1.3.616</Version>
|
||||
<Version>3.1.3.915</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
|
||||
@@ -316,6 +316,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user