Copiato codice da componente WebWindowTest a WebWindowComplex

This commit is contained in:
Annamaria Sassi
2025-09-19 13:16:15 +02:00
parent 51e6695079
commit 1dcb0ba15b
14 changed files with 819 additions and 504 deletions
+4 -4
View File
@@ -12,12 +12,12 @@ namespace WebWindowComplex
private AreaTypes m_type;
public AreaTypes Type
{
get
get
{
return m_type;
}
set
{
set
{
m_type = value;
}
}
@@ -95,7 +95,7 @@ namespace WebWindowComplex
}
}
public ItemTable(AreaTypes elementType, string s_description,int n_row, int n_col, int n_numSash, int n_numChild)
public ItemTable(AreaTypes elementType, string s_description, int n_row, int n_col, int n_numSash, int n_numChild)
{
Type = elementType;
m_desc = s_description;
+57 -6
View File
@@ -24,6 +24,48 @@ namespace WebWindowComplex.Json
}
}
private string m_sMaterial;
[JsonProperty]
public string Material
{
get
{
return m_sMaterial;
}
set
{
m_sMaterial = value;
}
}
private string m_sColorMaterial;
[JsonProperty]
public string ColorMaterial
{
get
{
return m_sColorMaterial;
}
set
{
m_sColorMaterial = value;
}
}
private string m_sGlass;
[JsonProperty]
public string Glass
{
get
{
return m_sGlass;
}
set
{
m_sGlass = value;
}
}
private List<JsonArea> m_AreaList = new List<JsonArea>();
[JsonProperty]
public List<JsonArea> AreaList
@@ -38,16 +80,25 @@ namespace WebWindowComplex.Json
}
}
public JsonWindow(string ProfilePath)
public JsonWindow(string ProfilePath, string Material, string ColorMaterial, string Glass)
{
m_sProfilePath = ProfilePath;
m_sMaterial = Material;
m_sColorMaterial = ColorMaterial;
m_sGlass = Glass;
}
internal Window Deserialize()
{
Window Window = new Window() { sProfilePath = m_sProfilePath };
Window Window = new Window()
{
sProfilePath = m_sProfilePath,
sMaterial = m_sMaterial,
sColorMaterial = m_sColorMaterial,
sGlass = m_sGlass
};
foreach (var Area in AreaList)
Window.AreaList.Add((Frame)Area.Deserialize(null,Window));
Window.AreaList.Add((Frame)Area.Deserialize(null, Window));
return Window;
}
}
@@ -402,7 +453,7 @@ namespace WebWindowComplex.Json
{
Split.AreaList.Add(AreaDeserealized);
}
}
}
return Split;
}
}
@@ -426,7 +477,7 @@ namespace WebWindowComplex.Json
Split.AreaList.Add(AreaDeserealized);
}
}
return Split;
}
}
@@ -470,7 +521,7 @@ namespace WebWindowComplex.Json
{
Fill.AreaList.Add(AreaDeserealized);
}
}
}
return Fill;
}
}
+196
View File
@@ -0,0 +1,196 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WebWindowComplex
{
public partial class ParametriOpzioni
{
private ParametriOpzioniParametri[] itemsField;
/// <remarks/>
//[System.Xml.Serialization.XmlElementAttribute("Parametri", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public ParametriOpzioniParametri[] Items
{
get
{
return this.itemsField;
}
set
{
this.itemsField = value;
}
}
}
public partial class ParametriOpzioniParametri
{
private string nomeParametroField;
private string descrizioneParametroField;
private string valoreCorrenteField;
private string tipoField;
private string visibleField;
private string ricalcolaSeModificatoField;
private ParametriOpzioniParametriOpzioni[] opzioniField;
/// <remarks/>
//[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string NomeParametro
{
get
{
return this.nomeParametroField;
}
set
{
this.nomeParametroField = value;
}
}
/// <remarks/>
//[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string DescrizioneParametro
{
get
{
return this.descrizioneParametroField;
}
set
{
this.descrizioneParametroField = value;
}
}
/// <remarks/>
//[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string ValoreCorrente
{
get
{
return this.valoreCorrenteField;
}
set
{
this.valoreCorrenteField = value;
}
}
/// <remarks/>
//[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string Tipo
{
get
{
return this.tipoField;
}
set
{
this.tipoField = value;
}
}
/// <remarks/>
//[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string Visible
{
get
{
return this.visibleField;
}
set
{
this.visibleField = value;
}
}
/// <remarks/>
//[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string RicalcolaSeModificato
{
get
{
return this.ricalcolaSeModificatoField;
}
set
{
this.ricalcolaSeModificatoField = value;
}
}
/// <remarks/>
//[System.Xml.Serialization.XmlElementAttribute("Opzioni", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public ParametriOpzioniParametriOpzioni[] Opzioni
{
get
{
return this.opzioniField;
}
set
{
this.opzioniField = value;
}
}
}
public partial class ParametriOpzioniParametriOpzioni
{
private string nomeParametroField;
private string descrizioneOpzioneField;
private string valoreField;
/// <remarks/>
//[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string NomeParametro
{
get
{
return this.nomeParametroField;
}
set
{
this.nomeParametroField = value;
}
}
/// <remarks/>
//[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string DescrizioneOpzione
{
get
{
return this.descrizioneOpzioneField;
}
set
{
this.descrizioneOpzioneField = value;
}
}
/// <remarks/>
//[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string Valore
{
get
{
return this.valoreField;
}
set
{
this.valoreField = value;
}
}
}
}
-88
View File
@@ -1,88 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WebWindowComplex
{
public class SplitParent
{
private Json.WindowConst.AreaTypes m_Type;
public Json.WindowConst.AreaTypes Type
{
get
{
return m_Type;
}
set
{
m_Type = value;
}
}
private string m_Description;
public string Description
{
get
{
return m_Description;
}
set
{
m_Description = value;
}
}
/// <summary>
/// Proprietà per sapere se sono in un'anta
/// </summary>
private bool m_IntoSash;
public bool IntoSash
{
get
{
return m_IntoSash;
}
set
{
m_IntoSash = value;
}
}
private Area m_Split;
public Area Split
{
get
{
return m_Split;
}
set
{
m_Split = value;
}
}
private Area m_Splitted;
public Area Splitted
{
get
{
return m_Splitted;
}
set
{
m_Splitted = value;
}
}
public SplitParent(Json.WindowConst.AreaTypes vType,string sDescrip, bool b_IntoSash, Area v_Split, Area v_Splitted)
{
Type = vType;
Description = sDescrip;
IntoSash = b_IntoSash;
Split = v_Split;
Splitted = v_Splitted;
}
}
}
+73 -207
View File
@@ -3,18 +3,21 @@
<div class="card text-center table-svg">
<div class="card-header" style="background-color: #d5f1f2;">
<div class="row">
<div class="col-8 d-grid gap-2 d-md-flex justify-content-md-start">
<div class="@headerCss()">
<ul class="nav nav-tabs card-header-tabs">
<li class="nav-item">
@if (currStep == CompileStep.Template)
{
<a data-target="#Template" class="nav-link active fw-bold" aria-current="true" @onclick="() => AdvStep(CompileStep.Template)">Template</a>
}
else
{
<a data-target="#Template" class="nav-link text-secondary" @onclick="() => AdvStep(CompileStep.Template)">Template</a>
}
</li>
@if (string.IsNullOrEmpty(CurrJwd))
{
<li class="nav-item">
@if (currStep == CompileStep.Template)
{
<a data-target="#Template" class="nav-link active fw-bold" aria-current="true" @onclick="() => AdvStep(CompileStep.Template)">Template</a>
}
else
{
<a data-target="#Template" class="nav-link text-secondary" @onclick="() => AdvStep(CompileStep.Template)">Template</a>
}
</li>
}
@if (FrameWindow != null)
{
<li class="nav-item">
@@ -48,7 +51,7 @@
}
</ul>
</div>
<div class="col-4 d-grid gap-2 d-md-flex justify-content-md-end">
<div class="@buttonCss()">
@if (currStep != CompileStep.Template)
{
<div class="col-4">
@@ -66,34 +69,37 @@
</div>
<div class="card-body bg-transparent">
<div class="text-center display-4">
@if (currStep == CompileStep.Template)
@if (string.IsNullOrEmpty(CurrJwd))
{
<table class="table table-hover align-middle">
<thead class="fs-5">
<tr>
<th scope="col">#</th>
<th scope="col" class="col-4">Image</th>
<th scope="col" class="text-start">Description</th>
</tr>
</thead>
<tbody class="table-group-divider fs-5">
@foreach (var item in IN_TemplateDTOList)
{
string colorClass = "";
@if (SelTemplateDTO != null && item.Index == SelTemplateDTO.Index)
colorClass = "table-success";
else
colorClass = "";
<tr style="height: 120px;" class="@colorClass" @onclick="() => DoSelect(item)">
<td>@item.Index</td>
<td><img class="img-fluid" width="100" src="@item.ImageUrl" /></td>
<td class="text-start">@item.Description</td>
@if (currStep == CompileStep.Template)
{
<table class="table table-hover align-middle">
<thead class="fs-5">
<tr>
<th scope="col">#</th>
<th scope="col" class="col-4">Image</th>
<th scope="col" class="text-start">Description</th>
</tr>
}
</tbody>
</table>
</thead>
<tbody class="table-group-divider fs-5">
@foreach (var item in IN_TemplateDTOList)
{
string colorClass = "";
@if (SelTemplateDTO != null && item.Index == SelTemplateDTO.Index)
colorClass = "table-success";
else
colorClass = "";
<tr style="height: 120px;" class="@colorClass" @onclick="() => DoSelect(item)">
<td>@item.Index</td>
<td><img class="img-fluid" width="100" src="@item.ImageUrl" /></td>
<td class="text-start">@item.Description</td>
</tr>
}
</tbody>
</table>
}
}
else if (currStep == CompileStep.Gerarchia)
@if (currStep == CompileStep.Gerarchia)
{
<div class="display-6">
<table class="table table-sm table-hover align-middle">
@@ -138,7 +144,7 @@
</tbody>
</table>
</div>
}
else if (currStep == CompileStep.Frame)
{
@@ -189,13 +195,13 @@
<h5 class="card-title m-0">Frame joints</h5>
<div class="row text-center">
<div class="col">
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(1, 0)">Angled</button>
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(1, FrameWindow)">Angled</button>
</div>
<div class="col">
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(2, 0)">Horizontal</button>
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(2, FrameWindow)">Horizontal</button>
</div>
<div class="col">
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(3, 0)">Vertical</button>
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(3, FrameWindow)">Vertical</button>
</div>
</div>
@foreach (Joint joint in FrameWindow.JointList)
@@ -362,142 +368,16 @@
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>
<button class="btn btn-outline-secondary btn-sm" @onclick="() => CopySash(currSplitted, Index)">Copy sash @(j + 1)</button>
</div>
</div>
}
</div>
</div>
</div>
</div>
}
@* @for (int i = 0; i < SplitParentList.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"))
{
<h5>@(currSplitParent.Description + " area " + numSash)</h5>
numSash++;
}
else if (currSplitParent.Description.Contains("Split"))
{
<h5>@(currSplitParent.Description + " area " + numSplit)</h5>
numSplit++;
}
else
{
<h5>@( currSplitParent.Description + " area")</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>
</div>
</div>
</div>
</div>
</div>
}
else
{
@if (currSplitParent.Description.Contains("Sash"))
{
continue;
}
else if (currSplitParent.Description.Contains("Frame"))
{
<div class="col-sm-6">
<div class="border mb-2">
<div class="card-body py-2">
<h5>@currSplitParent.Description</h5>
<div class="input-group mb-2">
<button class="btn btn-outline-secondary btn-sm" @onclick="() => currSplitParent.Splitted.AddSplit()">Aggiungi split</button>
</div>
</div>
</div>
</div>
}
else
{
@if (currSplitParent.Description.Contains("Split area with sash"))
{
continue;
}
@if (currSplitParent.IntoSash == false)
{
<div class="col-sm-6">
<div class="border mb-2">
<div class="card-body py-2">
<h5>@("Area " + currSplitParent.Description + " " + numSplit)</h5>
<div class="input-group mb-2">
<button class="btn btn-outline-secondary btn-sm" @onclick="() => currSplitParent.Splitted.AddSash()">Aggiungi sash</button>
</div>
</div>
</div>
</div>
numSplit++;
}
}
}
}
} *@
</div>
</div>
</div>
@@ -603,7 +483,7 @@
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>
<button class="btn btn-outline-secondary btn-sm" @onclick="() => CopyContentSash(item, IndexCopy, IndexModify)">Copy @(k)</button>
</div>
</div>
}
@@ -621,13 +501,13 @@
<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>
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(1, item)">Angled</button>
</div>
<div class="col">
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(2, 1)">Horizontal</button>
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(2, item)">Horizontal</button>
</div>
<div class="col">
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(3, 1)">Vertical</button>
<button class="btn btn-outline-secondary btn-sm" @onclick="() => AllJointsFrame(3, item)">Vertical</button>
</div>
</div>
@foreach (Joint joint in item.JointList)
@@ -796,11 +676,12 @@
<div class="card-body py-2">
<h5 class="card-title">Generic</h5>
<div class="input-group mb-2">
<label class="input-group-text" for="MaterialWindow">Material</label>
<select class="form-select" id="MaterialWindow">
<option value="0">Wood</option>
<option value="1">PVC</option>
<option value="2">Aluminum</option>
<label class="input-group-text" for="MaterialWindow">Color</label>
<select class="form-select" id="MaterialWindow" @bind="@m_CurrWindow.sMaterial">
@for (int i = 0; i < IN_MaterialList.Count; i++)
{
<option value="@IN_MaterialList[i]">@IN_MaterialList[i]</option>
}
</select>
</div>
<div class="input-group mb-2">
@@ -820,10 +701,11 @@
<h5 class="card-title">Fill type</h5>
<div class="input-group mb-2">
<label class="input-group-text" for="GlassWindow">Glass</label>
<select class="form-select" id="GlassWindow">
<option value="0">Doppio vetro</option>
<option value="1">Triplo vetro</option>
<option value="2">Antieffrazione</option>
<select class="form-select" id="GlassWindow" @bind="@m_CurrWindow.sGlass">
@for (int i = 0; i < IN_GlassList.Count; i++)
{
<option value="@IN_GlassList[i]">@IN_GlassList[i]</option>
}
</select>
</div>
<div class="input-group mb-2">
@@ -852,31 +734,15 @@
</select>
</div>
<div class="row">
<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>
</div>
<div class="col">
<button type="button" class="@buttonCss(ColorWindow.Tortora)" @onclick="() => ChangeColorWindow(ColorWindow.Tortora)" data-bs-toggle="button" aria-pressed="true">Tortora</button>
</div>
</p>
</div>
<div class="row">
<p class="d-inline-flex gap-1">
<div class="col">
<button type="button" class="@buttonCss(ColorWindow.Blu)" @onclick="() => ChangeColorWindow(ColorWindow.Blu)" data-bs-toggle="button" aria-pressed="true">Blu</button>
</div>
<div class="col">
<button type="button" class="@buttonCss(ColorWindow.Verde)" @onclick="() => ChangeColorWindow(ColorWindow.Verde)" data-bs-toggle="button" aria-pressed="true">Verde</button>
</div>
<div class="col">
<button type="button" class="@buttonCss(ColorWindow.Nero)" @onclick="() => ChangeColorWindow(ColorWindow.Nero)" data-bs-toggle="button" aria-pressed="true">Nero</button>
</div>
</p>
<div class="input-group mb-2">
<label class="input-group-text" for="ColorWindow">Color</label>
<select class="form-select" id="ColorWindow" @bind="@m_CurrWindow.sColorMaterial">
@for (int i = 0; i < IN_ColorMaterialList.Count; i++)
{
<option value="@IN_ColorMaterialList[i]">@IN_ColorMaterialList[i]</option>
}
</select>
</div>
</div>
</div>
</div>
+161 -69
View File
@@ -4,7 +4,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System.Reflection.Metadata;
using System.Runtime.InteropServices;
using WebWindow.Base;
using WebWindowComplex;
using WebWindowComplex.DTO;
using WebWindowComplex.Json;
using static WebWindowComplex.Json.WindowConst;
@@ -28,17 +28,19 @@ namespace WebWindowComplex
public EventCallback<Dictionary<string, string>> EC_OnUpdate { get; set; }
[Parameter]
public Template IN_SelTemplate
public string CurrJwd
{
get => m_SelTemplate;
get => m_CurrJwd;
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))
if (m_CurrJwd != value && value != "")
{
m_SelTemplate = value;
m_CurrJwd = value;
SelFamilyHardware = IN_SelFamilyHardware;
JsonWindow WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(m_SelTemplate.JWD, new PolymorphicJsonConverter()) ?? new JsonWindow("");
SelColorMaterial = IN_SelColorMaterial ?? "";
SelMaterial = IN_SelMaterial ?? "";
SelGlass = IN_SelGlass ?? "";
JsonWindow WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(m_CurrJwd, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", "");
if (m_CurrWindow != null)
{
m_CurrWindow.OnPreview -= M_CurrWindow_OnPreview;
@@ -65,7 +67,57 @@ namespace WebWindowComplex
m_FillList = new List<Fill>();
m_SashList = new List<Sash>();
m_SplitList = new List<Split>();
m_SplitParentList = new List<SplitParent>();
//m_SplitParentList = new List<SplitParent>();
m_SplittedList = new List<Splitted>();
m_ItemTableList = new List<ItemTable>();
CreateWindowsList(m_CurrWindow.AreaList[0], false);
CreateElementTable(m_CurrWindow.AreaList[0], 1, 1, 1, 1);
}
}
}
[Parameter]
public Template IN_SelTemplate
{
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;
SelFamilyHardware = IN_SelFamilyHardware;
SelColorMaterial = IN_SelColorMaterial ?? "";
SelMaterial = IN_SelMaterial ?? "";
SelGlass = IN_SelGlass ?? "";
JsonWindow WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(m_SelTemplate.JWD, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", "");
if (m_CurrWindow != null)
{
m_CurrWindow.OnPreview -= M_CurrWindow_OnPreview;
m_CurrWindow = null;
}
Sash.m_HardwareCompleteList = IN_HardwareList;
Sash.s_FamilyHardwareList = IN_FamilyHardwareList;
Sash.s_SelFamilyHW = IN_SelFamilyHardware;
m_CurrWindow = WindowFromJson.Deserialize();
m_CurrWindow.OnPreview += M_CurrWindow_OnPreview;
// recupero dimensioni Frame e Joint Frame della finestra precedente
if (m_PreviousWindow != null)
{
for (int i = 0; i < 2; i++)
m_CurrWindow.AreaList[0].DimensionList[i] = m_PreviousWindow.AreaList[0].DimensionList[i];
for (int i = 0; i < 4; i++)
m_CurrWindow.AreaList[0].JointList[i] = m_PreviousWindow.AreaList[0].JointList[i];
}
}
if (m_CurrWindow != null)
{
m_maxCol = 0;
m_maxRow = 0;
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>();
m_ItemTableList = new List<ItemTable>();
CreateWindowsList(m_CurrWindow.AreaList[0], false);
@@ -81,10 +133,28 @@ namespace WebWindowComplex
public List<string> IN_FamilyHardwareList { get; set; } = null!;
[Parameter]
public string? IN_SelFamilyHardware { get; set; } = null;
public string IN_SelFamilyHardware { get; set; } = null!;
[Parameter]
public List<Hardware>? IN_HardwareList { get; set; } = null;
public List<Hardware> IN_HardwareList { get; set; } = null!;
[Parameter]
public List<string> IN_ColorMaterialList { get; set; } = null!;
[Parameter]
public string? IN_SelColorMaterial { get; set; } = null;
[Parameter]
public List<string> IN_MaterialList { get; set; } = null!;
[Parameter]
public string? IN_SelMaterial { get; set; } = null;
[Parameter]
public List<string> IN_GlassList { get; set; } = null!;
[Parameter]
public string? IN_SelGlass { get; set; } = null;
[Parameter]
public string LiveSVG
@@ -121,16 +191,6 @@ namespace WebWindowComplex
General
}
protected enum ColorWindow
{
Bianco = 0,
Grigio = 1,
Tortora,
Blu,
Verde,
Nero
}
protected enum positionJoints
{
BL = 0, // Bottom Left
@@ -148,7 +208,7 @@ namespace WebWindowComplex
get => m_Frame;
set => m_Frame = value;
}
protected string m_CurrJwd { get; set; }
protected string m_SelSVG { get; set; } = "";
/// <summary>
@@ -180,10 +240,10 @@ namespace WebWindowComplex
{
get => m_SplittedList;
}
protected List<SplitParent> SplitParentList
{
get => m_SplitParentList;
}
//protected List<SplitParent> SplitParentList
//{
// get => m_SplitParentList;
//}
protected List<ItemTable> ItemTableList
{
get => m_ItemTableList;
@@ -213,20 +273,36 @@ namespace WebWindowComplex
}
}
}
protected string SelColorMaterial { get; set; } = null;
protected string SelMaterial { get; set; } = null;
protected string SelGlass { get; set; } = null;
#endregion Protected Properties
#region Protected Methods
protected override async Task OnInitializedAsync()
{
if (string.IsNullOrEmpty(CurrJwd))
{
currStep = CompileStep.Template;
}
else
{
currStep = CompileStep.Gerarchia;
}
await DoPreviewSvg();
}
/// <summary>
/// Metodo per la scelta della maniglia univoca
/// </summary>
/// <param name="sashDim"></param>
/// <returns></returns>
protected async Task changeHandle(SashDimension sashDim)
protected void changeHandle(SashDimension sashDim)
{
//if(m_SashList[0].AreaList.Count < 3)
//{
foreach (SashDimension item in SashList[0].SashList)
{
if (item.Equals(sashDim))
@@ -238,8 +314,6 @@ namespace WebWindowComplex
item.bHasHandle = false;
}
}
//}
await Task.Delay(1);
}
// Ancora da fare...
@@ -270,7 +344,14 @@ namespace WebWindowComplex
protected async Task DoReset()
{
SelFamilyHardware = IN_SelFamilyHardware;
JsonWindow WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(m_SelTemplate.JWD, new PolymorphicJsonConverter()) ?? new JsonWindow("");
SelColorMaterial = IN_SelColorMaterial ?? "";
SelMaterial = IN_SelMaterial ?? "";
SelGlass = IN_SelGlass ?? "";
JsonWindow WindowFromJson;
if (string.IsNullOrEmpty(CurrJwd))
WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(m_SelTemplate.JWD, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", "");
else
WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(m_CurrJwd, new PolymorphicJsonConverter()) ?? new JsonWindow("", "", "", "");
if (m_CurrWindow != null)
{
m_CurrWindow.OnPreview -= M_CurrWindow_OnPreview;
@@ -282,7 +363,7 @@ namespace WebWindowComplex
m_SashList = new List<Sash>();
m_SplitList = new List<Split>();
m_SplittedList = new List<Splitted>();
m_SplitParentList = new List<SplitParent>();
//m_SplitParentList = new List<SplitParent>();
m_ItemTableList = new List<ItemTable>();
m_maxCol = 0;
m_maxRow = 0;
@@ -377,7 +458,7 @@ namespace WebWindowComplex
{
case AreaTypes.FRAME:
{
if(node.AreaList.Count >= 1)
if (node.AreaList.Count >= 1)
ItemTableList.Add(new ItemTable(AreaTypes.FRAME, "FR", row, col, -1, node.AreaList.Count));
else
ItemTableList.Add(new ItemTable(AreaTypes.FRAME, "FR", row, col, -1, 0));
@@ -393,12 +474,12 @@ namespace WebWindowComplex
if ((node.ParentArea.ParentArea != null && node.ParentArea.ParentArea.AreaList.Count > 1) ||
(node.ParentArea != null && node.ParentArea.AreaList.Count > 1))
{
for(int i = 0; i < SashList.Count; i++)
for (int i = 0; i < SashList.Count; i++)
{
if (SashList[i].Equals(node))
{
// Se il nodo ha figli, salvo il numero nell'oggetto
if(node.AreaList.Count >= 1)
if (node.AreaList.Count >= 1)
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "SH", maxRow, col, i, node.AreaList.Count));
else
ItemTableList.Add(new ItemTable(AreaTypes.SASH, "SH", maxRow, col, i, 0));
@@ -422,7 +503,7 @@ namespace WebWindowComplex
}
case AreaTypes.FILL:
{
if((node.ParentArea.AreaList.Count > 1 && node.ParentArea.AreaList[0].Equals(node)) ||
if ((node.ParentArea.AreaList.Count > 1 && node.ParentArea.AreaList[0].Equals(node)) ||
(node.ParentArea.ParentArea != null && node.ParentArea.ParentArea.AreaList.Count > 1 && node.ParentArea.ParentArea.AreaList[0].AreaList[0].Equals(node)))
maxCol++;
ItemTableList.Add(new ItemTable(AreaTypes.FILL, "FL", maxRow, col, -1, 0));
@@ -436,7 +517,7 @@ namespace WebWindowComplex
if (node.ParentArea.AreaList.Count > 1 || (node.ParentArea.ParentArea != null && node.ParentArea.ParentArea.AreaList.Count > 1))
{
if (node.ParentArea.AreaList[0].Equals(node) || node.ParentArea.ParentArea.AreaList[0].Equals(node))
maxCol ++;
maxCol++;
if (node.AreaList.Count >= 1 || node.AreaList.Count >= 1)
ItemTableList.Add(new ItemTable(AreaTypes.SPLIT, "SP", maxRow, col, -1, node.AreaList.Count));
else
@@ -468,7 +549,7 @@ namespace WebWindowComplex
CreateElementTable(item, row, col, maxRow, maxCol);
}
}
if(maxCol> m_maxCol)
if (maxCol > m_maxCol)
{
m_maxCol = maxCol;
}
@@ -477,13 +558,13 @@ namespace WebWindowComplex
m_maxRow = maxRow;
}
}
private string fillTable(int row, int col)
{
List<ItemTable> itemSameCol = new List<ItemTable>();
for(int k = 0; k < row; k++)
for (int k = 0; k < row; k++)
{
if(ItemTableList[k].Col == col+1)
if (ItemTableList[k].Col == col + 1)
{
itemSameCol.Add(ItemTableList[k]);
}
@@ -509,10 +590,10 @@ namespace WebWindowComplex
if (itemSameCol.Count > 0)
{
// Sono alla riga successiva di un elemento e nella stessa colonna
if(itemSameCol.Last().Row == row)
if (itemSameCol.Last().Row == row)
{
// se ha un solo figlio
if(itemSameCol.Last().NumChild == 1)
if (itemSameCol.Last().NumChild == 1)
{
return "└";
}
@@ -529,7 +610,7 @@ namespace WebWindowComplex
else
{
// se ha un solo figlio
if(itemSameCol.Last().NumChild == 1)
if (itemSameCol.Last().NumChild == 1)
{
return " ";
}
@@ -561,9 +642,9 @@ namespace WebWindowComplex
/// Metodo per settare tutti i Joints di Frame o Sash come ANGLED o FULL_H o FULL_V
/// </summary>
/// <param name="n_type"> tipo di giunzione (ANGLED o FULL_H o FULL_V)</param>
/// <param name="n_place"> oggetto a cui essere applicato (Frame o Sash)</param>
/// <param name="area"> area su cui eseguire la funzione (Frame o Sash)</param>
/// <returns></returns>
private async Task AllJointsFrame(int n_type, int n_place)
private async Task AllJointsFrame(int n_type, Area area)
{
Joints type = Joints.ANGLED;
if (n_type == 2)
@@ -574,16 +655,17 @@ namespace WebWindowComplex
{
type = Joints.FULL_V;
}
if (n_place == 0)
if (area is Frame)
{
foreach (Joint joint in FrameWindow.JointList)
{
joint.SetSelJointType(type);
}
}
else if (n_place == 1)
else
{
foreach (Joint joint in m_SashList[0].JointList)
Sash s = (Sash)area;
foreach (Joint joint in s.JointList)
{
joint.SetSelJointType(type);
}
@@ -616,20 +698,26 @@ namespace WebWindowComplex
/// <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)
private async Task CopyContentSash(Sash sashItem, int IndexCopy, int IndexModify)
{
// Anta selezionata
Area sashSplitted = sashItem.AreaList[IndexModify];
// Rimuovo riempimento da anta selezionata
sashSplitted.AreaList.RemoveAt(0);
// Creo la copia dell'anta scelta
Area a = sashItem.AreaList[IndexCopy-1].AreaList[0].Copy(sashSplitted);
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)
/// <summary>
/// Metodo per copiare una sash intera
/// </summary>
/// <param name="currSplitted"></param>
/// <param name="numSash"></param>
/// <returns></returns>
private async Task CopySash(Splitted currSplitted, int numSash)
{
//Rimuovo contenuto di Splitted
currSplitted.AreaList.RemoveAll(i => i != null);
@@ -650,13 +738,10 @@ namespace WebWindowComplex
#endregion Protected Methods
#region Private Fields
private CompileStep currStep = CompileStep.Template;
private CompileStep currStep;
private int currSash = -1;
private ColorWindow currColorWin = ColorWindow.Bianco;
private Frame m_Frame;
private List<Sash> m_SashList = new List<Sash>();
@@ -669,7 +754,7 @@ namespace WebWindowComplex
private List<ItemTable> m_ItemTableList = new List<ItemTable>();
private List<SplitParent> m_SplitParentList = new List<SplitParent>();
//private List<SplitParent> m_SplitParentList = new List<SplitParent>();
private int m_maxCol = 0;
private int m_maxRow = 0;
@@ -700,12 +785,6 @@ namespace WebWindowComplex
currSash = -1;
}
private void ChangeColorWindow(ColorWindow newColorWin)
{
currColorWin = newColorWin;
}
private void M_CurrWindow_OnPreview(object? sender, OnPreviewEventArgs e)
{
Dictionary<string, string> Args = new Dictionary<string, string>();
@@ -735,13 +814,8 @@ namespace WebWindowComplex
return (testStep == currStep) ? "nav-link active fw-bold" : "nav-link text-secondary";
}
private string buttonCss(ColorWindow testColor)
{
return testColor.Equals(currColorWin) ? "btn btn-outline-secondary active" : "btn btn-outline-secondary";
}
/// <summary>
/// Calcola larghezza colonna da mostrare
/// Calcola larghezza colonna contenente nav da mostrare
/// </summary>
/// <returns></returns>
private string mainCss()
@@ -749,6 +823,24 @@ namespace WebWindowComplex
return (currStep == CompileStep.Template) ? "col-12" : "col-6";
}
/// <summary>
/// Calcola larghezza colonna header nav
/// </summary>
/// <returns></returns>
private string headerCss()
{
return (currStep == CompileStep.Template) ? "col-10 d-grid gap-1 px-2 d-md-flex justify-content-md-start" : "col-8 d-grid gap-1 px-2 d-md-flex justify-content-md-start";
}
/// <summary>
/// Calcola larghezza colonna button nav
/// </summary>
/// <returns></returns>
private string buttonCss()
{
return (currStep == CompileStep.Template) ? "col-2 d-grid gap-1 d-md-flex justify-content-md-end" : "col-4 d-grid gap-1 d-md-flex justify-content-md-end";
}
#endregion Private Methods
}
}
+1
View File
@@ -2,6 +2,7 @@
font-size: 0.9rem;
padding-bottom: 0.1rem;
}
.nav-item ::deep a {
color: #000000;
border-radius: 5px;
+145 -80
View File
@@ -6,8 +6,8 @@ using System.ComponentModel;
using System.Drawing;
using System.Runtime.Intrinsics.Arm;
using System.Xml.Serialization;
using WebWindow.Base;
using WebWindowComplex.Json;
using static WebWindowComplex.ParametriOpzioni;
using static WebWindowComplex.Json.WindowConst;
namespace WebWindowComplex
@@ -30,6 +30,48 @@ namespace WebWindowComplex
}
}
private string m_sMaterial;
public string sMaterial
{
get
{
return m_sMaterial;
}
set
{
m_sMaterial = value;
OnUpdatePreview(sSerialized());
}
}
private string m_sColorMaterial;
public string sColorMaterial
{
get
{
return m_sColorMaterial;
}
set
{
m_sColorMaterial = value;
OnUpdatePreview(sSerialized());
}
}
private string m_sGlass;
public string sGlass
{
get
{
return m_sGlass;
}
set
{
m_sGlass = value;
OnUpdatePreview(sSerialized());
}
}
private ObservableCollection<Frame> m_AreaList = new ObservableCollection<Frame>();
public ObservableCollection<Frame> AreaList
{
@@ -45,7 +87,7 @@ namespace WebWindowComplex
internal JsonWindow Serialize()
{
JsonWindow JsonWindow = new JsonWindow(sProfilePath);
JsonWindow JsonWindow = new JsonWindow(sProfilePath, sMaterial, sColorMaterial, sGlass);
foreach (var Area in AreaList)
JsonWindow.AreaList.Add(Area.Serialize());
return JsonWindow;
@@ -202,7 +244,7 @@ namespace WebWindowComplex
Sash SashArea = Sash.CreateSash(ParentArea);
// Aggiungo area
AreaList.Add(SashArea);
if(SashArea.nSashQty == 1)
if (SashArea.nSashQty == 1)
{
// Inserisco il riempimento precedente
AreaList[0].AreaList.Add(ContentArea[0]);
@@ -227,7 +269,7 @@ namespace WebWindowComplex
public void SwapAree()
{
Area tempArea;
if(this is Sash || this is Split)
if (this is Sash || this is Split)
{
tempArea = AreaList[0];
AreaList[0] = AreaList[1];
@@ -630,7 +672,7 @@ namespace WebWindowComplex
}
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)
@@ -646,7 +688,7 @@ namespace WebWindowComplex
SashList.RemoveAt(0);
}
}
if(m_SashList.Count == 0)
if (m_SashList.Count == 0)
{
Area child = AreaList[0];
// Se nella singola anta ho uno split
@@ -687,7 +729,7 @@ namespace WebWindowComplex
else
{
// Se aggiungo ante
if(SashList.Count > AreaList.Count)
if (SashList.Count > AreaList.Count)
{
List<Area> ContentArea = new List<Area>();
// Salvo in ContentArea il sottoalbero delle singole aree che mantengo
@@ -842,7 +884,7 @@ namespace WebWindowComplex
set
{
m_SelOrientationSashType = (OrientationSash)IdNameStruct.IdFromInd(value, m_OrientationSashTypeList);
if(value == 0)
if (value == 0)
{
m_bIsSashVertical = true;
}
@@ -966,7 +1008,7 @@ namespace WebWindowComplex
set
{
// Controllo che il valore inserito sia positivo
if(value >= 0)
if (value >= 0)
{
m_nSashBottomRailQty = value;
if (m_nSashBottomRailQty > 0)
@@ -1093,9 +1135,9 @@ namespace WebWindowComplex
internal void SetSelHardwareFromId(string sId)
{
m_SelHardware = m_HardwareList.FirstOrDefault(x => x.sId == sId)?? new Hardware("","","","","",0,0);
if (m_SelHardware != null)
m_SelHardware = m_HardwareList[0];
m_SelHardware = m_HardwareList.FirstOrDefault(x => x.sId == sId) ?? new Hardware("", "", "", "", "", 0, 0);
if (m_SelHardware == null)
m_SelHardware = m_HardwareList[0];
}
public int SelHardwareTypeIndex
@@ -1126,8 +1168,8 @@ namespace WebWindowComplex
}
}
private ObservableCollection<AGBOption> m_HwdOptionList = new ObservableCollection<AGBOption>();
public ObservableCollection<AGBOption> HwdOptionList
private ObservableCollection<ParametriOpzioni> m_HwdOptionList = new ObservableCollection<ParametriOpzioni>();
public ObservableCollection<ParametriOpzioni> HwdOptionList
{
get
{
@@ -1215,9 +1257,9 @@ namespace WebWindowComplex
private string ConvertOpeningType()
{
if(m_SashList.Count > 1)
if (m_SashList.Count > 1)
{
for(int i = 0; i < m_SashList.Count; i++)
for (int i = 0; i < m_SashList.Count; i++)
{
if (m_SashList[i].bHasHandle)
{
@@ -1226,11 +1268,11 @@ namespace WebWindowComplex
else
return "ANTA_RIBALTA";
}
}
return "ANTA_BANDIERA";
return "";
}
else
else if (m_SashList.Count > 0)
{
switch (GetOpeningType(m_SashList[0].OpeningType))
{
@@ -1266,6 +1308,7 @@ namespace WebWindowComplex
}
}
}
return "";
}
public void RefreshHardwareList()
@@ -1283,34 +1326,34 @@ namespace WebWindowComplex
m_HwdOptionList.Clear();
}
//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;
// }
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;
// }
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;
// }
// }
//}
default:
{
return OpeningSides.NULL;
}
}
}
public override Sash Copy(Area newParentArea)
{
@@ -1324,12 +1367,12 @@ namespace WebWindowComplex
newSash.RefreshHardwareList();
newSash.RefreshHardwareOptionList();
newSash.SetSelHardware(SelHardware);
for (int i = 0; i <SashList.Count; i++)
for (int i = 0; i < SashList.Count; i++)
{
//Cancello SashDimension di default e aggiungo la copia
newSash.SashList.RemoveAt(i);
SashDimension newSashDim = SashList[i].Copy();
newSash.SashList.Insert(i,newSashDim);
newSash.SashList.Insert(i, newSashDim);
}
foreach (var item in JointList)
{
@@ -1385,7 +1428,7 @@ namespace WebWindowComplex
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);
@@ -1424,7 +1467,7 @@ namespace WebWindowComplex
{
Splitted s = (Splitted)AreaList[0];
s.SetParentArea(ParentArea);
ParentArea.AreaList.Add(s.AreaList[0]);
ParentArea.AreaList.Add(s);
ParentArea.AreaList.Remove(this);
}
m_ParentWindow.OnUpdatePreview(m_ParentWindow.sSerialized());
@@ -1537,7 +1580,7 @@ namespace WebWindowComplex
newSplit.SetSplitQty(nSplitQty);
newSplit.SetSplitShape(SelSplitShape, true);
newSplit.SetAreaType(AreaType);
foreach(var item in AreaList)
foreach (var item in AreaList)
{
Area a = item.Copy(newSplit);
newSplit.AreaList.Add(a);
@@ -1736,7 +1779,7 @@ namespace WebWindowComplex
public Joint Copy()
{
Joint newJoint = new Joint(ParentArea,nIndex, SelJointType);
Joint newJoint = new Joint(ParentArea, nIndex, SelJointType);
return newJoint;
}
@@ -1754,7 +1797,6 @@ namespace WebWindowComplex
}
}
#if false
public class Hardware
{
private string m_sId;
@@ -1830,10 +1872,9 @@ namespace WebWindowComplex
m_nSashQty = nSashQty;
m_nSashPosition = nSashPosition;
}
}
#endif
}
public class AGBOption
public partial class ParametriOpzioni
{
public enum HDWOPTIONTYPES : int
{
@@ -1842,7 +1883,7 @@ namespace WebWindowComplex
COMBO = 3
}
private HDWOPTIONTYPES m_Type;
protected HDWOPTIONTYPES m_Type;
public HDWOPTIONTYPES Type
{
get
@@ -1869,6 +1910,25 @@ namespace WebWindowComplex
}
}
private Visibility m_OptVisibility;
public Visibility OptVisibility
{
get
{
return m_OptVisibility;
}
}
public ParametriOpzioni(ParametriOpzioniParametri HdwOptionParam)
{
m_sName = HdwOptionParam.NomeParametro;
m_sDescription = HdwOptionParam.DescrizioneParametro;
m_OptVisibility = Visibility.VISIBLE; // If(HdwOptionParam.Visible.ToLower = "true", Visibility.Visible, Visibility.Collapsed)
}
}
public class AGBOptionCombo : ParametriOpzioni
{
private List<AGBOptionParameter> m_ValueList = new List<AGBOptionParameter>();
public List<AGBOptionParameter> ValueList
{
@@ -1891,30 +1951,13 @@ namespace WebWindowComplex
}
}
private Visibility m_OptVisibility;
public Visibility OptVisibility
public AGBOptionCombo(ParametriOpzioniParametri HdwOptionParam) : base(HdwOptionParam)
{
get
{
return m_OptVisibility;
}
m_Type = HDWOPTIONTYPES.COMBO;
foreach (var Value in HdwOptionParam.Opzioni)
m_ValueList.Add(new AGBOptionParameter(Value.Valore, Value.DescrizioneOpzione));
m_sValue = m_ValueList.FirstOrDefault(x => x.sValue == HdwOptionParam.ValoreCorrente) ?? new AGBOptionParameter("", "");
}
//public AGBOption(ParametriOpzioniParametri HdwOptionParam)
//{
// if (HdwOptionParam.Opzioni.Count > 0)
// {
// m_Type = HDWOPTIONTYPES.COMBO;
// foreach (var Value in HdwOptionParam.Opzioni)
// m_ValueList.Add(new AGBOptionParameter(Value.Valore, Value.DescrizioneOpzione));
// }
// else
// m_Type = HDWOPTIONTYPES.TEXT;
// m_sName = HdwOptionParam.NomeParametro;
// m_sDescription = HdwOptionParam.DescrizioneParametro;
// m_sValue = m_ValueList.FirstOrDefault(x => x.sValue == HdwOptionParam.ValoreCorrente);
// m_OptVisibility = Visibility.Visible; // If(HdwOptionParam.Visible.ToLower = "true", Visibility.Visible, Visibility.Collapsed)
//}
}
public class AGBOptionParameter
@@ -1944,6 +1987,28 @@ namespace WebWindowComplex
}
}
public class AGBOptionText : ParametriOpzioni
{
private string m_sValue;
public string sValue
{
get
{
return m_sValue;
}
set
{
m_sValue = value;
}
}
public AGBOptionText(ParametriOpzioniParametri HdwOptionParam) : base(HdwOptionParam)
{
m_Type = HDWOPTIONTYPES.TEXT;
m_sValue = HdwOptionParam.ValoreCorrente;
}
}
public class FrameDimension
{
// valore massimo e minimo della dimensione del frame
@@ -2386,8 +2451,8 @@ namespace WebWindowComplex
}
m_dDimension = value;
m_Parent.ParentWindow.OnUpdatePreview(m_Parent.ParentWindow.sSerialized());
}
}
}
}
internal void SetDimension(double dValue)