Aggiunto arc element per Frame e Sash (da rivedere)
This commit is contained in:
@@ -127,7 +127,8 @@ namespace Test.UI.Components.Pages
|
||||
{
|
||||
ConfInit();
|
||||
//InitialJwd = File.ReadAllText("Data\\FinestraSplitVert.jwd");
|
||||
InitialJwd = File.ReadAllText("Data\\AntaDoppia.jwd");
|
||||
//InitialJwd = File.ReadAllText("Data\\AntaDoppia.jwd");
|
||||
InitialJwd = File.ReadAllText("Data\\ArcoAntaDoppia.jwd");
|
||||
currJwd = InitialJwd;
|
||||
// rileggo altri dati
|
||||
await ReloadData();
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
{
|
||||
"ProfilePath": "Profilo78",
|
||||
"Material": "Pino",
|
||||
"ColorMaterial": "Black",
|
||||
"Glass": "Vetro BE 2S 4T/16/4T",
|
||||
"AreaList": [
|
||||
{
|
||||
"Shape": "ARC",
|
||||
"DimensionList": [
|
||||
{
|
||||
"Index": 1,
|
||||
"Name": "Width",
|
||||
"Value": 800.0
|
||||
},
|
||||
{
|
||||
"Index": 2,
|
||||
"Name": "Height",
|
||||
"Value": 1500.0
|
||||
},
|
||||
{
|
||||
"Index": 3,
|
||||
"Name": "Full Height",
|
||||
"Value": 1800.0
|
||||
}
|
||||
],
|
||||
"JointList": [
|
||||
{
|
||||
"Index": 1,
|
||||
"JointType": "FULL_H"
|
||||
},
|
||||
{
|
||||
"Index": 2,
|
||||
"JointType": "FULL_H"
|
||||
},
|
||||
{
|
||||
"Index": 3,
|
||||
"JointType": "FULL_V"
|
||||
},
|
||||
{
|
||||
"Index": 4,
|
||||
"JointType": "FULL_V"
|
||||
}
|
||||
],
|
||||
"BottomRail": false,
|
||||
"BottomRailQty": 0,
|
||||
"ArcElement": {
|
||||
"Section": 10.0,
|
||||
"CutEdge": true,
|
||||
"IsAlign": true
|
||||
},
|
||||
"GroupId": 1,
|
||||
"AreaList": [
|
||||
{
|
||||
"IsSashVertical": true,
|
||||
"ArcElement": {
|
||||
"Section": 10.0,
|
||||
"CutEdge": true,
|
||||
"IsAlign": true
|
||||
},
|
||||
"SashList": [
|
||||
{
|
||||
"SashId": 1,
|
||||
"OpeningType": "TILTTURN_LEFT",
|
||||
"MeasureType": "PERCENTAGE",
|
||||
"Dimension": 50.0,
|
||||
"HasHandle": true,
|
||||
"JointList": [
|
||||
{
|
||||
"Index": 1,
|
||||
"JointType": "FULL_V"
|
||||
},
|
||||
{
|
||||
"Index": 2,
|
||||
"JointType": "FULL_V"
|
||||
},
|
||||
{
|
||||
"Index": 3,
|
||||
"JointType": "FULL_V"
|
||||
},
|
||||
{
|
||||
"Index": 4,
|
||||
"JointType": "FULL_V"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"SashId": 2,
|
||||
"OpeningType": "TURNONLY_RIGHT",
|
||||
"MeasureType": "PERCENTAGE",
|
||||
"Dimension": 50.0,
|
||||
"HasHandle": false,
|
||||
"JointList": [
|
||||
{
|
||||
"Index": 1,
|
||||
"JointType": "FULL_V"
|
||||
},
|
||||
{
|
||||
"Index": 2,
|
||||
"JointType": "FULL_V"
|
||||
},
|
||||
{
|
||||
"Index": 3,
|
||||
"JointType": "FULL_V"
|
||||
},
|
||||
{
|
||||
"Index": 4,
|
||||
"JointType": "FULL_V"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"SashType": "NULL",
|
||||
"BottomRail": false,
|
||||
"BottomRailQty": 0,
|
||||
"Hardware": "000644",
|
||||
"HwOptionList": [],
|
||||
"GroupId": 2,
|
||||
"AreaList": [
|
||||
{
|
||||
"GroupId": 4,
|
||||
"AreaList": [
|
||||
{
|
||||
"FillType": "GLASS",
|
||||
"GroupId": 3,
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLITTED"
|
||||
},
|
||||
{
|
||||
"GroupId": 5,
|
||||
"AreaList": [
|
||||
{
|
||||
"FillType": "GLASS",
|
||||
"GroupId": 6,
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLITTED"
|
||||
}
|
||||
],
|
||||
"AreaType": "SASH"
|
||||
}
|
||||
],
|
||||
"AreaType": "FRAME"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -43,6 +43,9 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="Data\ArcoAntaDoppia.jwd">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Data\AntaDoppia.jwd">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
|
||||
<div class="col-sm-6 my-2">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<h6 class="fw-bold">Frame</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body py-2">
|
||||
<div class="row">
|
||||
<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="NumTrochetti" checked="@insertQty" @onclick="() => IsCheckedQty()">
|
||||
</div>
|
||||
<div class="px-2">
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text">Qty element</span>
|
||||
@if (insertQty)
|
||||
{
|
||||
<input type="number" class="form-control" @bind="@ArcElementQty">
|
||||
}
|
||||
else
|
||||
{
|
||||
<input type="number" class="form-control" disabled>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</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="Estremità" checked="@CurrFrame.FrameArcElem.bCutEdge" @onclick="() => IsCheckCutEdge()">
|
||||
</div>
|
||||
<div class="px-2">
|
||||
<label class="form-check-label fs-6 text-dark">Taglio estremità</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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="Sezione" checked="@(!insertQty)" @onclick="() => IsCheckedQty()">
|
||||
</div>
|
||||
<div class="px-2">
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text">Section</span>
|
||||
@if (!insertQty)
|
||||
{
|
||||
<input type="number" class="form-control" @bind="@ArcSection">
|
||||
}
|
||||
else
|
||||
{
|
||||
<input type="number" class="form-control" disabled>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</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="Allineamento" checked="@CurrFrame.FrameArcElem.bIsAlign" @onclick="() => IsCheckAlign()">
|
||||
</div>
|
||||
<div class="px-2">
|
||||
<label class="form-check-label fs-6 text-dark">Allineamento</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,81 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using System.Runtime.CompilerServices;
|
||||
using WebWindowComplex.DTO;
|
||||
using WebWindowComplex.Models;
|
||||
|
||||
namespace WebWindowComplex.Compo
|
||||
{
|
||||
public partial class AreaFrameArcElem
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[Parameter]
|
||||
public Frame CurrFrame { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<Frame> EC_UpdatePreview { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected int ArcElementQty
|
||||
{
|
||||
get => CurrFrame.FrameArcElem.nQty;
|
||||
set
|
||||
{
|
||||
CurrFrame.FrameArcElem.nQty = value;
|
||||
_ = EC_UpdatePreview.InvokeAsync(CurrFrame);
|
||||
}
|
||||
}
|
||||
|
||||
protected double ArcSection
|
||||
{
|
||||
get => CurrFrame.FrameArcElem.nSection;
|
||||
set
|
||||
{
|
||||
CurrFrame.FrameArcElem.nSection = value;
|
||||
_ = EC_UpdatePreview.InvokeAsync(CurrFrame);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void IsCheckedQty()
|
||||
{
|
||||
insertQty = !insertQty;
|
||||
}
|
||||
|
||||
protected void IsCheckCutEdge()
|
||||
{
|
||||
CurrFrame.FrameArcElem.bCutEdge = !CurrFrame.FrameArcElem.bCutEdge;
|
||||
_ = EC_UpdatePreview.InvokeAsync(CurrFrame);
|
||||
}
|
||||
|
||||
protected void IsCheckAlign()
|
||||
{
|
||||
CurrFrame.FrameArcElem.bIsAlign = !CurrFrame.FrameArcElem.bIsAlign;
|
||||
_ = EC_UpdatePreview.InvokeAsync(CurrFrame);
|
||||
}
|
||||
|
||||
protected string IsUsedQty()
|
||||
{
|
||||
if (insertQty)
|
||||
return "form-control";
|
||||
else
|
||||
return "form-control disabled";
|
||||
}
|
||||
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private bool insertQty = false;
|
||||
|
||||
#endregion Private Fields
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,26 +4,29 @@
|
||||
<div class="col-sm-6 my-2">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<h6 class="fw-bold">Sash @(CurrSashGroup.SashList.Count == 1 ? "" : (IndexSash + 1))</h6>
|
||||
<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">
|
||||
@for (int k = 0; k <= CurrSashGroup.SashList.Count - 1; k++)
|
||||
{
|
||||
@if (k != IndexSash)
|
||||
@if(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">
|
||||
@for (int k = 0; k <= CurrSashGroup.SashList.Count - 1; k++)
|
||||
{
|
||||
int IndexCopy = k;
|
||||
int IndexModify = IndexSash;
|
||||
<li>
|
||||
<button class="dropdown-item" @onclick="() => CopyContentSash(IndexCopy, IndexModify)">
|
||||
Sash @(k + 1)
|
||||
</button>
|
||||
</li>
|
||||
@if (k != IndexSash)
|
||||
{
|
||||
int IndexCopy = k;
|
||||
int IndexModify = IndexSash;
|
||||
<li>
|
||||
<button class="dropdown-item" @onclick="() => CopyContentSash(IndexCopy, IndexModify)">
|
||||
Sash @(k + 1)
|
||||
</button>
|
||||
</li>
|
||||
}
|
||||
}
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
<button class="btn btn-primary btn-sm" type="button" @onclick="() => doEdit(IndexSash)">Edit</button>
|
||||
</div>
|
||||
<div class="input-group mb-2 mt-2">
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace WebWindowComplex.Compo
|
||||
{
|
||||
switch (CurrSashDim.MeasureType)
|
||||
{
|
||||
case Json.WindowConst.MeasureTypes.ABSOLUT:
|
||||
case Json.WindowConst.MeasureTypes.ABSOLUTE:
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
|
||||
<div class="col-sm-6 my-2">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<h6 class="fw-bold">Sash</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body py-2">
|
||||
<div class="row">
|
||||
<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="NumTrochetti" checked="@insertQty" @onclick="() => IsCheckedQty()">
|
||||
</div>
|
||||
<div class="px-2">
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text">Qty element</span>
|
||||
@if (insertQty)
|
||||
{
|
||||
<input type="number" class="form-control" @bind="@ArcElementQty">
|
||||
}
|
||||
else
|
||||
{
|
||||
<input type="number" class="form-control" disabled>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</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="Estremità" checked="@CurrSashGroup.SashArcElem.bCutEdge" @onclick="() => IsCheckCutEdge()">
|
||||
</div>
|
||||
<div class="px-2">
|
||||
<label class="form-check-label fs-6 text-dark">Taglio estremità</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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="Sezione" checked="@(!insertQty)" @onclick="() => IsCheckedQty()">
|
||||
</div>
|
||||
<div class="px-2">
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text">Section</span>
|
||||
@if (!insertQty)
|
||||
{
|
||||
<input type="number" class="form-control" @bind="@ArcSection">
|
||||
}
|
||||
else
|
||||
{
|
||||
<input type="number" class="form-control" disabled>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,75 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using System.Runtime.CompilerServices;
|
||||
using WebWindowComplex.DTO;
|
||||
using WebWindowComplex.Models;
|
||||
|
||||
namespace WebWindowComplex.Compo
|
||||
{
|
||||
public partial class AreaSashArcElem
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[Parameter]
|
||||
public Sash CurrSashGroup { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<Sash> EC_UpdatePreview { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected int ArcElementQty
|
||||
{
|
||||
get => CurrSashGroup.SashArcElem.nQty;
|
||||
set
|
||||
{
|
||||
CurrSashGroup.SashArcElem.nQty = value;
|
||||
_ = EC_UpdatePreview.InvokeAsync(CurrSashGroup);
|
||||
}
|
||||
}
|
||||
|
||||
protected double ArcSection
|
||||
{
|
||||
get => CurrSashGroup.SashArcElem.nSection;
|
||||
set
|
||||
{
|
||||
CurrSashGroup.SashArcElem.nSection = value;
|
||||
_ = EC_UpdatePreview.InvokeAsync(CurrSashGroup);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void IsCheckedQty()
|
||||
{
|
||||
insertQty = !insertQty;
|
||||
}
|
||||
|
||||
protected void IsCheckCutEdge()
|
||||
{
|
||||
CurrSashGroup.SashArcElem.bCutEdge = !CurrSashGroup.SashArcElem.bCutEdge;
|
||||
_ = EC_UpdatePreview.InvokeAsync(CurrSashGroup);
|
||||
}
|
||||
|
||||
protected string IsUsedQty()
|
||||
{
|
||||
if (insertQty)
|
||||
return "form-control";
|
||||
else
|
||||
return "form-control disabled";
|
||||
}
|
||||
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private bool insertQty = false;
|
||||
|
||||
#endregion Private Fields
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<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="px-2">
|
||||
<h5>Arc Element</h5>
|
||||
</div>
|
||||
<div class="px-2">
|
||||
<button class="btn btn-close" @onclick="ReqClose"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body py-2">
|
||||
<div class="row">
|
||||
<AreaFrameArcElem CurrFrame="CurrFrame"
|
||||
EC_UpdatePreview ="UpdatePreview">
|
||||
</AreaFrameArcElem>
|
||||
|
||||
@foreach (var sashGroup in SashList)
|
||||
{
|
||||
<hr />
|
||||
<AreaSashArcElem CurrSashGroup="sashGroup"
|
||||
EC_UpdatePreview="UpdatePreviewSash">
|
||||
</AreaSashArcElem>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,60 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WebWindowComplex.DTO;
|
||||
using WebWindowComplex.Models;
|
||||
|
||||
namespace WebWindowComplex.Compo
|
||||
{
|
||||
public partial class CardArcElement
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Finestra corrente
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public Frame CurrFrame { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Lista sash group
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public List<Sash> SashList { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<DataUpdateFrame> EC_UpdatePreview { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<bool> EC_ReqClose { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
private async Task UpdatePreview()
|
||||
{
|
||||
var args = new DataUpdateFrame
|
||||
{
|
||||
currFrame = CurrFrame
|
||||
};
|
||||
await EC_UpdatePreview.InvokeAsync(args);
|
||||
}
|
||||
|
||||
private async Task UpdatePreviewSash(Sash CurrSashGRoup)
|
||||
{
|
||||
var currRec = SashList.First(x => x.GroupId == CurrSashGRoup.GroupId);
|
||||
if (currRec != null)
|
||||
{
|
||||
currRec = CurrSashGRoup;
|
||||
var args = new DataUpdateFrame
|
||||
{
|
||||
currFrame = CurrFrame
|
||||
};
|
||||
await EC_UpdatePreview.InvokeAsync(args);
|
||||
}
|
||||
}
|
||||
|
||||
private void ReqClose()
|
||||
{
|
||||
_ = EC_ReqClose.InvokeAsync(true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -110,7 +110,7 @@
|
||||
</button>
|
||||
<ul class="dropdown-menu @(isOpen ? "show" : "")" style="min-width:5rem; max-width:10rem">
|
||||
<li>
|
||||
<button class="dropdown-item" @onclick="() => SetMeasureType(MeasureTypes.ABSOLUT)">
|
||||
<button class="dropdown-item" @onclick="() => SetMeasureType(MeasureTypes.ABSOLUTE)">
|
||||
Absolute
|
||||
</button>
|
||||
</li>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</button>
|
||||
<ul class="dropdown-menu @(isOpen ? "show" : "")" style="min-width:5rem; max-width:10rem">
|
||||
<li>
|
||||
<button class="dropdown-item" @onclick="() => SetMeasureType(MeasureTypes.ABSOLUT)">
|
||||
<button class="dropdown-item" @onclick="() => SetMeasureType(MeasureTypes.ABSOLUTE)">
|
||||
Absolute
|
||||
</button>
|
||||
</li>
|
||||
|
||||
@@ -229,6 +229,20 @@ namespace WebWindowComplex.Json
|
||||
}
|
||||
}
|
||||
|
||||
private JsonFrameArcElement m_FrameArcElem;
|
||||
[JsonProperty]
|
||||
public JsonFrameArcElement ArcElement
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_FrameArcElem;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_FrameArcElem = value;
|
||||
}
|
||||
}
|
||||
|
||||
public JsonFrame() : base(AreaTypes.FRAME)
|
||||
{
|
||||
}
|
||||
@@ -249,6 +263,8 @@ namespace WebWindowComplex.Json
|
||||
newFrame.SetSelShape(m_Shape);
|
||||
newFrame.SetBottomRail(m_bBottomRail);
|
||||
newFrame.SetBottomRailQty(m_nBottomRailQty);
|
||||
if(ArcElement != null)
|
||||
newFrame.SetFrameArcElem(ArcElement.Deserialize(newFrame, ParentWindow));
|
||||
//Frame.AppliedDone();
|
||||
for (var DimensionIndex = 0; DimensionIndex <= m_DimensionList.Count - 1; DimensionIndex++)
|
||||
newFrame.DimensionList[DimensionIndex].SetDimension(m_DimensionList[DimensionIndex].Value);
|
||||
@@ -311,20 +327,6 @@ namespace WebWindowComplex.Json
|
||||
}
|
||||
}
|
||||
|
||||
//private List<JsonJoint> m_JointList = new List<JsonJoint>();
|
||||
//[JsonProperty]
|
||||
//public List<JsonJoint> JointList
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// return m_JointList;
|
||||
// }
|
||||
// set
|
||||
// {
|
||||
// m_JointList = value;
|
||||
// }
|
||||
//}
|
||||
|
||||
private bool m_bBottomRail;
|
||||
[JsonProperty]
|
||||
public bool BottomRail
|
||||
@@ -353,6 +355,20 @@ namespace WebWindowComplex.Json
|
||||
}
|
||||
}
|
||||
|
||||
private JsonSashArcElement m_SashArcElem;
|
||||
[JsonProperty]
|
||||
public JsonSashArcElement ArcElement
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SashArcElem;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_SashArcElem = value;
|
||||
}
|
||||
}
|
||||
|
||||
private string m_Hardware;
|
||||
[JsonProperty]
|
||||
public string Hardware
|
||||
@@ -418,6 +434,8 @@ namespace WebWindowComplex.Json
|
||||
newSash.SetSelHardwareFromId(Hardware);
|
||||
foreach (var HwOption in m_HwOptionList)
|
||||
newSash.SelHwOptionList.Add(HwOption.Name, HwOption.Value);
|
||||
if (ArcElement != null)
|
||||
newSash.SetSashArcElem(ArcElement.Deserialize(newSash, ParentWindow));
|
||||
foreach (var Area in AreaList)
|
||||
{
|
||||
var AreaDeserealized = Area.Deserialize(newSash, ParentWindow);
|
||||
@@ -617,6 +635,107 @@ namespace WebWindowComplex.Json
|
||||
}
|
||||
}
|
||||
|
||||
public class JsonFrameArcElement
|
||||
{
|
||||
private double m_Section;
|
||||
[JsonProperty]
|
||||
public double Section
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Section;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Section = value;
|
||||
}
|
||||
}
|
||||
|
||||
private bool m_bCutEdge;
|
||||
[JsonProperty]
|
||||
public bool CutEdge
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_bCutEdge;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_bCutEdge = value;
|
||||
}
|
||||
}
|
||||
|
||||
private bool m_bIsAlign;
|
||||
[JsonProperty]
|
||||
public bool IsAlign
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_bIsAlign;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_bIsAlign = value;
|
||||
}
|
||||
}
|
||||
|
||||
public JsonFrameArcElement(double Section, bool CutEdge, bool IsAlign)
|
||||
{
|
||||
m_Section = Section;
|
||||
m_bCutEdge = CutEdge;
|
||||
m_bIsAlign = IsAlign;
|
||||
}
|
||||
|
||||
internal FrameArcElement Deserialize(Area ParentArea, Window ParentWindow)
|
||||
{
|
||||
FrameArcElement arcElement = new FrameArcElement(ParentArea, ParentWindow, m_Section, m_bCutEdge, m_bIsAlign);
|
||||
return arcElement;
|
||||
}
|
||||
}
|
||||
|
||||
public class JsonSashArcElement
|
||||
{
|
||||
private double m_Section;
|
||||
[JsonProperty]
|
||||
public double Section
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Section;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Section = value;
|
||||
}
|
||||
}
|
||||
|
||||
private bool m_bCutEdge;
|
||||
[JsonProperty]
|
||||
public bool CutEdge
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_bCutEdge;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_bCutEdge = value;
|
||||
}
|
||||
}
|
||||
|
||||
public JsonSashArcElement(double Section, bool CutEdge)
|
||||
{
|
||||
m_Section = Section;
|
||||
m_bCutEdge = CutEdge;
|
||||
}
|
||||
|
||||
internal SashArcElement Deserialize(Area ParentArea, Window ParentWindow)
|
||||
{
|
||||
SashArcElement arcElement = new SashArcElement(ParentArea, ParentWindow, m_Section, m_bCutEdge);
|
||||
return arcElement;
|
||||
}
|
||||
}
|
||||
|
||||
public class JsonJoint
|
||||
{
|
||||
private int m_nIndex;
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace WebWindowComplex.Json
|
||||
public enum MeasureTypes: int
|
||||
{
|
||||
NULL = 0,
|
||||
ABSOLUT = 1,
|
||||
ABSOLUTE = 1,
|
||||
PROPORTIONAL = 2,
|
||||
PERCENTAGE = 3
|
||||
}
|
||||
|
||||
@@ -15,7 +15,8 @@ namespace WebWindowComplex
|
||||
Split,
|
||||
Sash,
|
||||
Fill,
|
||||
General
|
||||
General,
|
||||
ArcElement
|
||||
}
|
||||
|
||||
public enum PositionJoints
|
||||
|
||||
@@ -108,8 +108,15 @@ namespace WebWindowComplex.Models
|
||||
SashArea.SetSelFamilyHardware("");
|
||||
// Inserisco hardware di default
|
||||
SashArea.SetSelHardwareFromId("000000");
|
||||
if (ParentWindow.AreaList.First().SelShapeIndex == (int)Shapes.ARC ||
|
||||
ParentWindow.AreaList.First().SelShapeIndex == (int)Shapes.DOUBLEARC ||
|
||||
ParentWindow.AreaList.First().SelShapeIndex == (int)Shapes.ARC_FULL ||
|
||||
ParentWindow.AreaList.First().SelShapeIndex == (int)Shapes.THREECENTERARC)
|
||||
SashArea.SashArcElem = new SashArcElement(SashArea, ParentWindow, 10, true);
|
||||
else
|
||||
SashArea.SashArcElem = null;
|
||||
// Salvo gli oggetti già presenti e li cancello da AreaList
|
||||
List<Area> ContentArea = new List<Area>();
|
||||
List <Area> ContentArea = new List<Area>();
|
||||
ContentArea.Add(AreaList[0]);
|
||||
AreaList.Remove(AreaList[0]);
|
||||
// Aggiungo area
|
||||
|
||||
@@ -20,6 +20,18 @@ namespace WebWindowComplex.Models
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public FrameArcElement? FrameArcElem
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_FrameArcElem;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_FrameArcElem = value!;
|
||||
}
|
||||
}
|
||||
|
||||
public bool BottomRail
|
||||
{
|
||||
get
|
||||
@@ -207,11 +219,40 @@ namespace WebWindowComplex.Models
|
||||
break;
|
||||
}
|
||||
}
|
||||
switch (SelShape)
|
||||
{
|
||||
case Shapes.RECTANGLE:
|
||||
case Shapes.RIGHTCHAMFER:
|
||||
case Shapes.LEFTCHAMFER:
|
||||
case Shapes.DOUBLECHAMFER:
|
||||
case Shapes.TRIANGLE:
|
||||
{
|
||||
FrameArcElem = null;
|
||||
SearchSash(this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
m_Shape = SelShape;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void SearchSash(Area node)
|
||||
{
|
||||
if (node != null)
|
||||
{
|
||||
if (node.AreaType.Equals(AreaTypes.SASH))
|
||||
{
|
||||
Sash s = (Sash)node;
|
||||
s.SashArcElem = null;
|
||||
}
|
||||
foreach (var item in node.AreaList)
|
||||
{
|
||||
SearchSash(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Shapes Shape
|
||||
{
|
||||
get
|
||||
@@ -241,14 +282,20 @@ namespace WebWindowComplex.Models
|
||||
|
||||
#region Internal Methods
|
||||
|
||||
internal void SetFrameArcElem(FrameArcElement arcElement)
|
||||
{
|
||||
m_FrameArcElem = arcElement;
|
||||
}
|
||||
|
||||
internal static Area CreateFrame(Window Window)
|
||||
{
|
||||
Frame NewFrame = new Frame(null, Window);
|
||||
NewFrame.SetAreaType(AreaTypes.FRAME);
|
||||
NewFrame.SetSelShape(Shapes.RECTANGLE);
|
||||
NewFrame.SetBottomRail(false);
|
||||
NewFrame.SetBottomRailQty(0);
|
||||
return NewFrame;
|
||||
Frame newFrame = new Frame(null, Window);
|
||||
newFrame.SetAreaType(AreaTypes.FRAME);
|
||||
newFrame.SetSelShape(Shapes.RECTANGLE);
|
||||
newFrame.SetBottomRail(false);
|
||||
newFrame.SetBottomRailQty(0);
|
||||
newFrame.FrameArcElem = null;
|
||||
return newFrame;
|
||||
}
|
||||
|
||||
internal override JsonArea Serialize(bool hideHw)
|
||||
@@ -257,6 +304,10 @@ namespace WebWindowComplex.Models
|
||||
if (nCounterGroup < GroupId)
|
||||
Area.nCounterGroup = GroupId;
|
||||
JsonFrame JsonFrame = new JsonFrame(m_Shape, m_bBottomRail, m_nBottomRailQty, GroupId);
|
||||
if (FrameArcElem != null)
|
||||
JsonFrame.ArcElement = FrameArcElem.Serialize();
|
||||
else
|
||||
JsonFrame.ArcElement = null;
|
||||
foreach (var Dimension in DimensionList)
|
||||
JsonFrame.DimensionList.Add(Dimension.Serialize());
|
||||
foreach (var Joint in JointList)
|
||||
@@ -395,6 +446,8 @@ namespace WebWindowComplex.Models
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private FrameArcElement m_FrameArcElem = new FrameArcElement();
|
||||
|
||||
private bool m_bBottomRail;
|
||||
|
||||
private List<FrameDimension> m_DimensionList = new List<FrameDimension>();
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using WebWindowComplex.Json;
|
||||
using static WebWindowComplex.Json.WindowConst;
|
||||
|
||||
namespace WebWindowComplex.Models
|
||||
{
|
||||
public class FrameArcElement
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public FrameArcElement() { }
|
||||
|
||||
public FrameArcElement(Area ParentArea, Window ParentWindow, double nSection, bool bCutEdge, bool bIsAlign)
|
||||
{
|
||||
m_ParentArea = ParentArea;
|
||||
m_ParentWindow = ParentWindow;
|
||||
m_nSection = nSection;
|
||||
m_bCutEdge = bCutEdge;
|
||||
m_bIsAlign = bIsAlign;
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public int nQty
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_nQty;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_nQty = value;
|
||||
}
|
||||
}
|
||||
|
||||
public double nSection
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_nSection;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_nSection = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool bCutEdge
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_bCutEdge;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_bCutEdge = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool bIsAlign
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_bIsAlign;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_bIsAlign = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Internal Methods
|
||||
|
||||
internal void SetQty(int Qty)
|
||||
{
|
||||
m_nQty = Qty;
|
||||
}
|
||||
|
||||
internal void SetSection(double Section)
|
||||
{
|
||||
m_nSection = Section;
|
||||
}
|
||||
|
||||
internal JsonFrameArcElement Serialize()
|
||||
{
|
||||
JsonFrameArcElement jArcElement = new JsonFrameArcElement(nSection, bCutEdge, bIsAlign);
|
||||
return jArcElement;
|
||||
}
|
||||
|
||||
#endregion Internal Methods
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
protected Area m_ParentArea;
|
||||
protected Window m_ParentWindow;
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private double m_nSection;
|
||||
|
||||
private int m_nQty;
|
||||
|
||||
private bool m_bCutEdge = false;
|
||||
|
||||
private bool m_bIsAlign = false;
|
||||
|
||||
#endregion Private Fields
|
||||
}
|
||||
}
|
||||
@@ -102,7 +102,7 @@ namespace WebWindowComplex.Models
|
||||
if(area is Sash && sName.Equals("Width"))
|
||||
{
|
||||
Sash sash = (Sash)area;
|
||||
int countAbsolute = sash.SashList.Where(x => x.MeasureType.Equals(MeasureTypes.ABSOLUT)).Count();
|
||||
int countAbsolute = sash.SashList.Where(x => x.MeasureType.Equals(MeasureTypes.ABSOLUTE)).Count();
|
||||
if (countAbsolute == sash.SashList.Count)
|
||||
{
|
||||
double sum = sash.SashList.Sum(x => x.dDimension);
|
||||
@@ -132,7 +132,7 @@ namespace WebWindowComplex.Models
|
||||
splitList = split.SplitVertList;
|
||||
else
|
||||
splitList = split.SplitHorizList;
|
||||
int countAbsolute = splitList.Where(x => x.MeasureType.Equals(MeasureTypes.ABSOLUT)).Count();
|
||||
int countAbsolute = splitList.Where(x => x.MeasureType.Equals(MeasureTypes.ABSOLUTE)).Count();
|
||||
if (countAbsolute != 0 && countAbsolute == splitList.Count)
|
||||
{
|
||||
double sum = splitList.Sum(x => x.dDimension);
|
||||
|
||||
@@ -58,6 +58,18 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
}
|
||||
|
||||
public SashArcElement? SashArcElem
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SashArcElement;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_SashArcElement = value!;
|
||||
}
|
||||
}
|
||||
|
||||
public List<Hardware> HardwareList
|
||||
{
|
||||
get
|
||||
@@ -409,6 +421,13 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
newSash.SetSelFamilyHardwareFromIndex(m_SelHardware.Id);
|
||||
newSash.SetSelHardwareFromId(CustomHwId);
|
||||
if (ParentWindow.AreaList.First().SelShapeIndex == (int)Shapes.ARC ||
|
||||
ParentWindow.AreaList.First().SelShapeIndex == (int)Shapes.DOUBLEARC ||
|
||||
ParentWindow.AreaList.First().SelShapeIndex == (int)Shapes.ARC_FULL ||
|
||||
ParentWindow.AreaList.First().SelShapeIndex == (int)Shapes.THREECENTERARC)
|
||||
newSash.SashArcElem = new SashArcElement(newSash, ParentWindow, 10, true);
|
||||
else
|
||||
newSash.SashArcElem = null;
|
||||
return newSash;
|
||||
}
|
||||
|
||||
@@ -552,7 +571,7 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
switch (split.SplitVertList.ElementAt(i).SelMeasureType)
|
||||
{
|
||||
case MeasureTypes.ABSOLUT:
|
||||
case MeasureTypes.ABSOLUTE:
|
||||
{
|
||||
risultato = CalculateWidthSashGroup(item, split.SplitVertList.ElementAt(i).dDimension);
|
||||
break;
|
||||
@@ -581,7 +600,7 @@ namespace WebWindowComplex.Models
|
||||
Sash sash = (Sash)area;
|
||||
switch (sash.SashList.ElementAt(i).SelMeasureType)
|
||||
{
|
||||
case MeasureTypes.ABSOLUT:
|
||||
case MeasureTypes.ABSOLUTE:
|
||||
{
|
||||
risultato = CalculateWidthSashGroup(item, sash.SashList.ElementAt(i).dDimension);
|
||||
break;
|
||||
@@ -621,13 +640,14 @@ namespace WebWindowComplex.Models
|
||||
foreach(var sashDim in newSash.SashList)
|
||||
{
|
||||
for (var JointIndex = 0; JointIndex <= 3; JointIndex++)
|
||||
sashDim.JointList.Add(new Joint(newSash, JointIndex + 1, Joints.FULL_H));
|
||||
sashDim.JointList.Add(new Joint(newSash, JointIndex + 1, Joints.FULL_V));
|
||||
}
|
||||
newSash.SetSashBottomRail(false);
|
||||
newSash.SetSashBottomRailQty(0);
|
||||
newSash.SetSelFamilyHardware(Sash.s_FamilyHardwareList.First());
|
||||
newSash.ClearHardwareOptionList();
|
||||
newSash.SetFirstHardware();
|
||||
newSash.SashArcElem = null;
|
||||
return newSash;
|
||||
}
|
||||
|
||||
@@ -734,11 +754,20 @@ namespace WebWindowComplex.Models
|
||||
foreach (var HwOption in SelHwOptionList)
|
||||
JsonSash.HwOptionList.Add(new JsonHwOption(HwOption.Key, HwOption.Value));
|
||||
}
|
||||
if (SashArcElem != null)
|
||||
JsonSash.ArcElement = SashArcElem.Serialize();
|
||||
else
|
||||
JsonSash.ArcElement = null;
|
||||
foreach (var Area in AreaList)
|
||||
JsonSash.AreaList.Add(Area.Serialize(hideHw));
|
||||
return JsonSash;
|
||||
}
|
||||
|
||||
internal void SetSashArcElem(SashArcElement arcElement)
|
||||
{
|
||||
m_SashArcElement = arcElement;
|
||||
}
|
||||
|
||||
internal void SetFirstHardware()
|
||||
{
|
||||
if (m_HardwareList.Count > 0)
|
||||
@@ -949,6 +978,7 @@ namespace WebWindowComplex.Models
|
||||
private string m_SelFamilyHardware = "";
|
||||
private Hardware m_SelHardware;
|
||||
private OrientationSash m_SelOrientationSashType;
|
||||
private SashArcElement m_SashArcElement;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using WebWindowComplex.Json;
|
||||
using static WebWindowComplex.Json.WindowConst;
|
||||
|
||||
namespace WebWindowComplex.Models
|
||||
{
|
||||
public class SashArcElement
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public SashArcElement() { }
|
||||
|
||||
public SashArcElement(Area ParentArea, Window ParentWindow, double nSection, bool bCutEdge)
|
||||
{
|
||||
m_ParentArea = ParentArea;
|
||||
m_ParentWindow = ParentWindow;
|
||||
m_nSection = nSection;
|
||||
m_bCutEdge = bCutEdge;
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public int nQty
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_nQty;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_nQty = value;
|
||||
}
|
||||
}
|
||||
|
||||
public double nSection
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_nSection;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_nSection = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool bCutEdge
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_bCutEdge;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_bCutEdge = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Internal Methods
|
||||
|
||||
internal JsonSashArcElement Serialize()
|
||||
{
|
||||
JsonSashArcElement jArcElement = new JsonSashArcElement(nSection, bCutEdge);
|
||||
return jArcElement;
|
||||
}
|
||||
|
||||
#endregion Internal Methods
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
protected Area m_ParentArea;
|
||||
protected Window m_ParentWindow;
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private double m_nSection;
|
||||
|
||||
private int m_nQty;
|
||||
|
||||
private bool m_bCutEdge = false;
|
||||
|
||||
#endregion Private Fields
|
||||
}
|
||||
}
|
||||
@@ -132,7 +132,7 @@ namespace WebWindowComplex.Models
|
||||
bool valueAccept = false;
|
||||
switch (MeasureType)
|
||||
{
|
||||
case MeasureTypes.ABSOLUT:
|
||||
case MeasureTypes.ABSOLUTE:
|
||||
{
|
||||
valueAccept = (value < valMaxAbsolut && value > valMinAbsolut) ? true : false;
|
||||
break;
|
||||
@@ -140,7 +140,7 @@ namespace WebWindowComplex.Models
|
||||
case MeasureTypes.PROPORTIONAL:
|
||||
{
|
||||
valMaxAbsolut = 20;
|
||||
valueAccept = (value > 1) ? true : false;
|
||||
valueAccept = (value >= 1) ? true : false;
|
||||
break;
|
||||
}
|
||||
case MeasureTypes.PERCENTAGE:
|
||||
@@ -163,7 +163,8 @@ namespace WebWindowComplex.Models
|
||||
int proportionalCount = dimensions.Where(x => x.MeasureType.Equals(MeasureTypes.PROPORTIONAL)).ToList().Count;
|
||||
int percentageCount = dimensions.Where(x => x.MeasureType.Equals(MeasureTypes.PERCENTAGE)).ToList().Count;
|
||||
// Le dimensioni sono solo in proporzionale
|
||||
if (proportionalCount == absolutValList.Count)
|
||||
if (proportionalCount == absolutValList.Count || SelMeasureType.Equals(MeasureTypes.PROPORTIONAL) ||
|
||||
(SelMeasureType.Equals(MeasureTypes.ABSOLUTE) && proportionalCount == absolutValList.Count -1))
|
||||
{
|
||||
m_dDimension = value;
|
||||
}
|
||||
@@ -220,7 +221,7 @@ namespace WebWindowComplex.Models
|
||||
double valueInAbsolute = 0;
|
||||
switch (MeasureType)
|
||||
{
|
||||
case MeasureTypes.ABSOLUT:
|
||||
case MeasureTypes.ABSOLUTE:
|
||||
{
|
||||
valueInAbsolute = value;
|
||||
break;
|
||||
@@ -399,7 +400,7 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
switch (oldType)
|
||||
{
|
||||
case MeasureTypes.ABSOLUT:
|
||||
case MeasureTypes.ABSOLUTE:
|
||||
{
|
||||
if (newType.Equals(MeasureTypes.PERCENTAGE))
|
||||
{
|
||||
@@ -413,7 +414,7 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
case MeasureTypes.PROPORTIONAL:
|
||||
{
|
||||
if (newType.Equals(MeasureTypes.ABSOLUT))
|
||||
if (newType.Equals(MeasureTypes.ABSOLUTE))
|
||||
{
|
||||
//return Double.Round(ConvertFromPropVal(newType), 2);
|
||||
return ConvertFromPropVal(newType, widthTot);
|
||||
@@ -426,7 +427,7 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
case MeasureTypes.PERCENTAGE:
|
||||
{
|
||||
if (newType.Equals(MeasureTypes.ABSOLUT))
|
||||
if (newType.Equals(MeasureTypes.ABSOLUTE))
|
||||
{
|
||||
//return Double.Round((m_dDimension * m_Parent.Width) / 100, 2);
|
||||
return (m_dDimension * widthTot) / 100;
|
||||
@@ -483,7 +484,7 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
switch (split.SplitVertList.ElementAt(i).SelMeasureType)
|
||||
{
|
||||
case MeasureTypes.ABSOLUT:
|
||||
case MeasureTypes.ABSOLUTE:
|
||||
{
|
||||
risultato = CalculateWidthSashGroup(item, split.SplitVertList.ElementAt(i).dDimension);
|
||||
break;
|
||||
@@ -512,7 +513,7 @@ namespace WebWindowComplex.Models
|
||||
Sash sash = (Sash)area;
|
||||
switch (sash.SashList.ElementAt(i).SelMeasureType)
|
||||
{
|
||||
case MeasureTypes.ABSOLUT:
|
||||
case MeasureTypes.ABSOLUTE:
|
||||
{
|
||||
risultato = CalculateWidthSashGroup(item, sash.SashList.ElementAt(i).dDimension);
|
||||
break;
|
||||
@@ -611,7 +612,7 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
switch (MeasureType)
|
||||
{
|
||||
case MeasureTypes.ABSOLUT:
|
||||
case MeasureTypes.ABSOLUTE:
|
||||
{
|
||||
//return Double.Round(dDimension, 2);
|
||||
return dDimension;
|
||||
@@ -641,7 +642,7 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case MeasureTypes.ABSOLUT:
|
||||
case MeasureTypes.ABSOLUTE:
|
||||
{
|
||||
//return Double.Round(absolutVal, 2);
|
||||
return absolutVal;
|
||||
@@ -682,7 +683,7 @@ namespace WebWindowComplex.Models
|
||||
|
||||
double sumPesi = proportionalList.Sum(p => p.dDimension);
|
||||
if (sumPesi == 0) sumPesi = 1;
|
||||
if (newType.Equals(MeasureTypes.ABSOLUT))
|
||||
if (newType.Equals(MeasureTypes.ABSOLUTE))
|
||||
{
|
||||
return res / sumPesi * dDimension;
|
||||
}
|
||||
@@ -795,7 +796,7 @@ namespace WebWindowComplex.Models
|
||||
|
||||
private List<IdNameStruct> m_MeasureTypeList = new List<IdNameStruct>
|
||||
{
|
||||
new IdNameStruct((int)MeasureTypes.ABSOLUT, "Absolut"),
|
||||
new IdNameStruct((int)MeasureTypes.ABSOLUTE, "Absolut"),
|
||||
new IdNameStruct((int)MeasureTypes.PROPORTIONAL, "Proportional"),
|
||||
new IdNameStruct((int)MeasureTypes.PERCENTAGE, "Percentage"),
|
||||
};
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace WebWindowComplex.Models
|
||||
bool valueAccept = false;
|
||||
switch (MeasureType)
|
||||
{
|
||||
case MeasureTypes.ABSOLUT:
|
||||
case MeasureTypes.ABSOLUTE:
|
||||
{
|
||||
valueAccept = (value < valMaxAbsolut && value > valMinAbsolut) ? true : false;
|
||||
break;
|
||||
@@ -147,7 +147,7 @@ namespace WebWindowComplex.Models
|
||||
double valueInAbsolute = 0;
|
||||
switch (MeasureType)
|
||||
{
|
||||
case MeasureTypes.ABSOLUT:
|
||||
case MeasureTypes.ABSOLUTE:
|
||||
{
|
||||
valueInAbsolute = value;
|
||||
break;
|
||||
@@ -367,7 +367,7 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
switch (oldType)
|
||||
{
|
||||
case MeasureTypes.ABSOLUT:
|
||||
case MeasureTypes.ABSOLUTE:
|
||||
{
|
||||
if (newType.Equals(MeasureTypes.PERCENTAGE))
|
||||
{
|
||||
@@ -381,7 +381,7 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
case MeasureTypes.PROPORTIONAL:
|
||||
{
|
||||
if (newType.Equals(MeasureTypes.ABSOLUT))
|
||||
if (newType.Equals(MeasureTypes.ABSOLUTE))
|
||||
{
|
||||
//return Double.Round(ConvertFromPropVal(newType), 2);
|
||||
return ConvertFromPropVal(newType, widthTot, splitList);
|
||||
@@ -394,7 +394,7 @@ namespace WebWindowComplex.Models
|
||||
}
|
||||
case MeasureTypes.PERCENTAGE:
|
||||
{
|
||||
if (newType.Equals(MeasureTypes.ABSOLUT))
|
||||
if (newType.Equals(MeasureTypes.ABSOLUTE))
|
||||
{
|
||||
//return Double.Round((m_dDimension * m_Parent.Width) / 100, 2);
|
||||
return (m_dDimension * widthTot) / 100;
|
||||
@@ -439,7 +439,7 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
switch (split.SplitVertList.ElementAt(i).SelMeasureType)
|
||||
{
|
||||
case MeasureTypes.ABSOLUT:
|
||||
case MeasureTypes.ABSOLUTE:
|
||||
{
|
||||
risultato = CalculateWidthSplitGroup(item, split.SplitVertList.ElementAt(i).dDimension);
|
||||
break;
|
||||
@@ -468,7 +468,7 @@ namespace WebWindowComplex.Models
|
||||
Sash sash = (Sash)area;
|
||||
switch (sash.SashList.ElementAt(i).SelMeasureType)
|
||||
{
|
||||
case MeasureTypes.ABSOLUT:
|
||||
case MeasureTypes.ABSOLUTE:
|
||||
{
|
||||
risultato = CalculateWidthSplitGroup(item, sash.SashList.ElementAt(i).dDimension);
|
||||
break;
|
||||
@@ -518,7 +518,7 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
switch (split.SplitHorizList.ElementAt(i).SelMeasureType)
|
||||
{
|
||||
case MeasureTypes.ABSOLUT:
|
||||
case MeasureTypes.ABSOLUTE:
|
||||
{
|
||||
risultato = CalculateHeightSplitGroup(item, split.SplitVertList.ElementAt(i).dDimension);
|
||||
break;
|
||||
@@ -547,7 +547,7 @@ namespace WebWindowComplex.Models
|
||||
Sash sash = (Sash)area;
|
||||
switch (sash.SashList.ElementAt(i).SelMeasureType)
|
||||
{
|
||||
case MeasureTypes.ABSOLUT:
|
||||
case MeasureTypes.ABSOLUTE:
|
||||
{
|
||||
risultato = CalculateHeightSplitGroup(item, sash.SashList.ElementAt(i).dDimension);
|
||||
break;
|
||||
@@ -646,7 +646,7 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
switch (MeasureType)
|
||||
{
|
||||
case MeasureTypes.ABSOLUT:
|
||||
case MeasureTypes.ABSOLUTE:
|
||||
{
|
||||
//return Double.Round(dDimension, 2);
|
||||
return dDimension;
|
||||
@@ -676,7 +676,7 @@ namespace WebWindowComplex.Models
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case MeasureTypes.ABSOLUT:
|
||||
case MeasureTypes.ABSOLUTE:
|
||||
{
|
||||
//return Double.Round(absolutVal, 2);
|
||||
return absolutVal;
|
||||
@@ -717,7 +717,7 @@ namespace WebWindowComplex.Models
|
||||
|
||||
double sumPesi = proportionalList.Sum(p => p.dDimension);
|
||||
if (sumPesi == 0) sumPesi = 1;
|
||||
if (newType.Equals(MeasureTypes.ABSOLUT))
|
||||
if (newType.Equals(MeasureTypes.ABSOLUTE))
|
||||
{
|
||||
return res / sumPesi * dDimension;
|
||||
}
|
||||
@@ -809,7 +809,7 @@ namespace WebWindowComplex.Models
|
||||
|
||||
private List<IdNameStruct> m_MeasureTypeList = new List<IdNameStruct>
|
||||
{
|
||||
new IdNameStruct((int)MeasureTypes.ABSOLUT, "Absolut"),
|
||||
new IdNameStruct((int)MeasureTypes.ABSOLUTE, "Absolute"),
|
||||
new IdNameStruct((int)MeasureTypes.PROPORTIONAL, "Proportional"),
|
||||
new IdNameStruct((int)MeasureTypes.PERCENTAGE, "Percentage"),
|
||||
};
|
||||
|
||||
@@ -49,6 +49,15 @@
|
||||
<li class="nav-item m-1">
|
||||
<button data-target="#General" class="@tabNavCss(CompileStep.General)" @onclick="() => NextStep(CompileStep.General)">General</button>
|
||||
</li>
|
||||
@if (FrameWindow.Shape == Json.WindowConst.Shapes.ARC ||
|
||||
FrameWindow.Shape == Json.WindowConst.Shapes.ARC_FULL ||
|
||||
FrameWindow.Shape == Json.WindowConst.Shapes.DOUBLEARC ||
|
||||
FrameWindow.Shape == Json.WindowConst.Shapes.THREECENTERARC)
|
||||
{
|
||||
<li class="nav-item m-1">
|
||||
<button data-target="#ArcElement" class="@tabNavCss(CompileStep.ArcElement)" @onclick="() => NextStep(CompileStep.ArcElement)">Arc Elem</button>
|
||||
</li>
|
||||
}
|
||||
</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">
|
||||
@@ -188,6 +197,14 @@
|
||||
EC_ReqClose="ReturnTree">
|
||||
</General>
|
||||
}
|
||||
else if (currStep == CompileStep.ArcElement)
|
||||
{
|
||||
<CardArcElement CurrFrame="FrameWindow"
|
||||
SashList="m_SashList"
|
||||
EC_UpdatePreview="UpdatePreviewFrame"
|
||||
EC_ReqClose="ReturnTree">
|
||||
</CardArcElement>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -601,9 +601,11 @@ namespace WebWindowComplex
|
||||
new Joint(frame, 3, Joints.FULL_H),
|
||||
new Joint(frame, 4, Joints.FULL_H)
|
||||
};
|
||||
FrameArcElement ae = new FrameArcElement(frame, window, 10, true, true);
|
||||
JsonWindow jsonWindow = new JsonWindow("Profilo78", "Pino", "Black", "Vetro BE 2S 4T/16/4T");
|
||||
JsonFrame jsonFrame = new JsonFrame(Shapes.RECTANGLE, false, 0, 1);
|
||||
jsonWindow.AreaList.Add(jsonFrame);
|
||||
jsonFrame.ArcElement = ae.Serialize();
|
||||
foreach (var Dimension in DimensionList)
|
||||
jsonFrame.DimensionList.Add(Dimension.Serialize());
|
||||
foreach (var Joint in JointList)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>2.7.11.2818</Version>
|
||||
<Version>2.7.12.216</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
|
||||
@@ -191,6 +191,14 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>2.7.11.2818</Version>
|
||||
<Version>2.7.12.216</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione JWD per LUX</Description>
|
||||
@@ -271,6 +271,24 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user