aggiunto hardware
This commit is contained in:
@@ -5,10 +5,12 @@
|
||||
<PageTitle>Gerarchia</PageTitle>
|
||||
|
||||
<TableComp IN_TemplateDTOList="@AvailTemplateList"
|
||||
IN_SelTemplate="@SelTemplate"
|
||||
EC_OnUpdate="SaveJWD"
|
||||
EC_OnSelectedTemplate="SetTemplate"
|
||||
LiveSVG="@currSvg">
|
||||
IN_SelTemplate="@SelTemplate"
|
||||
IN_FamilyHardware="@FamilyHardware"
|
||||
IN_HardwareList="@AvailHardwareList"
|
||||
EC_OnUpdate="SaveJWD"
|
||||
EC_OnSelectedTemplate="SetTemplate"
|
||||
LiveSVG="@currSvg">
|
||||
</TableComp>
|
||||
|
||||
@* <p>
|
||||
|
||||
@@ -4,6 +4,7 @@ using EgwCoreLib.Lux.Data.Services;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Newtonsoft.Json;
|
||||
using NLog;
|
||||
using System.Diagnostics;
|
||||
using WebWindowComplex;
|
||||
using WebWindowComplex.DTO;
|
||||
|
||||
@@ -13,7 +14,7 @@ namespace Test.UI.Components.Pages
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public Template SelTemplate { get; set; } = new Template(0, "---SELECT---", "", "");
|
||||
public Template SelTemplate { get; set; } = new Template(0, "---SELECT---", "", "");
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
@@ -27,7 +28,7 @@ namespace Test.UI.Components.Pages
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
|
||||
protected string currJwd = "...";
|
||||
protected Dictionary<string, string> m_CurrArgs = new Dictionary<string, string>();
|
||||
|
||||
@@ -36,6 +37,9 @@ namespace Test.UI.Components.Pages
|
||||
#region Protected Properties
|
||||
|
||||
protected List<TemplateSelectDTO> AvailTemplateList { get; set; } = new List<TemplateSelectDTO>();
|
||||
protected List<Hardware> AvailHardwareList { get; set; } = new List<Hardware>();
|
||||
|
||||
protected string FamilyHardware { get; set; } = "Natura";
|
||||
|
||||
[Inject]
|
||||
protected IConfiguration Config { get; set; } = null!;
|
||||
@@ -69,7 +73,8 @@ namespace Test.UI.Components.Pages
|
||||
private string apiUrl = "";
|
||||
private string calcTag = "";
|
||||
private string CalcUid = "CurrWindow";
|
||||
private string cFile = "Data/Setup.json";
|
||||
private string cFileTemplate = "Data/Setup.json";
|
||||
private string cFileHardware = "Hardware/Setup.json";
|
||||
private TemplateSelectDTO? currSel = null;
|
||||
private string currSvg = "";
|
||||
|
||||
@@ -78,24 +83,9 @@ namespace Test.UI.Components.Pages
|
||||
|
||||
private string subChannel = "";
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private string windowUid = "CurrWindow";
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// string answ = "";
|
||||
// if (currSel != null)
|
||||
// {
|
||||
// answ = currSel.SVGFileName.Replace(".svg", "");
|
||||
// }
|
||||
// return answ;
|
||||
// }
|
||||
//}
|
||||
|
||||
#endregion Private Properties
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Methods
|
||||
|
||||
@@ -132,11 +122,12 @@ namespace Test.UI.Components.Pages
|
||||
{
|
||||
//return base.OnInitializedAsync();
|
||||
AvailTemplateList = new List<TemplateSelectDTO>();
|
||||
AvailHardwareList = new List<Hardware>();
|
||||
await Task.Delay(100);
|
||||
// brutale, da rivedere...
|
||||
if (File.Exists(cFile))
|
||||
if (File.Exists(cFileTemplate))
|
||||
{
|
||||
string rawVal = File.ReadAllText(cFile);
|
||||
string rawVal = File.ReadAllText(cFileTemplate);
|
||||
var rawList = JsonConvert.DeserializeObject<List<TemplateSelectDTO>>(rawVal) ?? new List<TemplateSelectDTO>();
|
||||
|
||||
// calcolo URL immagini... DTO interno da rivedere?
|
||||
@@ -146,6 +137,15 @@ namespace Test.UI.Components.Pages
|
||||
AvailTemplateList.Add(item);
|
||||
}
|
||||
}
|
||||
if (File.Exists(cFileHardware))
|
||||
{
|
||||
string rawValHW = File.ReadAllText(cFileHardware);
|
||||
var rawListHW = JsonConvert.DeserializeObject<List<Hardware>>(rawValHW) ?? new List<Hardware>();
|
||||
foreach (var item in rawListHW)
|
||||
{
|
||||
AvailHardwareList.Add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async Task SaveJWD(Dictionary<string, string> CurrArgs)
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
[
|
||||
{
|
||||
"sId": "000100",
|
||||
"sFamily": "Natura",
|
||||
"sName": "Natura_ANTA_RIBALTA_RECTANGLE_1SASH_2T_12_2T",
|
||||
"sOpeningType": "ANTA_RIBALTA",
|
||||
"sShape": "RECTANGLE",
|
||||
"nSashQty": "1",
|
||||
"nSashPosition": "1"
|
||||
},
|
||||
{
|
||||
"sId": "000101",
|
||||
"sFamily": "Natura",
|
||||
"sName": "Natura_ANTA_RIBALTA_RECTANGLE_1SASH_3T_12_3T",
|
||||
"sOpeningType": "ANTA_RIBALTA",
|
||||
"sShape": "RECTANGLE",
|
||||
"nSashQty": "1",
|
||||
"nSashPosition": "1"
|
||||
},
|
||||
{
|
||||
"sId": "000102",
|
||||
"sFamily": "Natura",
|
||||
"sName": "Natura_ANTA_RIBALTA_RECTANGLE_2SASH_3T_12_3T",
|
||||
"sOpeningType": "ANTA_RIBALTA",
|
||||
"sShape": "RECTANGLE",
|
||||
"nSashQty": "2",
|
||||
"nSashPosition": "1"
|
||||
},
|
||||
{
|
||||
"sId": "000103",
|
||||
"sFamily": "Optima",
|
||||
"sName": "Optima_ANTA_RIBALTA_RECTANGLE_1SASH_3T_12_3T",
|
||||
"sOpeningType": "ANTA_RIBALTA",
|
||||
"sShape": "RECTANGLE",
|
||||
"nSashQty": "1",
|
||||
"nSashPosition": "1"
|
||||
},
|
||||
{
|
||||
"sId": "000104",
|
||||
"sFamily": "Optima",
|
||||
"sName": "Optima_ANTA_RIBALTA_RECTANGLE_2SASH_3T_12_3T",
|
||||
"sOpeningType": "ANTA_RIBALTA",
|
||||
"sShape": "RECTANGLE",
|
||||
"nSashQty": "2",
|
||||
"nSashPosition": "1"
|
||||
}
|
||||
]
|
||||
@@ -8,11 +8,15 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Content Remove="compilerconfig.json" />
|
||||
<Content Remove="Hardware\Setup.json" />
|
||||
<Content Remove="Data\Setup.json" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="compilerconfig.json" />
|
||||
<None Include="Hardware\Setup.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Setup.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
|
||||
+186
-149
@@ -219,7 +219,7 @@
|
||||
<div class="card-body py-2">
|
||||
<h5 class="card-title">Frame</h5>
|
||||
<div class="input-group mb-2">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => FrameWindow.AddSplit()">Aggiungi split</button>
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => FrameWindow.AddSplit(FrameWindow)">Aggiungi split</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -257,7 +257,7 @@
|
||||
<div class="col-sm-6">
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
@if (currSplit.ParentArea is Splitted || currSplit.ParentArea is Sash)
|
||||
@if ((currSplit.ParentArea is Splitted || currSplit.ParentArea is Sash) && SashList.Count > 0)
|
||||
{
|
||||
@for (int j = 0; j < SashList.Count; j++)
|
||||
{
|
||||
@@ -286,9 +286,12 @@
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<h5>Split</h5>
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => SwapTwoAree(currSplit)">Swap Aree</button>
|
||||
</div>
|
||||
@if (currSplit.nSplitQty == 1)
|
||||
{
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => SwapTwoAree(currSplit)">Swap Aree</button>
|
||||
</div>
|
||||
}
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="SplitQty@(m_SplitList.IndexOf(currSplit) + 1)">Number</span>
|
||||
<input type="number" class="form-control" placeholder="0" aria-label="basic-addon1Split" @bind="@currSplit.nSplitQty">
|
||||
@@ -348,8 +351,22 @@
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<h5>Area split</h5>
|
||||
<div class="input-group mb-2">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => currSplitted.AddSash()">Aggiungi sash</button>
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<div class="input-group mb-2">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => currSplitted.AddSash()">Aggiungi sash</button>
|
||||
</div>
|
||||
</div>
|
||||
@for (int j = 0; j < SashList.Count; j++)
|
||||
{
|
||||
int Index = j;
|
||||
<div class="col-4">
|
||||
<div class="input-group mb-2">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => CopySplitted(currSplitted, Index)">Copy sash @(j+1)</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -488,163 +505,108 @@
|
||||
}
|
||||
else if (currStep == CompileStep.Sash)
|
||||
{
|
||||
@if (currSash > SashList.Count)
|
||||
@if (currSash >= SashList.Count || currSash == -1)
|
||||
{
|
||||
currStep = CompileStep.Gerarchia;
|
||||
}
|
||||
Sash item = SashList[currSash];
|
||||
<div class="container">
|
||||
<div class="text-start display-4">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="NumberSash@(SashList.IndexOf(item) + 1)">Number</span>
|
||||
<input type="number" class="form-control" aria-label="NumberSash@(SashList.IndexOf(item) + 1)" @bind="@item.nSashQty">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<h5 class="card-title">Orientation</h5>
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="OrientationSash@(SashList.IndexOf(item) + 1)">Tipology</label>
|
||||
<select class="form-select" id="OrientationSash@(SashList.IndexOf(item) + 1)" @bind="@item.SelOrientationSashTypeIndex">
|
||||
<option value="0">Vertical</option>
|
||||
<option value="1">Horizontal</option>
|
||||
</select>
|
||||
</div>
|
||||
else
|
||||
{
|
||||
Sash item = SashList[currSash];
|
||||
<div class="container">
|
||||
<div class="text-start display-4">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="NumberSash@(SashList.IndexOf(item) + 1)">Number</span>
|
||||
<input type="number" class="form-control" aria-label="NumberSash@(SashList.IndexOf(item) + 1)" @bind="@item.nSashQty">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<h5 class="card-title">Bottom rail</h5>
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="BottomRailQty@(SashList.IndexOf(item) + 1)">Quantity</span>
|
||||
<input type="number" class="form-control" aria-label="BottomRailQty" @bind="@item.SashBottomRailQty">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@for (int i = 0; i <= item.SashList.Count / 2; i++)
|
||||
{
|
||||
for (int j = 0; j < 2 && (i * 2 + j <= item.SashList.Count - 1); j++)
|
||||
{
|
||||
SashDimension sash = item.SashList[i * 2 + j];
|
||||
<div class="col-sm-6">
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
@if (item.SashList.Count == 1)
|
||||
{
|
||||
<h5 class="card-title">Opening</h5>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h5 class="card-title">Sash opening @(i * 2 + j + 1)</h5>
|
||||
}
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="OpeningSash@(i * 2 + j + 1)">Tipology</label>
|
||||
<select class="form-select" id="OpeningSash@(i * 2 + j + 1)" @bind="@sash.SelOpeningTypeIndex">
|
||||
<option value="0">A sinistra</option>
|
||||
<option value="1">A destra</option>
|
||||
<option value="2">Ad anta-ribalta sinistra</option>
|
||||
<option value="3">Ad anta-ribalta destra</option>
|
||||
<option value="4">Solo verso alto</option>
|
||||
<option value="5">Solo verso basso</option>
|
||||
<option value="6">Pivot</option>
|
||||
<option value="7">Fissa</option>
|
||||
<option value="8">Complanare sinistra</option>
|
||||
<option value="9">Complanare destra</option>
|
||||
<option value="10">Scorrevole sinistra</option>
|
||||
<option value="11">Scorrevole destra</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text">Dimension</span>
|
||||
<input type="number" class="form-control" aria-label="DimensionSash" @bind="@sash.dDimension">
|
||||
<span class="input-group-text">%</span>
|
||||
</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" id="HandleSashLabel@(i * 2 + j + 1)" checked="@sash.bHasHandle" @onclick="() => changeHandle(sash)">
|
||||
</div>
|
||||
<div class="px-2">
|
||||
<label class="form-check-label fs-6 text-dark" for="HandleSashLabel@(i * 2 + j + 1)">Handle</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row d-grid gap-1 d-md-flex justify-content-md-center">
|
||||
@for (int k = 1; k <= i*2+j; k++)
|
||||
{
|
||||
int IndexCopy = k;
|
||||
int IndexModify = i * 2 + j;
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => CopyContent(item, IndexCopy, IndexModify)">Copy @(k)</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<h5 class="card-title">Sash joints</h5>
|
||||
<div class="row p-0 m-0 text-center">
|
||||
<div class="col">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(1, 1)">Angled</button>
|
||||
</div>
|
||||
<div class="col">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(2, 1)">Horizontal</button>
|
||||
</div>
|
||||
<div class="col">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(3, 1)">Vertical</button>
|
||||
</div>
|
||||
</div>
|
||||
@foreach (Joint joint in item.JointList)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<h5 class="card-title">Orientation</h5>
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="IndexJoint@(item.JointList.IndexOf(joint) + 1)">@((positionJoints)(item.JointList.IndexOf(joint)))</label>
|
||||
<select class="form-select" id="IndexJoint@(item.JointList.IndexOf(joint) + 1)" @bind="@joint.SelJointTypeIndex">
|
||||
<option value="0">Angled</option>
|
||||
<option value="1">Full H</option>
|
||||
<option value="2">Full V</option>
|
||||
<label class="input-group-text" for="OrientationSash@(SashList.IndexOf(item) + 1)">Tipology</label>
|
||||
<select class="form-select" id="OrientationSash@(SashList.IndexOf(item) + 1)" @bind="@item.SelOrientationSashTypeIndex">
|
||||
<option value="0">Vertical</option>
|
||||
<option value="1">Horizontal</option>
|
||||
</select>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<h5 class="card-title">Bottom rail</h5>
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="BottomRailQty@(SashList.IndexOf(item) + 1)">Quantity</span>
|
||||
<input type="number" class="form-control" aria-label="BottomRailQty" @bind="@item.SashBottomRailQty">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
@for (int i = 0; i < item.AreaList.Count; i++)
|
||||
<div class="row">
|
||||
@for (int i = 0; i <= item.SashList.Count / 2; i++)
|
||||
{
|
||||
Area anta;
|
||||
@if (item.AreaList[i] is Splitted)
|
||||
for (int j = 0; j < 2 && (i * 2 + j <= item.SashList.Count - 1); j++)
|
||||
{
|
||||
anta = item.AreaList[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
anta = item;
|
||||
}
|
||||
@if (!(anta.AreaList[0] is Split))
|
||||
{
|
||||
<div class="col">
|
||||
SashDimension sash = item.SashList[i * 2 + j];
|
||||
<div class="col-sm-6">
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<h5 class="card-title">Anta @(i + 1)</h5>
|
||||
@if (item.SashList.Count == 1)
|
||||
{
|
||||
<h5 class="card-title">Opening</h5>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h5 class="card-title">Sash opening @(i * 2 + j + 1)</h5>
|
||||
}
|
||||
<div class="input-group mb-2">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => anta.AddSplit()">Aggiungi split</button>
|
||||
<label class="input-group-text" for="OpeningSash@(i * 2 + j + 1)">Tipology</label>
|
||||
<select class="form-select" id="OpeningSash@(i * 2 + j + 1)" @bind="@sash.SelOpeningTypeIndex">
|
||||
<option value="0">A sinistra</option>
|
||||
<option value="1">A destra</option>
|
||||
<option value="2">Ad anta-ribalta sinistra</option>
|
||||
<option value="3">Ad anta-ribalta destra</option>
|
||||
<option value="4">Solo verso alto</option>
|
||||
<option value="5">Solo verso basso</option>
|
||||
<option value="6">Pivot</option>
|
||||
<option value="7">Fissa</option>
|
||||
<option value="8">Complanare sinistra</option>
|
||||
<option value="9">Complanare destra</option>
|
||||
<option value="10">Scorrevole sinistra</option>
|
||||
<option value="11">Scorrevole destra</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text">Dimension</span>
|
||||
<input type="number" class="form-control" aria-label="DimensionSash" @bind="@sash.dDimension">
|
||||
<span class="input-group-text">%</span>
|
||||
</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" id="HandleSashLabel@(i * 2 + j + 1)" checked="@sash.bHasHandle" @onclick="() => changeHandle(sash)">
|
||||
</div>
|
||||
<div class="px-2">
|
||||
<label class="form-check-label fs-6 text-dark" for="HandleSashLabel@(i * 2 + j + 1)">Handle</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row d-grid gap-1 d-md-flex justify-content-md-center">
|
||||
@for (int k = 1; k <= i * 2 + j; k++)
|
||||
{
|
||||
int IndexCopy = k;
|
||||
int IndexModify = i * 2 + j;
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => CopyContent(item, IndexCopy, IndexModify)">Copy @(k)</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -652,10 +614,85 @@
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<h5 class="card-title">Sash joints</h5>
|
||||
<div class="row p-0 m-0 text-center">
|
||||
<div class="col">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(1, 1)">Angled</button>
|
||||
</div>
|
||||
<div class="col">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(2, 1)">Horizontal</button>
|
||||
</div>
|
||||
<div class="col">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(3, 1)">Vertical</button>
|
||||
</div>
|
||||
</div>
|
||||
@foreach (Joint joint in item.JointList)
|
||||
{
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="IndexJoint@(item.JointList.IndexOf(joint) + 1)">@((positionJoints)(item.JointList.IndexOf(joint)))</label>
|
||||
<select class="form-select" id="IndexJoint@(item.JointList.IndexOf(joint) + 1)" @bind="@joint.SelJointTypeIndex">
|
||||
<option value="0">Angled</option>
|
||||
<option value="1">Full H</option>
|
||||
<option value="2">Full V</option>
|
||||
</select>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
@for (int i = 0; i < item.AreaList.Count; i++)
|
||||
{
|
||||
Area anta;
|
||||
@if (item.AreaList[i] is Splitted)
|
||||
{
|
||||
anta = item.AreaList[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
anta = item;
|
||||
}
|
||||
@if (!(anta.AreaList[0] is Split))
|
||||
{
|
||||
<div class="col">
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<h5 class="card-title">Anta @(i + 1)</h5>
|
||||
<div class="input-group mb-2">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => anta.AddSplit(anta)">Aggiungi split</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<h5 class="card-title">Hardware</h5>
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="Hardware">Tipology</label>
|
||||
<select class="form-select" id="Hardware">
|
||||
@foreach (var hw in item.HardwareList)
|
||||
{
|
||||
<option value="@hw.sName">@hw.sName</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
else if (currStep == CompileStep.Fill)
|
||||
{
|
||||
|
||||
@@ -65,6 +65,10 @@ namespace WebWindowComplex
|
||||
m_ItemTableList = new List<ItemTable>();
|
||||
CreateWindowsList(m_CurrWindow.AreaList[0], false);
|
||||
CreateElementTable(m_CurrWindow.AreaList[0], 1, 1, 1, 1);
|
||||
foreach (var item in SashList)
|
||||
{
|
||||
item.RefreshHardwareList(IN_HardwareList, IN_FamilyHardware);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -72,6 +76,12 @@ namespace WebWindowComplex
|
||||
[Parameter]
|
||||
public List<TemplateSelectDTO> IN_TemplateDTOList { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public string IN_FamilyHardware { get; set; } = null;
|
||||
|
||||
[Parameter]
|
||||
public List<Hardware> IN_HardwareList { get; set; } = null;
|
||||
|
||||
[Parameter]
|
||||
public string LiveSVG
|
||||
{
|
||||
@@ -117,6 +127,14 @@ namespace WebWindowComplex
|
||||
Nero
|
||||
}
|
||||
|
||||
protected enum positionJoints
|
||||
{
|
||||
BL = 0, // Bottom Left
|
||||
BR = 1, // Bottom Right
|
||||
TR, // Top Right
|
||||
TL // Top Left
|
||||
}
|
||||
|
||||
#endregion Protected Enums
|
||||
|
||||
#region Protected Properties
|
||||
@@ -243,7 +261,7 @@ namespace WebWindowComplex
|
||||
// popolo le liste Fill, Sash e Split
|
||||
CreateWindowsList(m_CurrWindow.AreaList[0], false);
|
||||
CreateElementTable(m_CurrWindow.AreaList[0], 1, 1, 1, 1);
|
||||
//currSash = -1;
|
||||
currSash = -1;
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
@@ -565,14 +583,35 @@ namespace WebWindowComplex
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
private void CopyContent(Sash sashItem, int IndexCopy, int IndexModify)
|
||||
/// <summary>
|
||||
/// Metodo per copiare contenuto di un'anta in un'altra anta
|
||||
/// </summary>
|
||||
/// <param name="sashItem">Sash dove si torva anta </param>
|
||||
/// <param name="IndexCopy">Indice dell'anta che si copia</param>
|
||||
/// <param name="IndexModify">Indice dell'anta che si modifica</param>
|
||||
private async Task CopyContent(Sash sashItem, int IndexCopy, int IndexModify)
|
||||
{
|
||||
// Anta selezionata
|
||||
Area sashSplitted = sashItem.AreaList[IndexModify];
|
||||
// Rimuovo riempimento da anta selezionata
|
||||
sashItem.AreaList[IndexModify].AreaList.RemoveAt(0);
|
||||
sashSplitted.AreaList.RemoveAt(0);
|
||||
// Creo la copia dell'anta scelta
|
||||
Area a = sashItem.AreaList[IndexCopy-1].AreaList[0].Copy();
|
||||
Area a = sashItem.AreaList[IndexCopy-1].AreaList[0].Copy(sashSplitted);
|
||||
// Aggiungo copia all'anta selezionata
|
||||
sashItem.AreaList[IndexModify].AreaList.Add(a);
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
private async Task CopySplitted(Splitted currSplitted, int numSash)
|
||||
{
|
||||
//Rimuovo contenuto di Splitted
|
||||
currSplitted.AreaList.RemoveAll(i => i != null);
|
||||
// Copio sash
|
||||
Area a = SashList[numSash].Copy(currSplitted);
|
||||
a.SetParentArea(currSplitted);
|
||||
// Aggiungo copia a Splitted
|
||||
currSplitted.AreaList.Add(a);
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
private async Task SwapTwoAree(Area currArea)
|
||||
@@ -581,7 +620,6 @@ namespace WebWindowComplex
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
@@ -609,14 +647,6 @@ namespace WebWindowComplex
|
||||
private int m_maxCol = 0;
|
||||
private int m_maxRow = 0;
|
||||
|
||||
private enum positionJoints
|
||||
{
|
||||
BL = 0, // Bottom Left
|
||||
BR = 1, // Bottom Right
|
||||
TR, // Top Right
|
||||
TL // Top Left
|
||||
}
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
+212
-187
@@ -155,7 +155,7 @@ namespace WebWindowComplex
|
||||
|
||||
internal abstract JsonArea Serialize();
|
||||
|
||||
public void AddSplit()
|
||||
public void AddSplit(Area ParentArea)
|
||||
{
|
||||
List<Area> ContentArea = new List<Area>();
|
||||
// Salvo gli oggetti già presenti e li cancello da AreaList
|
||||
@@ -171,17 +171,19 @@ namespace WebWindowComplex
|
||||
List<Splitted> newSplittedList = new List<Splitted>();
|
||||
for (int i = 0; i < 2; i++)
|
||||
newSplittedList.Add(Splitted.CreateSplitted(SplitArea));
|
||||
// Inserisco nelle aree Splitted il Fill salvato e un Fill uguale (e setto ParentArea)
|
||||
// Inserisco nelle aree Splitted il Fill salvato e un Fill uguale (e setto ParentArea del fill)
|
||||
ContentArea[0].SetParentArea(newSplittedList[0]);
|
||||
newSplittedList[0].AreaList.Add(ContentArea[0]);
|
||||
newSplittedList[0].AreaList[0].SetParentArea(newSplittedList[0]);
|
||||
if (ContentArea[0] is Fill)
|
||||
{
|
||||
Fill fill2 = (Fill)ContentArea[0];
|
||||
newSplittedList[1].AreaList.Add(Fill.CreateFill(newSplittedList[1], fill2.FillType));
|
||||
Fill fill1 = (Fill)ContentArea[0];
|
||||
Fill fill2 = Fill.CreateFill(newSplittedList[1], fill1.FillType);
|
||||
newSplittedList[1].AreaList.Add(fill2);
|
||||
}
|
||||
else
|
||||
{
|
||||
newSplittedList[1].AreaList.Add(Fill.CreateFill(newSplittedList[1], FillTypes.GLASS));
|
||||
Fill fill2 = Fill.CreateFill(newSplittedList[1], FillTypes.GLASS);
|
||||
newSplittedList[1].AreaList.Add(fill2);
|
||||
}
|
||||
// All'area Split aggiunto le due aree Splitted
|
||||
for (int i = 0; i < 2; i++)
|
||||
@@ -233,7 +235,7 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
public abstract Area Copy();
|
||||
public abstract Area Copy(Area ParentArea);
|
||||
}
|
||||
|
||||
public class Frame : Area
|
||||
@@ -636,7 +638,7 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
public override Frame Copy()
|
||||
public override Frame Copy(Area ParentArea)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -700,9 +702,7 @@ namespace WebWindowComplex
|
||||
}
|
||||
else
|
||||
{
|
||||
// Se tolgo singola anta, ma tengo split
|
||||
SashList.RemoveAt(0);
|
||||
|
||||
}
|
||||
}
|
||||
if(m_SashList.Count == 0)
|
||||
@@ -1063,107 +1063,107 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
//private Hardware m_SelHardware;
|
||||
//public Hardware SelHardware
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// return m_SelHardware;
|
||||
// }
|
||||
// set
|
||||
// {
|
||||
// m_SelHardware = value;
|
||||
// if (m_SelHardware != null && m_SelHardware.sId != "000000")
|
||||
// {
|
||||
// string sHwdOptPath = "";
|
||||
// var gf = EgtLuaCreateGlobTable("WDG");
|
||||
// var tft = EgtLuaSetGlobIntVar("WDG.AREAID", m_nAreaId);
|
||||
// var tfy = EgtLuaSetGlobStringVar("WDG.HDWFAVOURITE", value.sId);
|
||||
// SashDimension HandleSash = m_SashList.FirstOrDefault(x => x.bHasHandle);
|
||||
// string sHandle = "Dx";
|
||||
// switch (GetOpeningSide(HandleSash.OpeningType))
|
||||
// {
|
||||
// case object _ when OpeningSides.LEFT:
|
||||
// {
|
||||
// sHandle = "Sx";
|
||||
// break;
|
||||
// }
|
||||
private Hardware m_SelHardware;
|
||||
public Hardware SelHardware
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SelHardware;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_SelHardware = value;
|
||||
// if (m_SelHardware != null && m_SelHardware.sId != "000000")
|
||||
// {
|
||||
// string sHwdOptPath = "";
|
||||
// var gf = EgtLuaCreateGlobTable("WDG");
|
||||
// var tft = EgtLuaSetGlobIntVar("WDG.AREAID", m_nAreaId);
|
||||
// var tfy = EgtLuaSetGlobStringVar("WDG.HDWFAVOURITE", value.sId);
|
||||
// SashDimension HandleSash = m_SashList.FirstOrDefault(x => x.bHasHandle);
|
||||
// string sHandle = "Dx";
|
||||
// switch (GetOpeningSide(HandleSash.OpeningType))
|
||||
// {
|
||||
// case object _ when OpeningSides.LEFT:
|
||||
// {
|
||||
// sHandle = "Sx";
|
||||
// break;
|
||||
// }
|
||||
|
||||
// case object _ when OpeningSides.RIGHT:
|
||||
// {
|
||||
// sHandle = "Dx";
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// var tfd = EgtLuaSetGlobStringVar("WDG.HDWHANDLE", sHandle);
|
||||
// var tlt = EgtLuaCallFunction("WinCreate_GetHardwareOptionPath");
|
||||
// var tltf = EgtLuaGetGlobStringVar("WDG.HWDOPTPATH", sHwdOptPath);
|
||||
// if (!string.IsNullOrWhiteSpace(sHwdOptPath))
|
||||
// {
|
||||
// XmlSerializer serializer = new XmlSerializer(typeof(ParametriOpzioni));
|
||||
// ParametriOpzioni HwdOptions = null/* TODO Change to default(_) if this is not a reference type */;
|
||||
// string sHdwOptPath = Path.ChangeExtension(sHwdOptPath, ".opt");
|
||||
// bool bHdwOptFound = false;
|
||||
// for (var WaitIndex = 0; WaitIndex <= 100; WaitIndex++)
|
||||
// {
|
||||
// if (File.Exists(sHdwOptPath))
|
||||
// {
|
||||
// bHdwOptFound = true;
|
||||
// break;
|
||||
// }
|
||||
// System.Threading.Thread.Sleep(100);
|
||||
// }
|
||||
// if (bHdwOptFound)
|
||||
// {
|
||||
// string sHwdOptText = "";
|
||||
// try
|
||||
// {
|
||||
// sHwdOptText = File.ReadAllText(sHdwOptPath);
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// EgtOutLog("Hardware file opt not found or read!");
|
||||
// }
|
||||
// if (!string.IsNullOrWhiteSpace(sHwdOptText))
|
||||
// {
|
||||
// using (TextReader reader = new StringReader(sHwdOptText))
|
||||
// {
|
||||
// HwdOptions = serializer.Deserialize(reader);
|
||||
// }
|
||||
// if (!IsNothing(HwdOptions))
|
||||
// {
|
||||
// m_HwdOptionList.Clear();
|
||||
// foreach (var HdwOption in HwdOptions.Items)
|
||||
// m_HwdOptionList.Add(new AGBOption(HdwOption));
|
||||
// NotifyPropertyChanged(nameof(HwdOptionList));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// var ud = EgtLuaResetGlobVar("WDG");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
// case object _ when OpeningSides.RIGHT:
|
||||
// {
|
||||
// sHandle = "Dx";
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// var tfd = EgtLuaSetGlobStringVar("WDG.HDWHANDLE", sHandle);
|
||||
// var tlt = EgtLuaCallFunction("WinCreate_GetHardwareOptionPath");
|
||||
// var tltf = EgtLuaGetGlobStringVar("WDG.HWDOPTPATH", sHwdOptPath);
|
||||
// if (!string.IsNullOrWhiteSpace(sHwdOptPath))
|
||||
// {
|
||||
// XmlSerializer serializer = new XmlSerializer(typeof(ParametriOpzioni));
|
||||
// ParametriOpzioni HwdOptions = null/* TODO Change to default(_) if this is not a reference type */;
|
||||
// string sHdwOptPath = Path.ChangeExtension(sHwdOptPath, ".opt");
|
||||
// bool bHdwOptFound = false;
|
||||
// for (var WaitIndex = 0; WaitIndex <= 100; WaitIndex++)
|
||||
// {
|
||||
// if (File.Exists(sHdwOptPath))
|
||||
// {
|
||||
// bHdwOptFound = true;
|
||||
// break;
|
||||
// }
|
||||
// System.Threading.Thread.Sleep(100);
|
||||
// }
|
||||
// if (bHdwOptFound)
|
||||
// {
|
||||
// string sHwdOptText = "";
|
||||
// try
|
||||
// {
|
||||
// sHwdOptText = File.ReadAllText(sHdwOptPath);
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// EgtOutLog("Hardware file opt not found or read!");
|
||||
// }
|
||||
// if (!string.IsNullOrWhiteSpace(sHwdOptText))
|
||||
// {
|
||||
// using (TextReader reader = new StringReader(sHwdOptText))
|
||||
// {
|
||||
// HwdOptions = serializer.Deserialize(reader);
|
||||
// }
|
||||
// if (!IsNothing(HwdOptions))
|
||||
// {
|
||||
// m_HwdOptionList.Clear();
|
||||
// foreach (var HdwOption in HwdOptions.Items)
|
||||
// m_HwdOptionList.Add(new AGBOption(HdwOption));
|
||||
// NotifyPropertyChanged(nameof(HwdOptionList));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// var ud = EgtLuaResetGlobVar("WDG");
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
//internal void SetSelHardware(Hardware value)
|
||||
//{
|
||||
// m_SelHardware = value;
|
||||
//}
|
||||
internal void SetSelHardware(Hardware value)
|
||||
{
|
||||
m_SelHardware = value;
|
||||
}
|
||||
|
||||
//internal void SetSelHardwareFromId(string sId)
|
||||
//{
|
||||
// m_SelHardware = m_HardwareList.FirstOrDefault(x => x.sId == sId);
|
||||
// if (IsNothing(m_SelHardware))
|
||||
// m_SelHardware = m_HardwareList(0);
|
||||
//}
|
||||
internal void SetSelHardwareFromId(string sId)
|
||||
{
|
||||
m_SelHardware = m_HardwareList.FirstOrDefault(x => x.sId == sId);
|
||||
if (m_SelHardware != null)
|
||||
m_SelHardware = m_HardwareList[0];
|
||||
}
|
||||
|
||||
//internal void SetFirstHardware()
|
||||
//{
|
||||
// if (m_HardwareList.Count > 0)
|
||||
// {
|
||||
// m_SelHardware = m_HardwareList(0);
|
||||
// }
|
||||
//}
|
||||
internal void SetFirstHardware()
|
||||
{
|
||||
if (m_HardwareList.Count > 0)
|
||||
{
|
||||
m_SelHardware = m_HardwareList[0];
|
||||
}
|
||||
}
|
||||
|
||||
private ObservableCollection<AGBOption> m_HwdOptionList = new ObservableCollection<AGBOption>();
|
||||
public ObservableCollection<AGBOption> HwdOptionList
|
||||
@@ -1197,6 +1197,11 @@ namespace WebWindowComplex
|
||||
//NewSash.SetFirstHardware();
|
||||
return NewSash;
|
||||
}
|
||||
private string FindSashShape()
|
||||
{
|
||||
// Return "R"
|
||||
return "RECTANGLE";
|
||||
}
|
||||
|
||||
internal OpeningTypes GetOpeningType(Openings OpeningType)
|
||||
{
|
||||
@@ -1251,109 +1256,120 @@ namespace WebWindowComplex
|
||||
|
||||
private string ConvertOpeningType()
|
||||
{
|
||||
if (m_SashList.Any(x => GetOpeningType(x.OpeningType) == OpeningTypes.TILTTURN))
|
||||
return "AR";
|
||||
if(m_SashList.Count > 1)
|
||||
{
|
||||
if (GetOpeningType(m_SashList[0].OpeningType) == OpeningTypes.TURNONLY)
|
||||
return "ANTA_BANDIERA";
|
||||
else
|
||||
return "ANTA_RIBALTA";
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (GetOpeningType(m_SashList[0].OpeningType))
|
||||
{
|
||||
case OpeningTypes.TILTTURN:
|
||||
{
|
||||
return "ANTA_RIBALTA";
|
||||
}
|
||||
case OpeningTypes.TURNONLY:
|
||||
{
|
||||
return "AB";
|
||||
return "ANTA_BANDIERA";
|
||||
}
|
||||
|
||||
case OpeningTypes.TILTONLY:
|
||||
{
|
||||
return "VA";
|
||||
return "VASISTAS";
|
||||
}
|
||||
|
||||
case OpeningTypes.PIVOT:
|
||||
{
|
||||
return "BI";
|
||||
return "PIVOT";
|
||||
}
|
||||
|
||||
case OpeningTypes.COMPLANARSLIDE:
|
||||
{
|
||||
return "CO";
|
||||
return "COMPLANARE";
|
||||
}
|
||||
|
||||
case OpeningTypes.LIFTSLIDE:
|
||||
{
|
||||
return "AS";
|
||||
return "ALZANTE_SCORREVOLE";
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//internal void RefreshHardwareList()
|
||||
//{
|
||||
// m_HardwareList.Clear();
|
||||
// string sSashShape = FindSashShape();
|
||||
// string sOpeningType = ConvertOpeningType();
|
||||
// m_HardwareList = new ObservableCollection<Hardware>(from Hardware in Map.refManageWindowVM.HardwareList
|
||||
// where Hardware.sId == "000000" || (Hardware.nSashQty == nSashQty && Hardware.sShape == sSashShape && Hardware.sOpeningType == sOpeningType)
|
||||
// select Hardware);
|
||||
//}
|
||||
public void RefreshHardwareList(List<Hardware> HardwareCompleteList, string nameFamily)
|
||||
{
|
||||
m_HardwareList.Clear();
|
||||
string sSashShape = FindSashShape();
|
||||
string sOpeningType = ConvertOpeningType();
|
||||
m_HardwareList = new ObservableCollection<Hardware>(from Hardware in HardwareCompleteList
|
||||
where Hardware.sId == "000000" || (Hardware.sFamily == nameFamily && Hardware.nSashQty == nSashQty && Hardware.sShape == sSashShape && Hardware.sOpeningType == sOpeningType)
|
||||
select Hardware);
|
||||
}
|
||||
|
||||
internal void RefreshHardwareOptionList()
|
||||
{
|
||||
m_HwdOptionList.Clear();
|
||||
}
|
||||
|
||||
internal OpeningSides GetOpeningSide(Openings OpeningType)
|
||||
//internal OpeningSides GetOpeningSide(Openings OpeningType)
|
||||
//{
|
||||
// switch (OpeningType)
|
||||
// {
|
||||
// case Openings.TURNONLY_LEFT:
|
||||
// case Openings.TILTTURN_LEFT:
|
||||
// case Openings.TILTONLY_TOP:
|
||||
// case Openings.COMPLANARSLIDE_LEFT:
|
||||
// case Openings.LIFTSLIDE_LEFT:
|
||||
// {
|
||||
// return OpeningSides.LEFT;
|
||||
// }
|
||||
|
||||
// case Openings.TURNONLY_RIGHT:
|
||||
// case Openings.TILTTURN_RIGHT:
|
||||
// case Openings.TILTONLY_BOTTOM:
|
||||
// case Openings.COMPLANARSLIDE_RIGHT:
|
||||
// case Openings.LIFTSLIDE_RIGHT:
|
||||
// {
|
||||
// return OpeningSides.RIGHT;
|
||||
// }
|
||||
|
||||
// default:
|
||||
// {
|
||||
// return OpeningSides.NULL;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
public override Sash Copy(Area newParentArea)
|
||||
{
|
||||
switch (OpeningType)
|
||||
{
|
||||
case Openings.TURNONLY_LEFT:
|
||||
case Openings.TILTTURN_LEFT:
|
||||
case Openings.TILTONLY_TOP:
|
||||
case Openings.COMPLANARSLIDE_LEFT:
|
||||
case Openings.LIFTSLIDE_LEFT:
|
||||
{
|
||||
return OpeningSides.LEFT;
|
||||
}
|
||||
|
||||
case Openings.TURNONLY_RIGHT:
|
||||
case Openings.TILTTURN_RIGHT:
|
||||
case Openings.TILTONLY_BOTTOM:
|
||||
case Openings.COMPLANARSLIDE_RIGHT:
|
||||
case Openings.LIFTSLIDE_RIGHT:
|
||||
{
|
||||
return OpeningSides.RIGHT;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
return OpeningSides.NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override Sash Copy()
|
||||
{
|
||||
Sash newSash = new Sash(ParentArea, m_ParentWindow);
|
||||
Sash newSash = new Sash(newParentArea, m_ParentWindow);
|
||||
newSash.SetAreaType(AreaType);
|
||||
// Imposta la quantità di ante e definisce SashDimension di ogni anta ai valori di default
|
||||
newSash.SetSashQty(nSashQty);
|
||||
newSash.SetIsSashVertical(bIsSashVertical);
|
||||
newSash.SetOrientationSashType(OrientationSashType);
|
||||
newSash.SetSashBottomRailQty(SashBottomRailQty);
|
||||
foreach (var item in SashList)
|
||||
for (int i = 0; i <SashList.Count; i++)
|
||||
{
|
||||
SashDimension dim = item.Copy();
|
||||
newSash.SashList.Add(dim);
|
||||
//Cancello SashDimension di default e aggiungo la copia
|
||||
newSash.SashList.RemoveAt(i);
|
||||
SashDimension newSashDim = SashList[i].Copy();
|
||||
newSash.SashList.Insert(i,newSashDim);
|
||||
}
|
||||
foreach (var item in JointList)
|
||||
{
|
||||
Joint j = item.Copy();
|
||||
newSash.JointList.Add(j);
|
||||
Joint newJoint = item.Copy();
|
||||
newSash.JointList.Add(newJoint);
|
||||
}
|
||||
foreach (var item in AreaList)
|
||||
{
|
||||
Area a = item.Copy();
|
||||
newSash.AreaList.Add(a);
|
||||
Area newArea = item.Copy(newSash);
|
||||
newSash.AreaList.Add(newArea);
|
||||
}
|
||||
return newSash;
|
||||
}
|
||||
@@ -1416,19 +1432,17 @@ namespace WebWindowComplex
|
||||
dLastDimension += m_SplitPositionList[SplitPositionList.Count - 1].dDimension;
|
||||
SplitPositionList[SplitPositionList.Count - 1].SetDimension(dLastDimension);
|
||||
}
|
||||
for(var SplitIndex = AreaList.Count; SplitIndex <= SplitPositionList.Count - 1; SplitIndex++)
|
||||
// Se aggiungo split devo aggiungere vetro nell'area splitted aggiunta
|
||||
for (var SplitIndex = AreaList.Count; SplitIndex <= SplitPositionList.Count - 1; SplitIndex++)
|
||||
{
|
||||
AreaList.Add(Splitted.CreateSplitted(this));
|
||||
if(AreaList[AreaList.Count - 2].AreaList[0] is Fill)
|
||||
{
|
||||
Fill f1 = (Fill)AreaList[AreaList.Count - 2].AreaList[0];
|
||||
AreaList.Last().AreaList.Add(Fill.CreateFill(AreaList.Last(), f1.FillType));
|
||||
}
|
||||
else
|
||||
AreaList.Last().AreaList.Add(Fill.CreateFill(AreaList.Last(), FillTypes.GLASS));
|
||||
Fill newFill = new Fill(AreaList.Last(), ParentWindow);
|
||||
newFill.SetFillType(FillTypes.GLASS);
|
||||
newFill.SetAreaType(AreaTypes.FILL);
|
||||
AreaList[AreaList.Count - 1].AreaList.Add(newFill);
|
||||
}
|
||||
// Se ho più di uno split, elimino l'ultimo
|
||||
if(AreaList.Count > 2)
|
||||
if (AreaList.Count > 2)
|
||||
{
|
||||
for (var SplitIndex = SplitPositionList.Count; SplitIndex <= AreaList.Count - 1; SplitIndex++)
|
||||
{
|
||||
@@ -1439,6 +1453,7 @@ namespace WebWindowComplex
|
||||
else
|
||||
{
|
||||
Splitted s = (Splitted)AreaList[0];
|
||||
s.SetParentArea(ParentArea);
|
||||
ParentArea.AreaList.Add(s.AreaList[0]);
|
||||
ParentArea.AreaList.Remove(this);
|
||||
}
|
||||
@@ -1559,15 +1574,15 @@ namespace WebWindowComplex
|
||||
return Split;
|
||||
}
|
||||
|
||||
public override Split Copy()
|
||||
public override Split Copy(Area newParentArea)
|
||||
{
|
||||
Split newSplit = new Split(ParentArea, ParentWindow);
|
||||
Split newSplit = new Split(newParentArea, ParentWindow);
|
||||
newSplit.SetSplitQty(nSplitQty);
|
||||
newSplit.SetSplitShape(SelSplitShape, true);
|
||||
newSplit.SetAreaType(AreaType);
|
||||
foreach(var item in AreaList)
|
||||
{
|
||||
Area a = item.Copy();
|
||||
Area a = item.Copy(newSplit);
|
||||
newSplit.AreaList.Add(a);
|
||||
}
|
||||
return newSplit;
|
||||
@@ -1591,20 +1606,20 @@ namespace WebWindowComplex
|
||||
{
|
||||
}
|
||||
|
||||
internal static Splitted CreateSplitted(Area Area)
|
||||
internal static Splitted CreateSplitted(Area ParentArea)
|
||||
{
|
||||
Splitted Splitted = new Splitted(Area, Area.ParentWindow);
|
||||
Splitted Splitted = new Splitted(ParentArea, ParentArea.ParentWindow);
|
||||
Splitted.SetAreaType(AreaTypes.SPLITTED);
|
||||
return Splitted;
|
||||
}
|
||||
|
||||
public override Splitted Copy()
|
||||
public override Splitted Copy(Area newParentArea)
|
||||
{
|
||||
Splitted newSplitted = new Splitted(ParentArea, ParentWindow);
|
||||
Splitted newSplitted = new Splitted(newParentArea, ParentWindow);
|
||||
newSplitted.SetAreaType(AreaType);
|
||||
foreach (var item in AreaList)
|
||||
{
|
||||
Area a = item.Copy();
|
||||
Area a = item.Copy(newSplitted);
|
||||
newSplitted.AreaList.Add(a);
|
||||
}
|
||||
return newSplitted;
|
||||
@@ -1674,17 +1689,17 @@ namespace WebWindowComplex
|
||||
{
|
||||
}
|
||||
|
||||
internal static Fill CreateFill(Area Area, FillTypes FillType)
|
||||
internal static Fill CreateFill(Area AreaParent, FillTypes FillType)
|
||||
{
|
||||
Fill Fill = new Fill(Area, Area.ParentWindow);
|
||||
Fill Fill = new Fill(AreaParent, AreaParent.ParentWindow);
|
||||
Fill.SetAreaType(AreaTypes.FILL);
|
||||
Fill.SetFillType(FillType);
|
||||
return Fill;
|
||||
}
|
||||
|
||||
public override Fill Copy()
|
||||
public override Fill Copy(Area newParentArea)
|
||||
{
|
||||
Fill newFill = new Fill(ParentArea, m_ParentWindow);
|
||||
Fill newFill = new Fill(newParentArea, m_ParentWindow);
|
||||
newFill.SetFillType(SelFillType);
|
||||
newFill.SetAreaType(AreaType);
|
||||
return newFill;
|
||||
@@ -1835,6 +1850,15 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
private string m_sFamily;
|
||||
public string sFamily
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_sFamily;
|
||||
}
|
||||
}
|
||||
|
||||
private string m_sName;
|
||||
public string sName
|
||||
{
|
||||
@@ -1880,9 +1904,10 @@ namespace WebWindowComplex
|
||||
}
|
||||
}
|
||||
|
||||
public Hardware(string sId, string sName, string sOpeningType, string sShape, int nSashQty, int nSashPosition)
|
||||
public Hardware(string sId, string sFamily, string sName, string sOpeningType, string sShape, int nSashQty, int nSashPosition)
|
||||
{
|
||||
m_sId = sId;
|
||||
m_sFamily = sFamily;
|
||||
m_sName = sName;
|
||||
m_sOpeningType = sOpeningType;
|
||||
m_sShape = sShape;
|
||||
@@ -2123,7 +2148,7 @@ namespace WebWindowComplex
|
||||
{
|
||||
m_SelOpeningType = value;
|
||||
//m_Parent.RefreshHardwareList();
|
||||
m_Parent.RefreshHardwareOptionList();
|
||||
//m_Parent.RefreshHardwareOptionList();
|
||||
//m_Parent.SetFirstHardware();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>2.7.9.913</Version>
|
||||
<Version>2.7.9.1018</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione JWD per LUX</Description>
|
||||
@@ -244,6 +244,24 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="card text-center table-svg">
|
||||
<div class="card-header" style="background-color: #d5f1f2;">
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<div class="col-8 d-grid gap-2 d-md-flex justify-content-md-start">
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
<li class="nav-item">
|
||||
@if (currStep == CompileStep.Template)
|
||||
@@ -20,10 +20,13 @@
|
||||
<li class="nav-item">
|
||||
<a data-target="#Frame" class="@tabNavCss(CompileStep.Frame)" aria-current="true" @onclick="() => NextStepAndPreview(CompileStep.Frame)">Frame</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a data-target="#Split" class="@tabNavCss(CompileStep.Split)" aria-current="true" @onclick="() => NextStepAndPreview(CompileStep.Split)">Split</a>
|
||||
</li>
|
||||
@if (m_SashList.Count > 0)
|
||||
@if (SplitList.Count > 0)
|
||||
{
|
||||
<li class="nav-item">
|
||||
<a data-target="#Split" class="@tabNavCss(CompileStep.Split)" aria-current="true" @onclick="() => NextStepAndPreview(CompileStep.Split)">Split</a>
|
||||
</li>
|
||||
}
|
||||
@if (SashList.Count > 0)
|
||||
{
|
||||
@for (int i = 0; i < SashList.Count; i++)
|
||||
{
|
||||
@@ -32,9 +35,6 @@
|
||||
<a data-target="#Sash" class="@tabNavCss(CompileStep.Sash, Index)" aria-current="true" @onclick="() => NextStepAndPreview(CompileStep.Sash, Index)">Sash @(SashList.Count == 1 ? "" : Index + 1)</a>
|
||||
</li>
|
||||
}
|
||||
@* <li class="nav-item">
|
||||
<a data-target="#Sash" class="@tabNavCss(CompileStep.Sash)" aria-current="true" @onclick="() => NextStepAndPreview(CompileStep.Sash)">Sash</a>
|
||||
</li> *@
|
||||
}
|
||||
<li class="nav-item">
|
||||
<a data-target="#Fill" class="@tabNavCss(CompileStep.Fill)" aria-current="true" @onclick="() => NextStepAndPreview(CompileStep.Fill)">Fill</a>
|
||||
@@ -46,12 +46,18 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-4 d-grid gap-2 d-md-flex justify-content-md-end">
|
||||
<button class="btn btn-lg btn-primary" style="font-size: 1rem;" @onclick="DoSave">Save</button>
|
||||
@if(currStep != CompileStep.Template)
|
||||
@if (currStep != CompileStep.Template)
|
||||
{
|
||||
<button class="btn btn-lg btn-primary" style="font-size: 1rem;" @onclick="DoReset">Reset</button>
|
||||
<div class="col-4">
|
||||
<button class="btn btn-lg btn-primary" style="font-size: 1rem;" @onclick="DoReset">Reset</button>
|
||||
</div>
|
||||
}
|
||||
<button class="btn btn-lg btn-primary" style="font-size: 1rem;" @onclick="DoClose">Close</button>
|
||||
<div class="col-4">
|
||||
<button class="btn btn-lg btn-primary" style="font-size: 1rem;" @onclick="DoSave">Save</button>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<button class="btn btn-lg btn-primary" style="font-size: 1rem;" @onclick="DoClose">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -164,96 +170,109 @@
|
||||
}
|
||||
else if (currStep == CompileStep.Split)
|
||||
{
|
||||
int numSash = 1;
|
||||
int numSplit = 1;
|
||||
int numSplit = 0;
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="text-start p-1 display-4">
|
||||
<div class="row">
|
||||
@for(int i = 0; i < SplitParentList.Count; i++)
|
||||
@for (int i = 0; i < SplitList.Count; i++)
|
||||
{
|
||||
@for (int j = 0; j < 2 && (i * 2 + j <= SplitParentList.Count - 1); j++)
|
||||
{
|
||||
SplitParent currSplitParent = m_SplitParentList[i * 2 + j];
|
||||
@if (currSplitParent.Split != null)
|
||||
{
|
||||
Split currSplit = (Split)currSplitParent.Split;
|
||||
<div class="col-sm-6">
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
@if(currSplitParent.Description.Contains("Sash"))
|
||||
Split currSplit = SplitList[i];
|
||||
<div class="col-sm-6">
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
@if ((currSplit.ParentArea is Splitted || currSplit.ParentArea is Sash) && SashList.Count > 0)
|
||||
{
|
||||
@for (int j = 0; j < SashList.Count; j++)
|
||||
{
|
||||
@if (SashList[j].Equals(currSplit.ParentArea))
|
||||
{
|
||||
<h5>@("Area " + currSplitParent.Description + " " + numSash )</h5>
|
||||
numSash++;
|
||||
<h5>@("Sash " + (j + 1))</h5>
|
||||
}
|
||||
else if(currSplitParent.Description.Contains("Split"))
|
||||
else if (SashList[j].Equals(currSplit.ParentArea.ParentArea))
|
||||
{
|
||||
@for (int k = 0; k < SashList[j].AreaList.Count; k++)
|
||||
{
|
||||
@if (SashList[j].AreaList[k].AreaList[0].Equals(currSplit))
|
||||
{
|
||||
<h5>@("Sash " + (j + 1) + " - anta " + (k + 1))</h5>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (currSplit.ParentArea is Splitted)
|
||||
{
|
||||
for(int j = 0; j < SplittedList.Count; j++)
|
||||
{
|
||||
if (SplittedList[j].Equals(currSplit.ParentArea))
|
||||
{
|
||||
<h5>@("Area " + currSplitParent.Description + " " + numSplit)</h5>
|
||||
numSplit++;
|
||||
<h5>@("Area di split " + numSplit)</h5>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h5>@("Area " + currSplitParent.Description)</h5>
|
||||
}
|
||||
<div class="col">
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<h5>Split</h5>
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => SwapTwoAree(currSplitParent.Split)">Swap Aree</button>
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="SplitQty@(m_SplitParentList.IndexOf(currSplitParent) + 1)">Number</span>
|
||||
<input type="number" class="form-control" placeholder="0" aria-label="basic-addon1Split" @bind="@currSplit.nSplitQty">
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="ShapeSplit@(m_SplitParentList.IndexOf(currSplitParent) + 1)">Shape</label>
|
||||
<select class="form-select" id="ShapeSplit@(m_SplitParentList.IndexOf(currSplitParent) + 1)" @bind="@currSplit.SelSplitShapeIndex">
|
||||
<option value="0">Vertical</option>
|
||||
<option value="1">Horizontal</option>
|
||||
<option value="2">Grid</option>
|
||||
<option value="3">Custom</option>
|
||||
</select>
|
||||
</div>
|
||||
@foreach (var dim in currSplit.SplitPositionList)
|
||||
{
|
||||
string desc = "";
|
||||
@if (currSplit.SelSplitShape == Json.WindowConst.SplitShapes.VERTICAL)
|
||||
{
|
||||
@if (currSplit.SplitPositionList.IndexOf(dim) == 0)
|
||||
{
|
||||
desc = "Larg. area sx split";
|
||||
}
|
||||
else
|
||||
{
|
||||
desc = "Larg. area dx split";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (currSplit.SplitPositionList.IndexOf(dim) == 0)
|
||||
{
|
||||
desc = "Altez. area sotto split";
|
||||
}
|
||||
else
|
||||
{
|
||||
desc = "Altez. area sopra split";
|
||||
}
|
||||
}
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="SplitDimension@(currSplit.SplitPositionList.IndexOf(dim) + 1)">@desc</span>
|
||||
<input type="number" class="form-control" aria-label="basic-addon2Split" @bind="@dim.dDimension">
|
||||
<span class="input-group-text">%</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<h5>@("Frame")</h5>
|
||||
}
|
||||
<div class="col">
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<h5>Split</h5>
|
||||
<div class="input-group mb-2 justify-content-center">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => SwapTwoAree(currSplit)">Swap Aree</button>
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="SplitQty@(m_SplitList.IndexOf(currSplit) + 1)">Number</span>
|
||||
<input type="number" class="form-control" placeholder="0" aria-label="basic-addon1Split" @bind="@currSplit.nSplitQty">
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="ShapeSplit@(m_SplitList.IndexOf(currSplit) + 1)">Shape</label>
|
||||
<select class="form-select" id="ShapeSplit@(m_SplitList.IndexOf(currSplit) + 1)" @bind="@currSplit.SelSplitShapeIndex">
|
||||
<option value="0">Vertical</option>
|
||||
<option value="1">Horizontal</option>
|
||||
<option value="2">Grid</option>
|
||||
<option value="3">Custom</option>
|
||||
</select>
|
||||
</div>
|
||||
@foreach (var dim in currSplit.SplitPositionList)
|
||||
{
|
||||
string desc = "";
|
||||
@if (currSplit.SelSplitShape == Json.WindowConst.SplitShapes.VERTICAL)
|
||||
{
|
||||
@if (currSplit.SplitPositionList.IndexOf(dim) == 0)
|
||||
{
|
||||
desc = "Larg. area sx split";
|
||||
}
|
||||
else
|
||||
{
|
||||
desc = "Larg. area dx split";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (currSplit.SplitPositionList.IndexOf(dim) == 0)
|
||||
{
|
||||
desc = "Altez. area sotto split";
|
||||
}
|
||||
else
|
||||
{
|
||||
desc = "Altez. area sopra split";
|
||||
}
|
||||
}
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="SplitDimension@(currSplit.SplitPositionList.IndexOf(dim) + 1)">@desc</span>
|
||||
<input type="number" class="form-control" aria-label="basic-addon2Split" @bind="@dim.dDimension">
|
||||
<span class="input-group-text">%</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@@ -262,98 +281,165 @@
|
||||
}
|
||||
else if (currStep == CompileStep.Sash)
|
||||
{
|
||||
@if (currSash > SashList.Count)
|
||||
@if (currSash >= SashList.Count || currSash == -1)
|
||||
{
|
||||
currStep = CompileStep.Frame;
|
||||
}
|
||||
Sash item = SashList[currSash];
|
||||
<div class="container">
|
||||
<div class="text-start display-4">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group mb-2">
|
||||
else
|
||||
{
|
||||
Sash item = SashList[currSash];
|
||||
<div class="container">
|
||||
<div class="text-start display-4">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="NumberSash@(SashList.IndexOf(item) + 1)">Number</span>
|
||||
<input type="number" class="form-control" aria-label="NumberSash@(SashList.IndexOf(item) + 1)" @bind="@item.nSashQty">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<h5 class="card-title">Orientation</h5>
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="NumberSash@(SashList.IndexOf(item) + 1)">Number</span>
|
||||
<input type="number" class="form-control" aria-label="NumberSash@(SashList.IndexOf(item) + 1)" @bind="@item.nSashQty">
|
||||
<label class="input-group-text" for="OrientationSash@(SashList.IndexOf(item) + 1)">Tipology</label>
|
||||
<select class="form-select" id="OrientationSash@(SashList.IndexOf(item) + 1)" @bind="@item.SelOrientationSashTypeIndex">
|
||||
<option value="0">Vertical</option>
|
||||
<option value="1">Horizontal</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<h5 class="card-title">Orientation</h5>
|
||||
<div class="col-sm-6">
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<h5 class="card-title">Bottom rail</h5>
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="BottomRailQty@(SashList.IndexOf(item) + 1)">Quantity</span>
|
||||
<input type="number" class="form-control" aria-label="BottomRailQty" @bind="@item.SashBottomRailQty">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@for (int i = 0; i <= item.SashList.Count / 2; i++)
|
||||
{
|
||||
for (int j = 0; j < 2 && (i * 2 + j <= item.SashList.Count - 1); j++)
|
||||
{
|
||||
SashDimension sash = item.SashList[i * 2 + j];
|
||||
<div class="col-sm-6">
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
@if (item.SashList.Count == 1)
|
||||
{
|
||||
<h5 class="card-title">Opening</h5>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h5 class="card-title">Sash opening @(i * 2 + j + 1)</h5>
|
||||
}
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="OpeningSash@(i * 2 + j + 1)">Tipology</label>
|
||||
<select class="form-select" id="OpeningSash@(i * 2 + j + 1)" @bind="@sash.SelOpeningTypeIndex">
|
||||
<option value="0">A sinistra</option>
|
||||
<option value="1">A destra</option>
|
||||
<option value="2">Ad anta-ribalta sinistra</option>
|
||||
<option value="3">Ad anta-ribalta destra</option>
|
||||
<option value="4">Solo verso alto</option>
|
||||
<option value="5">Solo verso basso</option>
|
||||
<option value="6">Pivot</option>
|
||||
<option value="7">Fissa</option>
|
||||
<option value="8">Complanare sinistra</option>
|
||||
<option value="9">Complanare destra</option>
|
||||
<option value="10">Scorrevole sinistra</option>
|
||||
<option value="11">Scorrevole destra</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text">Dimension</span>
|
||||
<input type="number" class="form-control" aria-label="DimensionSash" @bind="@sash.dDimension">
|
||||
<span class="input-group-text">%</span>
|
||||
</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" id="HandleSashLabel@(i * 2 + j + 1)" checked="@sash.bHasHandle" @onclick="() => changeHandle(sash)">
|
||||
</div>
|
||||
<div class="px-2">
|
||||
<label class="form-check-label fs-6 text-dark" for="HandleSashLabel@(i * 2 + j + 1)">Handle</label>
|
||||
</div>
|
||||
</div>
|
||||
@* <div class="row d-grid gap-1 d-md-flex justify-content-md-center">
|
||||
@for (int k = 1; k <= i * 2 + j; k++)
|
||||
{
|
||||
int IndexCopy = k;
|
||||
int IndexModify = i * 2 + j;
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => CopyContent(item, IndexCopy, IndexModify)">Copy @(k)</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div> *@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<h5 class="card-title">Sash joints</h5>
|
||||
<div class="row p-0 m-0 text-center">
|
||||
<div class="col">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(1, 1)">Angled</button>
|
||||
</div>
|
||||
<div class="col">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(2, 1)">Horizontal</button>
|
||||
</div>
|
||||
<div class="col">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(3, 1)">Vertical</button>
|
||||
</div>
|
||||
</div>
|
||||
@foreach (Joint joint in item.JointList)
|
||||
{
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="OrientationSash@(SashList.IndexOf(item) + 1)">Tipology</label>
|
||||
<select class="form-select" id="OrientationSash@(SashList.IndexOf(item) + 1)" @bind="@item.SelOrientationSashTypeIndex">
|
||||
<option value="0">Vertical</option>
|
||||
<option value="1">Horizontal</option>
|
||||
<label class="input-group-text" for="IndexJoint@(item.JointList.IndexOf(joint) + 1)">@((positionJoints)(item.JointList.IndexOf(joint)))</label>
|
||||
<select class="form-select" id="IndexJoint@(item.JointList.IndexOf(joint) + 1)" @bind="@joint.SelJointTypeIndex">
|
||||
<option value="0">Angled</option>
|
||||
<option value="1">Full H</option>
|
||||
<option value="2">Full V</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<h5 class="card-title">Bottom rail</h5>
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="BottomRailQty@(SashList.IndexOf(item) + 1)">Quantity</span>
|
||||
<input type="number" class="form-control" aria-label="BottomRailQty" @bind="@item.SashBottomRailQty">
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@for(int i = 0; i <= item.SashList.Count / 2; i ++)
|
||||
<div class="col-sm-6">
|
||||
@for (int i = 0; i < item.AreaList.Count; i++)
|
||||
{
|
||||
for (int j = 0; j < 2 && (i * 2 + j <= item.SashList.Count - 1); j ++)
|
||||
Area anta;
|
||||
@if (item.AreaList[i] is Splitted)
|
||||
{
|
||||
SashDimension sash = item.SashList[i*2+j];
|
||||
<div class="col-sm-6">
|
||||
anta = item.AreaList[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
anta = item;
|
||||
}
|
||||
@if (!(anta.AreaList[0] is Split))
|
||||
{
|
||||
<div class="col">
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
@if (item.SashList.Count == 1)
|
||||
{
|
||||
<h5 class="card-title">Opening</h5>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h5 class="card-title">Sash opening @(i * 2 + j + 1)</h5>
|
||||
}
|
||||
<h5 class="card-title">Anta @(i + 1)</h5>
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="OpeningSash@(i * 2 + j + 1)">Tipology</label>
|
||||
<select class="form-select" id="OpeningSash@(i * 2 + j + 1)" @bind="@sash.SelOpeningTypeIndex">
|
||||
<option value="0">A sinistra</option>
|
||||
<option value="1">A destra</option>
|
||||
<option value="2">Ad anta-ribalta sinistra</option>
|
||||
<option value="3">Ad anta-ribalta destra</option>
|
||||
<option value="4">Solo verso alto</option>
|
||||
<option value="5">Solo verso basso</option>
|
||||
<option value="6">Pivot</option>
|
||||
<option value="7">Fissa</option>
|
||||
<option value="8">Complanare sinistra</option>
|
||||
<option value="9">Complanare destra</option>
|
||||
<option value="10">Scorrevole sinistra</option>
|
||||
<option value="11">Scorrevole destra</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text">Dimension</span>
|
||||
<input type="number" class="form-control" aria-label="DimensionSash" @bind="@sash.dDimension">
|
||||
<span class="input-group-text">%</span>
|
||||
</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" id="HandleSashLabel@(i + 1)" checked="@sash.bHasHandle" @onclick="() => changeHandle(sash)">
|
||||
</div>
|
||||
<div class="px-2">
|
||||
<label class="form-check-label fs-6 text-dark" for="HandleSashLabel@(i * 2 + j + 1)">Handle</label>
|
||||
</div>
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => anta.AddSplit()">Aggiungi split</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -361,41 +447,11 @@
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<h5 class="card-title">Sash joints</h5>
|
||||
<div class="row p-0 m-0 text-center">
|
||||
<div class="col">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(1, 1)">Angled</button>
|
||||
</div>
|
||||
<div class="col">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(2, 1)">Horizontal</button>
|
||||
</div>
|
||||
<div class="col">
|
||||
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(3, 1)">Vertical</button>
|
||||
</div>
|
||||
</div>
|
||||
@foreach (Joint joint in item.JointList)
|
||||
{
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="IndexJoint@(item.JointList.IndexOf(joint) + 1)">@((positionJoints)(item.JointList.IndexOf(joint)))</label>
|
||||
<select class="form-select" id="IndexJoint@(item.JointList.IndexOf(joint) + 1)" @bind="@joint.SelJointTypeIndex">
|
||||
<option value="0">Angled</option>
|
||||
<option value="1">Full H</option>
|
||||
<option value="2">Full V</option>
|
||||
</select>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
else if (currStep == CompileStep.Fill)
|
||||
{
|
||||
@@ -544,7 +600,6 @@
|
||||
<p class="d-inline-flex gap-1">
|
||||
<div class="col">
|
||||
<button type="button" class="@buttonCss(ColorWindow.Bianco)" @onclick="() => ChangeColorWindow(ColorWindow.Bianco)" data-bs-toggle =" button" aria-pressed="true">Bianco</button>
|
||||
@* <button class="btn btn-outline-secondary btn-sm">Bianco</button> *@
|
||||
</div>
|
||||
<div class="col">
|
||||
<button type="button" class="@buttonCss(ColorWindow.Grigio)" @onclick="() => ChangeColorWindow(ColorWindow.Grigio)" data-bs-toggle="button" aria-pressed="true">Grigio</button>
|
||||
|
||||
@@ -57,8 +57,8 @@ namespace WebWindowConfigurator
|
||||
m_FillList = new List<Fill>();
|
||||
m_SashList = new List<Sash>();
|
||||
m_SplitList = new List<Split>();
|
||||
m_SplitParentList = new List<SplitParent>();
|
||||
CreateWindowsList(m_CurrWindow.AreaList[0], false);
|
||||
m_SplittedList = new List<Splitted>();
|
||||
CreateWindowsList(m_CurrWindow.AreaList[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -147,9 +147,9 @@ namespace WebWindowConfigurator
|
||||
{
|
||||
get => m_FillList;
|
||||
}
|
||||
protected List<SplitParent> SplitParentList
|
||||
protected List<Splitted> SplittedList
|
||||
{
|
||||
get => m_SplitParentList;
|
||||
get => m_SplittedList;
|
||||
}
|
||||
|
||||
protected TemplateSelectDTO? SelTemplateDTO { get; set; } = null;
|
||||
@@ -220,9 +220,10 @@ namespace WebWindowConfigurator
|
||||
m_FillList = new List<Fill>();
|
||||
m_SashList = new List<Sash>();
|
||||
m_SplitList = new List<Split>();
|
||||
m_SplitParentList = new List<SplitParent>();
|
||||
m_SplittedList = new List<Splitted>();
|
||||
// popolo le liste Fill, Sash e Split
|
||||
CreateWindowsList(m_CurrWindow.AreaList[0], false);
|
||||
CreateWindowsList(m_CurrWindow.AreaList[0]);
|
||||
currSash = -1;
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
@@ -258,32 +259,31 @@ namespace WebWindowConfigurator
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo per identificare oggetti nella Window e popolare le liste Fill, Sash e Split, SplitParent
|
||||
/// </summary>
|
||||
/// <param name="node"></param>
|
||||
//protected void CreateWindowsList(Area node)
|
||||
//protected void CreateWindowsList(Area node, bool IntoSash)
|
||||
//{
|
||||
// if (node != null)
|
||||
// {
|
||||
// bool nodeIntoSash = false;
|
||||
// if (node.ParentArea is Sash || IntoSash == true)
|
||||
// nodeIntoSash = true;
|
||||
// switch (node.AreaType)
|
||||
// {
|
||||
// case AreaTypes.FRAME:
|
||||
// {
|
||||
// FrameWindow = (Frame)node;
|
||||
// if (node.AreaList[0] is Split)
|
||||
// SplitParentList.Add(new SplitParent(AreaTypes.FRAME, "Frame", false, node.AreaList[0], null));
|
||||
// SplitParentList.Add(new SplitParent(AreaTypes.FRAME, "Frame", nodeIntoSash, node.AreaList[0], null));
|
||||
// else
|
||||
// SplitParentList.Add(new SplitParent(AreaTypes.FRAME, "Frame", false, null, node));
|
||||
// SplitParentList.Add(new SplitParent(AreaTypes.FRAME, "Frame", nodeIntoSash, null, node));
|
||||
// break;
|
||||
// }
|
||||
// case AreaTypes.SASH:
|
||||
// {
|
||||
// m_SashList.Add((Sash)node);
|
||||
// if (node.AreaList[0] is Fill)
|
||||
// SplitParentList.Add(new SplitParent(AreaTypes.SPLITTED, "Sash", true, null, node));
|
||||
// else if(node.AreaList[0] is Split)
|
||||
// SplitParentList.Add(new SplitParent(AreaTypes.SPLITTED, "Sash into split", true, node.AreaList[0], node));
|
||||
// SplitParentList.Add(new SplitParent(AreaTypes.SPLITTED, "Sash", nodeIntoSash, null, node));
|
||||
// else if (node.AreaList[0] is Split)
|
||||
// SplitParentList.Add(new SplitParent(AreaTypes.SPLITTED, "Sash into split", nodeIntoSash, node.AreaList[0], node));
|
||||
// break;
|
||||
// }
|
||||
// case AreaTypes.FILL:
|
||||
@@ -298,61 +298,51 @@ namespace WebWindowConfigurator
|
||||
// }
|
||||
// case AreaTypes.SPLITTED:
|
||||
// {
|
||||
// m_SplittedList.Add((Splitted)node);
|
||||
// if (node.AreaList[0] is Split)
|
||||
// {
|
||||
// if (node.ParentArea is Sash)
|
||||
// SplitParentList.Add(new SplitParent(AreaTypes.SPLITTED, "Sash", true, node.AreaList[0], node));
|
||||
// SplitParentList.Add(new SplitParent(AreaTypes.SPLITTED, "Sash", nodeIntoSash, node.AreaList[0], node));
|
||||
// else
|
||||
// SplitParentList.Add(new SplitParent(AreaTypes.SPLITTED, "Split", false, node.AreaList[0], node));
|
||||
// SplitParentList.Add(new SplitParent(AreaTypes.SPLITTED, "Split", nodeIntoSash, node.AreaList[0], node));
|
||||
// }
|
||||
// else if (node.AreaList[0] is Sash)
|
||||
// {
|
||||
// SplitParentList.Add(new SplitParent(AreaTypes.SPLITTED, "Split area with sash", false, null, node));
|
||||
// SplitParentList.Add(new SplitParent(AreaTypes.SPLITTED, "Split area with sash", nodeIntoSash, null, node));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (node.ParentArea is Sash)
|
||||
// SplitParentList.Add(new SplitParent(AreaTypes.SPLITTED, "Sash", true, null, node));
|
||||
// else if (node.ParentArea.ParentArea is Sash)
|
||||
// SplitParentList.Add(new SplitParent(AreaTypes.SPLITTED, "Split into sash", true, null, node));
|
||||
// SplitParentList.Add(new SplitParent(AreaTypes.SPLITTED, "Sash", nodeIntoSash, null, node));
|
||||
// else if (nodeIntoSash)
|
||||
// SplitParentList.Add(new SplitParent(AreaTypes.SPLITTED, "Area split into sash", nodeIntoSash, null, node));
|
||||
// else
|
||||
// SplitParentList.Add(new SplitParent(AreaTypes.SPLITTED, "Split", false, null, node));
|
||||
// SplitParentList.Add(new SplitParent(AreaTypes.SPLITTED, "Split", nodeIntoSash, null, node));
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// foreach (var item in node.AreaList)
|
||||
// {
|
||||
// CreateWindowsList(item);
|
||||
// CreateWindowsList(item, nodeIntoSash);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
protected void CreateWindowsList(Area node, bool IntoSash)
|
||||
protected void CreateWindowsList(Area node)
|
||||
{
|
||||
if (node != null)
|
||||
{
|
||||
bool nodeIntoSash = false;
|
||||
if (node.ParentArea is Sash || IntoSash == true)
|
||||
nodeIntoSash = true;
|
||||
switch (node.AreaType)
|
||||
{
|
||||
case AreaTypes.FRAME:
|
||||
{
|
||||
FrameWindow = (Frame)node;
|
||||
if (node.AreaList[0] is Split)
|
||||
SplitParentList.Add(new SplitParent(AreaTypes.FRAME, "Frame", nodeIntoSash, node.AreaList[0], null));
|
||||
else
|
||||
SplitParentList.Add(new SplitParent(AreaTypes.FRAME, "Frame", nodeIntoSash, null, node));
|
||||
break;
|
||||
}
|
||||
case AreaTypes.SASH:
|
||||
{
|
||||
m_SashList.Add((Sash)node);
|
||||
if (node.AreaList[0] is Fill)
|
||||
SplitParentList.Add(new SplitParent(AreaTypes.SPLITTED, "Sash", nodeIntoSash, null, node));
|
||||
else if (node.AreaList[0] is Split)
|
||||
SplitParentList.Add(new SplitParent(AreaTypes.SPLITTED, "Sash into split", nodeIntoSash, node.AreaList[0], node));
|
||||
break;
|
||||
}
|
||||
case AreaTypes.FILL:
|
||||
@@ -367,32 +357,13 @@ namespace WebWindowConfigurator
|
||||
}
|
||||
case AreaTypes.SPLITTED:
|
||||
{
|
||||
if (node.AreaList[0] is Split)
|
||||
{
|
||||
if (node.ParentArea is Sash)
|
||||
SplitParentList.Add(new SplitParent(AreaTypes.SPLITTED, "Sash", nodeIntoSash, node.AreaList[0], node));
|
||||
else
|
||||
SplitParentList.Add(new SplitParent(AreaTypes.SPLITTED, "Split", nodeIntoSash, node.AreaList[0], node));
|
||||
}
|
||||
else if (node.AreaList[0] is Sash)
|
||||
{
|
||||
SplitParentList.Add(new SplitParent(AreaTypes.SPLITTED, "Split area with sash", nodeIntoSash, null, node));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (node.ParentArea is Sash)
|
||||
SplitParentList.Add(new SplitParent(AreaTypes.SPLITTED, "Sash", nodeIntoSash, null, node));
|
||||
else if (nodeIntoSash)
|
||||
SplitParentList.Add(new SplitParent(AreaTypes.SPLITTED, "Area split into sash", nodeIntoSash, null, node));
|
||||
else
|
||||
SplitParentList.Add(new SplitParent(AreaTypes.SPLITTED, "Split", nodeIntoSash, null, node));
|
||||
}
|
||||
m_SplittedList.Add((Splitted)node);
|
||||
break;
|
||||
}
|
||||
}
|
||||
foreach (var item in node.AreaList)
|
||||
{
|
||||
CreateWindowsList(item, nodeIntoSash);
|
||||
CreateWindowsList(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -477,7 +448,7 @@ namespace WebWindowConfigurator
|
||||
|
||||
private List<Fill> m_FillList = new List<Fill>();
|
||||
|
||||
private List<SplitParent> m_SplitParentList = new List<SplitParent>();
|
||||
private List<Splitted> m_SplittedList = new List<Splitted>();
|
||||
|
||||
private enum positionJoints
|
||||
{
|
||||
|
||||
@@ -680,7 +680,7 @@ namespace WebWindowConfigurator
|
||||
}
|
||||
else if (value < m_SashList.Count)
|
||||
{
|
||||
if(value > 0)
|
||||
if (value > 0)
|
||||
{
|
||||
double dLastDimension = 0;
|
||||
for (var SplitIndex = m_SashList.Count - 1; SplitIndex >= value; SplitIndex += -1)
|
||||
@@ -693,14 +693,16 @@ namespace WebWindowConfigurator
|
||||
}
|
||||
else
|
||||
{
|
||||
// Se tolgo singola anta, ma tengo split
|
||||
SashList.RemoveAt(0);
|
||||
|
||||
}
|
||||
}
|
||||
if(m_SashList.Count == 0)
|
||||
if (m_SashList.Count == 0)
|
||||
{
|
||||
Area child = AreaList[0];
|
||||
// Se nella singola anta ho uno split
|
||||
if(!(child is Fill))
|
||||
if (!(child is Fill))
|
||||
{
|
||||
child = child.AreaList[0].AreaList[0];
|
||||
}
|
||||
@@ -708,62 +710,61 @@ namespace WebWindowConfigurator
|
||||
this.ParentArea.AreaList.Remove(this);
|
||||
this.ParentArea.AreaList.Add(child);
|
||||
}
|
||||
// Se ho singola anta
|
||||
else if (m_SashList.Count == 1)
|
||||
{
|
||||
// Metto come padre dell'area nello splitted l'anta stessa
|
||||
List<Area> ContentArea = new List<Area>();
|
||||
while (AreaList.Count > 0)
|
||||
{
|
||||
if (AreaList.Count == 1 & AreaList[0].AreaList.Count > 0)
|
||||
{
|
||||
foreach (Area selArea in AreaList[0].AreaList)
|
||||
{
|
||||
ContentArea.Add(selArea);
|
||||
}
|
||||
}
|
||||
AreaList.Remove(AreaList[AreaList.Count - 1]);
|
||||
}
|
||||
if (ContentArea.Count > 0)
|
||||
{
|
||||
AreaList = ContentArea;
|
||||
}
|
||||
ContentArea.Add(AreaList[0].AreaList[0]);
|
||||
ContentArea[0].SetParentArea(this);
|
||||
AreaList.Clear();
|
||||
AreaList.Add(ContentArea[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
List<Area> ContentArea = new List<Area>();
|
||||
if (AreaList.Count == 1 & SashList.Count > AreaList.Count)
|
||||
// Se aggiungo ante
|
||||
if (SashList.Count > AreaList.Count)
|
||||
{
|
||||
ContentArea.Add(AreaList.ElementAt(0));
|
||||
AreaList.Clear();
|
||||
}
|
||||
for (int SplitIndex = AreaList.Count; SplitIndex <= SashList.Count - 1; SplitIndex++)
|
||||
{
|
||||
AreaList.Add(Splitted.CreateSplitted(this));
|
||||
}
|
||||
for (int SplitIndex = SashList.Count; SplitIndex <= AreaList.Count() - 1; SplitIndex++)
|
||||
{
|
||||
AreaList.Remove(AreaList[AreaList.Count - 1]);
|
||||
}
|
||||
if (AreaList[AreaList.Count - 1].AreaList.Count == 0)
|
||||
{
|
||||
if (ContentArea.Count > 0)
|
||||
List<Area> ContentArea = new List<Area>();
|
||||
// Salvo in ContentArea il sottoalbero delle singole aree che mantengo
|
||||
if (AreaList.Count >= 1 & SashList.Count > AreaList.Count)
|
||||
{
|
||||
for (int SplitIndex = 0; SplitIndex <= AreaList.Count() - 1; SplitIndex++)
|
||||
foreach (Area area in AreaList)
|
||||
{
|
||||
if (SplitIndex == 0)
|
||||
{
|
||||
AreaList[0].AreaList.Add(ContentArea[0]);
|
||||
}
|
||||
if (area is Splitted)
|
||||
ContentArea.Add(area.AreaList[0]);
|
||||
else
|
||||
{
|
||||
Fill f1 = (Fill)ContentArea[0];
|
||||
AreaList[SplitIndex].AreaList.Add(Fill.CreateFill(AreaList[SplitIndex], f1.FillType));
|
||||
}
|
||||
ContentArea.Add(area);
|
||||
}
|
||||
AreaList.Clear();
|
||||
}
|
||||
else
|
||||
for (int SplitIndex = AreaList.Count; SplitIndex <= SashList.Count - 1; SplitIndex++)
|
||||
{
|
||||
Fill f1 = (Fill)AreaList[AreaList.Count - 2].AreaList[0];
|
||||
AreaList[AreaList.Count - 1].AreaList.Add(Fill.CreateFill(AreaList[AreaList.Count - 1], f1.FillType));
|
||||
AreaList.Add(Splitted.CreateSplitted(this));
|
||||
}
|
||||
// Riaggiungo i sottoalberi che avevo salvato
|
||||
for (int i = 0; i < AreaList.Count - 1; i++)
|
||||
{
|
||||
if (AreaList.Count == 2)
|
||||
{
|
||||
ContentArea[i].SetParentArea(AreaList[i]);
|
||||
}
|
||||
AreaList[i].AreaList.Add(ContentArea[i]);
|
||||
|
||||
}
|
||||
// Aggiungo all'ultimo Splitted l'area di vetro
|
||||
Fill newFill = new Fill(AreaList[1], ParentWindow);
|
||||
newFill.SetFillType(FillTypes.GLASS);
|
||||
newFill.SetAreaType(AreaTypes.FILL);
|
||||
AreaList[AreaList.Count - 1].AreaList.Add(newFill);
|
||||
}
|
||||
// Se tolgo anta
|
||||
else
|
||||
{
|
||||
for (int SplitIndex = SashList.Count; SplitIndex <= AreaList.Count() - 1; SplitIndex++)
|
||||
{
|
||||
AreaList.Remove(AreaList[AreaList.Count - 1]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1319,7 +1320,7 @@ namespace WebWindowConfigurator
|
||||
for (var SplitIndex = m_SplitPositionList.Count; SplitIndex <= value; SplitIndex++)
|
||||
SplitPositionList.Add(new SplitDimension(dNewDimension, true, this));
|
||||
}
|
||||
else if(value == 0)
|
||||
else if (value == 0)
|
||||
{
|
||||
SplitPositionList.RemoveAt(1);
|
||||
SplitPositionList.RemoveAt(0);
|
||||
@@ -1336,19 +1337,17 @@ namespace WebWindowConfigurator
|
||||
dLastDimension += m_SplitPositionList[SplitPositionList.Count - 1].dDimension;
|
||||
SplitPositionList[SplitPositionList.Count - 1].SetDimension(dLastDimension);
|
||||
}
|
||||
for(var SplitIndex = AreaList.Count; SplitIndex <= SplitPositionList.Count - 1; SplitIndex++)
|
||||
// Se aggiungo split devo aggiungere vetro nell'area splitted aggiunta
|
||||
for (var SplitIndex = AreaList.Count; SplitIndex <= SplitPositionList.Count - 1; SplitIndex++)
|
||||
{
|
||||
AreaList.Add(Splitted.CreateSplitted(this));
|
||||
if(AreaList[AreaList.Count - 2].AreaList[0] is Fill)
|
||||
{
|
||||
Fill f1 = (Fill)AreaList[AreaList.Count - 2].AreaList[0];
|
||||
AreaList.Last().AreaList.Add(Fill.CreateFill(AreaList.Last(), f1.FillType));
|
||||
}
|
||||
else
|
||||
AreaList.Last().AreaList.Add(Fill.CreateFill(AreaList.Last(), FillTypes.GLASS));
|
||||
Fill newFill = new Fill(AreaList.Last(), ParentWindow);
|
||||
newFill.SetFillType(FillTypes.GLASS);
|
||||
newFill.SetAreaType(AreaTypes.FILL);
|
||||
AreaList[AreaList.Count - 1].AreaList.Add(newFill);
|
||||
}
|
||||
// Se ho più di uno split, elimino l'ultimo
|
||||
if(AreaList.Count > 2)
|
||||
if (AreaList.Count > 2)
|
||||
{
|
||||
for (var SplitIndex = SplitPositionList.Count; SplitIndex <= AreaList.Count - 1; SplitIndex++)
|
||||
{
|
||||
@@ -1359,6 +1358,7 @@ namespace WebWindowConfigurator
|
||||
else
|
||||
{
|
||||
Splitted s = (Splitted)AreaList[0];
|
||||
s.SetParentArea(ParentArea);
|
||||
ParentArea.AreaList.Add(s.AreaList[0]);
|
||||
ParentArea.AreaList.Remove(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user