+
@foreach (var Fill in FillList)
{
@@ -417,3 +551,4 @@
}
+
diff --git a/WebWindowConfigurator/WebWindowMaker.razor.cs b/WebWindowConfigurator/WebWindowMaker.razor.cs
index 1053eeb..1c9f3bc 100644
--- a/WebWindowConfigurator/WebWindowMaker.razor.cs
+++ b/WebWindowConfigurator/WebWindowMaker.razor.cs
@@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Components;
+using Microsoft.AspNetCore.Components.Web;
using Newtonsoft.Json;
using System.Reflection.Metadata;
using WebWindowConfigurator.DTO;
@@ -29,6 +30,7 @@ namespace WebWindowConfigurator
get => m_SelTemplate;
set
{
+ // Se non ho ancora selezionato template oppure se cambio template di selezione
if (value != null && (m_SelTemplate == null || (m_SelTemplate != null && value.nIndex != m_SelTemplate.nIndex)) && !string.IsNullOrEmpty(value.JWD))
{
m_SelTemplate = value;
@@ -43,15 +45,17 @@ namespace WebWindowConfigurator
m_FillList = new List
();
m_SashList = new List();
m_SplitList = new List();
- SearchInAreaList(m_CurrWindow.AreaList[0]);
+ // popolo le liste Fill, Sash e Split
+ CreateWindowsList(m_CurrWindow.AreaList[0]);
m_SelSVG = m_SelTemplate.SVG;
}
+ // serve per quando aumentano/diminuiscono quantità Sash e Split (bisogna ricalcolare le liste)
if (m_CurrWindow != null)
{
m_FillList = new List();
m_SashList = new List();
m_SplitList = new List();
- SearchInAreaList(m_CurrWindow.AreaList[0]);
+ CreateWindowsList(m_CurrWindow.AreaList[0]);
}
}
}
@@ -96,7 +100,7 @@ namespace WebWindowConfigurator
#region Protected Properties
- protected Frame Frame
+ protected Frame FrameWindow
{
get => m_Frame;
set => m_Frame = value;
@@ -137,11 +141,37 @@ namespace WebWindowConfigurator
#region Protected Methods
+ ///
+ /// Metodo per la scelta della maniglia univoca
+ ///
+ ///
+ ///
+ protected async Task changeHandle(SashDimension sashDim)
+ {
+ foreach (SashDimension item in SashList[0].SashList)
+ {
+ if (item.Equals(sashDim))
+ {
+ item.bHasHandle = true;
+ }
+ else
+ {
+ item.bHasHandle = false;
+ }
+ }
+ await Task.Delay(1);
+ }
+
+ // Ancora da fare...
protected async Task DoClose()
{
await EC_OnClose.InvokeAsync(true);
}
+ ///
+ /// Anteprima SVG
+ ///
+ ///
protected async Task DoPreviewSvg()
{
if (m_CurrWindow != null)
@@ -154,12 +184,17 @@ namespace WebWindowConfigurator
}
}
+ // Ancora da fare..
protected async Task DoSave()
{
//manca salvataggio JWD
await EC_OnClose.InvokeAsync(true);
}
+ ///
+ /// Selezione del template
+ ///
+ /// template selezionato
protected async void DoSelect(TemplateSelectDTO newSel)
{
SelTemplateDTO = newSel;
@@ -167,13 +202,21 @@ namespace WebWindowConfigurator
await EC_OnSelectedTemplate.InvokeAsync(newSel);
}
- protected async void DoSelectAndPreview(CompileStep newStep)
+ ///
+ /// Metodo per cambiare step e aggiornare preview svg
+ ///
+ /// step successivo
+ protected async void NextStepAndPreview(CompileStep newStep)
{
currStep = newStep;
await DoPreviewSvg();
}
- protected void SearchInAreaList(Area node)
+ ///
+ /// Metodo per identificare oggetti nella Window e popolare le liste Fill, Sash e Split
+ ///
+ ///
+ protected void CreateWindowsList(Area node)
{
if (node != null)
{
@@ -181,7 +224,7 @@ namespace WebWindowConfigurator
{
case AreaTypes.FRAME:
{
- m_Frame = (Frame)node;
+ FrameWindow = (Frame)node;
break;
}
case AreaTypes.SASH:
@@ -202,14 +245,13 @@ namespace WebWindowConfigurator
}
foreach (var item in node.AreaList)
{
- SearchInAreaList(item);
+ CreateWindowsList(item);
}
}
}
#endregion Protected Methods
-
#region Private Fields
private CompileStep currStep = CompileStep.Template;
@@ -222,6 +264,14 @@ namespace WebWindowConfigurator
private List m_FillList = new List();
+ private enum positionJoints
+ {
+ BL=0,
+ BR=1,
+ TR,
+ TL
+ }
+
#endregion Private Fields
#region Private Properties
@@ -234,6 +284,10 @@ namespace WebWindowConfigurator
#region Private Methods
+ ///
+ /// Metodo per andare allo step successivo
+ ///
+ /// step successivo
private void AdvStep(CompileStep newStep)
{
currStep = newStep;
@@ -258,7 +312,7 @@ namespace WebWindowConfigurator
}
///
- /// Calcola larghezza
+ /// Calcola larghezza colonna da mostrare
///
///
private string mainCss()
diff --git a/WebWindowJWD/WebWindowJWDInput.razor b/WebWindowJWD/WebWindowJWDInput.razor
index 8c069dd..cf1729d 100644
--- a/WebWindowJWD/WebWindowJWDInput.razor
+++ b/WebWindowJWD/WebWindowJWDInput.razor
@@ -38,10 +38,10 @@
{