Dizionario per passare jwd
This commit is contained in:
@@ -8,5 +8,3 @@
|
||||
LiveSVG="@currSvg">
|
||||
</WebAedificaMaker>
|
||||
|
||||
@* <p>@currText</p> *@
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using EgwCoreLib.Lux.Core;
|
||||
using EgwCoreLib.Lux.Core.RestPayload;
|
||||
using EgwCoreLib.Lux.Data.Services;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Newtonsoft.Json;
|
||||
@@ -29,6 +30,7 @@ namespace Test.UI.Components.Pages
|
||||
#region Protected Fields
|
||||
|
||||
protected string currJwd = "";
|
||||
protected Dictionary<string, string> m_CurrArgs = new Dictionary<string, string>();
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
@@ -47,7 +49,7 @@ namespace Test.UI.Components.Pages
|
||||
{
|
||||
get
|
||||
{
|
||||
string outVal = currJwd;
|
||||
string outVal = m_CurrArgs["Jwd"];
|
||||
return (MarkupString)outVal.Replace(Environment.NewLine, "<br/>").Replace(" ", " ");
|
||||
}
|
||||
}
|
||||
@@ -73,12 +75,12 @@ namespace Test.UI.Components.Pages
|
||||
|
||||
private string apiUrl = "";
|
||||
private string calcTag = "";
|
||||
private string CalcUid = "CurrWindow";
|
||||
private string cFile = "Data/Setup.json";
|
||||
private string currSvg = "";
|
||||
|
||||
private string imgBasePath = "";
|
||||
|
||||
private string imgTag = "";
|
||||
private string GenericBasePath = "";
|
||||
|
||||
private string subChannel = "";
|
||||
|
||||
@@ -112,8 +114,8 @@ namespace Test.UI.Components.Pages
|
||||
{
|
||||
apiUrl = Config.GetValue<string>("ServerConf:Prog.ApiUrl") ?? "";
|
||||
imgBasePath = Config.GetValue<string>("ServerConf:ImageBaseUrl") ?? "";
|
||||
imgTag = Config.GetValue<string>("ServerConf:ImageFileTag") ?? "";
|
||||
calcTag = Config.GetValue<string>("ServerConf:ImageCalcTag") ?? "";
|
||||
GenericBasePath = Config.GetValue<string>("ServerConf:GenericBaseUrl") ?? "";
|
||||
calcTag = Config.GetValue<string>("ServerConf:CalcTag") ?? "";
|
||||
subChannel = Config.GetValue<string>("ServerConf:SvgChannel") ?? "";
|
||||
}
|
||||
|
||||
@@ -132,11 +134,17 @@ namespace Test.UI.Components.Pages
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
private async Task SaveJWD(string newSerial)
|
||||
private async Task SaveJWD(Dictionary<string,string> CurrArgs)
|
||||
{
|
||||
currJwd = newSerial;
|
||||
m_CurrArgs = CurrArgs;
|
||||
// chiamo la chiamata POST alla API, che manda la richiesta via REDIS
|
||||
await ICService.CallRestPost($"{apiUrl}/{imgBasePath}", $"{calcTag}/{windowUid}", currJwd);
|
||||
if (m_CurrArgs != null)
|
||||
{
|
||||
CalcRequestDTO calcRequestDTO = new CalcRequestDTO();
|
||||
calcRequestDTO.EnvType = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW;
|
||||
calcRequestDTO.DictExec = m_CurrArgs;
|
||||
await ICService.CallRestPost($"{apiUrl}/{GenericBasePath}", $"{calcTag}/{CalcUid}", calcRequestDTO);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using EgwCoreLib.Lux.Core;
|
||||
using EgwCoreLib.Lux.Core.RestPayload;
|
||||
using EgwCoreLib.Lux.Data.Services;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Newtonsoft.Json;
|
||||
using System.Security.AccessControl;
|
||||
using WebWindowConfigurator;
|
||||
using WebWindowConfigurator.DTO;
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace Test.UI.Components.Pages
|
||||
#region Protected Fields
|
||||
|
||||
protected string currJwd = "";
|
||||
protected Dictionary<string, string> m_CurrArgs = new Dictionary<string, string>();
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
@@ -73,13 +74,13 @@ namespace Test.UI.Components.Pages
|
||||
|
||||
private string apiUrl = "";
|
||||
private string calcTag = "";
|
||||
private string CalcUid = "CurrWindow";
|
||||
private string cFile = "Data/Setup.json";
|
||||
private TemplateSelectDTO? currSel = null;
|
||||
private string currSvg = "";
|
||||
|
||||
private string imgBasePath = "";
|
||||
|
||||
private string imgTag = "";
|
||||
private string GenericBasePath = "";
|
||||
|
||||
private string subChannel = "";
|
||||
|
||||
@@ -124,8 +125,8 @@ namespace Test.UI.Components.Pages
|
||||
{
|
||||
apiUrl = Config.GetValue<string>("ServerConf:Prog.ApiUrl") ?? "";
|
||||
imgBasePath = Config.GetValue<string>("ServerConf:ImageBaseUrl") ?? "";
|
||||
imgTag = Config.GetValue<string>("ServerConf:ImageFileTag") ?? "";
|
||||
calcTag = Config.GetValue<string>("ServerConf:ImageCalcTag") ?? "";
|
||||
GenericBasePath = Config.GetValue<string>("ServerConf:GenericBaseUrl") ?? "";
|
||||
calcTag = Config.GetValue<string>("ServerConf:CalcTag") ?? "";
|
||||
subChannel = Config.GetValue<string>("ServerConf:SvgChannel") ?? "";
|
||||
}
|
||||
|
||||
@@ -155,14 +156,17 @@ namespace Test.UI.Components.Pages
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
private async Task SaveJWD(string newSerial)
|
||||
private async Task SaveJWD(Dictionary<string,string> CurrArgs)
|
||||
{
|
||||
currJwd = newSerial;
|
||||
m_CurrArgs = CurrArgs;
|
||||
// chiamo la chiamata POST alla API, che manda la richiesta via REDIS
|
||||
if (currSel != null)
|
||||
{
|
||||
CalcRequestDTO calcRequestDTO = new CalcRequestDTO();
|
||||
calcRequestDTO.EnvType = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW;
|
||||
calcRequestDTO.DictExec = m_CurrArgs;
|
||||
await ICService.CallRestPost($"{apiUrl}/{GenericBasePath}", $"{calcTag}/{CalcUid}", calcRequestDTO);
|
||||
}
|
||||
await ICService.CallRestPost($"{apiUrl}/{imgBasePath}", $"{calcTag}/{windowUid}", currJwd);
|
||||
}
|
||||
|
||||
private void SetTemplate(TemplateSelectDTO selTemp)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using EgwCoreLib.Lux.Core;
|
||||
using EgwCoreLib.Lux.Core.RestPayload;
|
||||
using EgwCoreLib.Lux.Data.Services;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Newtonsoft.Json;
|
||||
@@ -28,6 +29,7 @@ namespace Test.UI.Components.Pages
|
||||
#region Protected Fields
|
||||
|
||||
protected string currJwd = "...";
|
||||
protected Dictionary<string, string> m_CurrArgs = new Dictionary<string, string>();
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
@@ -66,13 +68,13 @@ namespace Test.UI.Components.Pages
|
||||
|
||||
private string apiUrl = "";
|
||||
private string calcTag = "";
|
||||
private string CalcUid = "CurrWindow";
|
||||
private string cFile = "Data/Setup.json";
|
||||
private TemplateSelectDTO? currSel = null;
|
||||
private string currSvg = "";
|
||||
|
||||
private string imgBasePath = "";
|
||||
|
||||
private string imgTag = "";
|
||||
private string GenericBasePath = "";
|
||||
|
||||
private string subChannel = "";
|
||||
|
||||
@@ -117,8 +119,8 @@ namespace Test.UI.Components.Pages
|
||||
{
|
||||
apiUrl = Config.GetValue<string>("ServerConf:Prog.ApiUrl") ?? "";
|
||||
imgBasePath = Config.GetValue<string>("ServerConf:ImageBaseUrl") ?? "";
|
||||
imgTag = Config.GetValue<string>("ServerConf:ImageFileTag") ?? "";
|
||||
calcTag = Config.GetValue<string>("ServerConf:ImageCalcTag") ?? "";
|
||||
GenericBasePath = Config.GetValue<string>("ServerConf:GenericBaseUrl") ?? "";
|
||||
calcTag = Config.GetValue<string>("ServerConf:CalcTag") ?? "";
|
||||
subChannel = Config.GetValue<string>("ServerConf:SvgChannel") ?? "";
|
||||
}
|
||||
|
||||
@@ -146,13 +148,16 @@ namespace Test.UI.Components.Pages
|
||||
}
|
||||
}
|
||||
|
||||
private async Task SaveJWD(string newSerial)
|
||||
private async Task SaveJWD(Dictionary<string,string> CurrArgs)
|
||||
{
|
||||
currJwd = newSerial;
|
||||
m_CurrArgs = CurrArgs;
|
||||
// chiamo la chiamata POST alla API, che manda la richiesta via REDIS
|
||||
if (currSel != null)
|
||||
{
|
||||
await ICService.CallRestPost($"{apiUrl}/{imgBasePath}", $"{calcTag}/{windowUid}", currJwd);
|
||||
CalcRequestDTO calcRequestDTO = new CalcRequestDTO();
|
||||
calcRequestDTO.EnvType = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW;
|
||||
calcRequestDTO.DictExec = m_CurrArgs;
|
||||
await ICService.CallRestPost($"{apiUrl}/{GenericBasePath}", $"{calcTag}/{CalcUid}", calcRequestDTO);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>2.7.8.1117</Version>
|
||||
<Version>2.7.8.1817</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione JWD per LUX</Description>
|
||||
@@ -62,6 +62,25 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -159,15 +159,23 @@
|
||||
</div>
|
||||
@foreach (var dim in item.SplitPositionList)
|
||||
{
|
||||
string desc = "";
|
||||
@if (item.SelSplitShape == Json.WindowConst.SplitShapes.VERTICAL)
|
||||
{
|
||||
desc = "Larghezza split ";
|
||||
}
|
||||
else
|
||||
{
|
||||
desc = "Altezza split ";
|
||||
}
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="basic-addon3Split">Altezza area inferiore</span>
|
||||
<span class="input-group-text" id="basic-addon3Split">@desc @(item.SplitPositionList.IndexOf(dim) + 1)</span>
|
||||
<input type="number" class="form-control" aria-label="basic-addon2Split" @bind="@dim.dDimension">
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@* <button class="btn btn-sm btn-primary" title="Reset selezione" @onclick="DoReset"><i class="fa-solid fa-arrow-rotate-right"></i></button> *@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -176,16 +184,16 @@
|
||||
{
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="alert alert-light text-start p-1 display-4 w-50">
|
||||
<div class="alert alert-light text-start p-1 display-4 ">
|
||||
@foreach (var item in SashList)
|
||||
{
|
||||
<div class="input-group mb-2">
|
||||
<div class="input-group mb-2 w-50">
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="NumberSash">Number</span>
|
||||
<input type="number" class="form-control" aria-label="NumberSash" @bind="@item.nSashQty">
|
||||
</div>
|
||||
</div>
|
||||
<div class="border mb-2">
|
||||
<div class="border mb-2 w-50">
|
||||
<div class="card-body py-2">
|
||||
<h5 class="card-title">Orientation</h5>
|
||||
<div class="input-group mb-2">
|
||||
@@ -199,49 +207,145 @@
|
||||
</div>
|
||||
@foreach (SashDimension sash in item.SashList)
|
||||
{
|
||||
<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 @(item.SashList.IndexOf(sash) + 1)</h5>
|
||||
}
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="OpeningSash">Tipology</label>
|
||||
<select class="form-select" @bind="@sash.SelOpeningTypeIndex">
|
||||
<option value="0">A battente sinistra</option>
|
||||
<option value="1">A battente destra</option>
|
||||
<option value="2">Ad anta-ribalta sinistra</option>
|
||||
<option value="3">Ad anta-ribalta destra</option>
|
||||
<option value="4">5</option>
|
||||
<option value="5">7</option>
|
||||
<option value="6">8</option>
|
||||
<option value="7">9</option>
|
||||
<option value="8">10</option>
|
||||
<option value="9">11</option>
|
||||
<option value="10">12</option>
|
||||
<option value="11">13</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="Dimension">Dimension</span>
|
||||
<input type="number" class="form-control" aria-label="DimensionSash" @bind="@sash.dDimension">
|
||||
</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="Handle" @bind="@sash.bHasHandle">
|
||||
<div class="col-sm-6 mb-3 mb-sm-0">
|
||||
<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 @(item.SashList.IndexOf(sash) + 1)</h5>
|
||||
}
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="OpeningSash">Tipology</label>
|
||||
<select class="form-select" @bind="@sash.SelOpeningTypeIndex">
|
||||
<option value="0">A battente sinistra</option>
|
||||
<option value="1">A battente destra</option>
|
||||
<option value="2">Ad anta-ribalta sinistra</option>
|
||||
<option value="3">Ad anta-ribalta destra</option>
|
||||
<option value="4">5</option>
|
||||
<option value="5">7</option>
|
||||
<option value="6">8</option>
|
||||
<option value="7">9</option>
|
||||
<option value="8">10</option>
|
||||
<option value="9">11</option>
|
||||
<option value="10">12</option>
|
||||
<option value="11">13</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="px-2">
|
||||
<label class="form-check-label fs-6 text-dark" for="HandleSashLabel">Handle</label>
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="Dimension">Dimension</span>
|
||||
<input type="number" class="form-control" aria-label="DimensionSash" @bind="@sash.dDimension">
|
||||
</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="Handle" @bind="@sash.bHasHandle">
|
||||
</div>
|
||||
<div class="px-2">
|
||||
<label class="form-check-label fs-6 text-dark" for="HandleSashLabel">Handle</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<div class="border mb-2">
|
||||
@* <div class="row">
|
||||
@for(int i = 0; i < item.SashList.Count; i += 2)
|
||||
{
|
||||
<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 + 1)</h5>
|
||||
}
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="OpeningSash">Tipology</label>
|
||||
<select class="form-select" @bind="@item.SashList[i].SelOpeningTypeIndex">
|
||||
<option value="0">A battente sinistra</option>
|
||||
<option value="1">A battente destra</option>
|
||||
<option value="2">Ad anta-ribalta sinistra</option>
|
||||
<option value="3">Ad anta-ribalta destra</option>
|
||||
<option value="4">5</option>
|
||||
<option value="5">7</option>
|
||||
<option value="6">8</option>
|
||||
<option value="7">9</option>
|
||||
<option value="8">10</option>
|
||||
<option value="9">11</option>
|
||||
<option value="10">12</option>
|
||||
<option value="11">13</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="Dimension">Dimension</span>
|
||||
<input type="number" class="form-control" aria-label="DimensionSash" @bind="@item.SashList[i].dDimension">
|
||||
</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="Handle" @bind="@item.SashList[i].bHasHandle">
|
||||
</div>
|
||||
<div class="px-2">
|
||||
<label class="form-check-label fs-6 text-dark" for="HandleSashLabel">Handle</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if( i + 1 < item.SashList.Count)
|
||||
{
|
||||
<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)</h5>
|
||||
}
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="OpeningSash">Tipology</label>
|
||||
<select class="form-select" @bind="@item.SashList[i+1].SelOpeningTypeIndex">
|
||||
<option value="0">A battente sinistra</option>
|
||||
<option value="1">A battente destra</option>
|
||||
<option value="2">Ad anta-ribalta sinistra</option>
|
||||
<option value="3">Ad anta-ribalta destra</option>
|
||||
<option value="4">5</option>
|
||||
<option value="5">7</option>
|
||||
<option value="6">8</option>
|
||||
<option value="7">9</option>
|
||||
<option value="8">10</option>
|
||||
<option value="9">11</option>
|
||||
<option value="10">12</option>
|
||||
<option value="11">13</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="Dimension">Dimension</span>
|
||||
<input type="number" class="form-control" aria-label="DimensionSash" @bind="@item.SashList[i+1].dDimension">
|
||||
</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="Handle" @bind="@item.SashList[i+1].bHasHandle">
|
||||
</div>
|
||||
<div class="px-2">
|
||||
<label class="form-check-label fs-6 text-dark" for="HandleSashLabel">Handle</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div> *@
|
||||
<div class="border mb-2 w-50">
|
||||
<div class="card-body py-2">
|
||||
<h5 class="card-title">Sash joints</h5>
|
||||
@foreach (Joint joint in item.JointList)
|
||||
@@ -257,7 +361,7 @@
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="border mb-2">
|
||||
<div class="border mb-2 w-50">
|
||||
<div class="card-body py-2">
|
||||
<h5 class="card-title">Bottom rail</h5>
|
||||
<div class="input-group mb-2">
|
||||
@@ -267,9 +371,7 @@
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@* <button class="btn btn-sm btn-primary" title="Reset selezione" @onclick="DoReset"><i class="fa-solid fa-arrow-rotate-right"></i></button> *@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Reflection.Metadata;
|
||||
using System.Runtime.Intrinsics.X86;
|
||||
using System.Text.Json.Serialization;
|
||||
using WebWindowConfigurator.DTO;
|
||||
using WebWindowConfigurator.Json;
|
||||
using static WebWindowConfigurator.Json.WindowConst;
|
||||
@@ -24,12 +21,7 @@ namespace WebWindowConfigurator
|
||||
public EventCallback<TemplateSelectDTO> EC_OnSelectedTemplate { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<string> EC_OnUpdate { get; set; }
|
||||
|
||||
public List<Fill> FillList
|
||||
{
|
||||
get => m_FillList;
|
||||
}
|
||||
public EventCallback<Dictionary<string,string>> EC_OnUpdate { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public Template IN_SelTemplate
|
||||
@@ -110,7 +102,6 @@ namespace WebWindowConfigurator
|
||||
set => m_Frame = value;
|
||||
}
|
||||
|
||||
protected string m_CurrJwd { get; set; }
|
||||
protected string m_SelSVG { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
@@ -130,14 +121,18 @@ namespace WebWindowConfigurator
|
||||
{
|
||||
get => m_SashList;
|
||||
}
|
||||
|
||||
protected TemplateSelectDTO? SelTemplateDTO { get; set; } = null;
|
||||
|
||||
protected List<Split> SplitList
|
||||
{
|
||||
get => m_SplitList;
|
||||
}
|
||||
|
||||
protected List<Fill> FillList
|
||||
{
|
||||
get => m_FillList;
|
||||
}
|
||||
|
||||
protected TemplateSelectDTO? SelTemplateDTO { get; set; } = null;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
@@ -149,8 +144,14 @@ namespace WebWindowConfigurator
|
||||
|
||||
protected async Task DoPreviewSvg()
|
||||
{
|
||||
var CurrJwd = JsonConvert.SerializeObject(m_CurrWindow.Serialize(), Formatting.Indented);
|
||||
await EC_OnUpdate.InvokeAsync(CurrJwd);
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
var CurrJwd = JsonConvert.SerializeObject(m_CurrWindow.Serialize(), Formatting.Indented);
|
||||
Dictionary<string, string> Args = new Dictionary<string, string>();
|
||||
Args.Add("Jwd", CurrJwd);
|
||||
Args.Add("Mode", 1.ToString());
|
||||
await EC_OnUpdate.InvokeAsync(Args);
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task DoSave()
|
||||
@@ -213,15 +214,13 @@ namespace WebWindowConfigurator
|
||||
|
||||
private CompileStep currStep = CompileStep.Template;
|
||||
|
||||
private List<Fill> m_FillList = new List<Fill>();
|
||||
|
||||
private Frame m_Frame;
|
||||
|
||||
private List<Sash> m_SashList = new List<Sash>();
|
||||
|
||||
private List<Split> m_SplitList = new List<Split>();
|
||||
|
||||
private int counter = 0;
|
||||
private List<Fill> m_FillList = new List<Fill>();
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
@@ -242,11 +241,10 @@ namespace WebWindowConfigurator
|
||||
|
||||
private void M_CurrWindow_OnPreview(object? sender, OnPreviewEventArgs e)
|
||||
{
|
||||
EC_OnUpdate.InvokeAsync(e.sJwd);
|
||||
#if false
|
||||
var CurrJwd = JsonConvert.SerializeObject(m_CurrWindow.Serialize(), Formatting.Indented);
|
||||
EC_OnUpdate.InvokeAsync(CurrJwd);
|
||||
#endif
|
||||
Dictionary<string, string> Args = new Dictionary<string, string>();
|
||||
Args.Add("Jwd", e.sJwd);
|
||||
Args.Add("Mode", 1.ToString());
|
||||
EC_OnUpdate.InvokeAsync(Args);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -259,6 +257,10 @@ namespace WebWindowConfigurator
|
||||
return testStep.Equals(currStep) ? "nav-link active fw-bold" : "nav-link text-secondary";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calcola larghezza
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private string mainCss()
|
||||
{
|
||||
return currStep == CompileStep.Template ? "col-12" : "col-6";
|
||||
|
||||
@@ -367,7 +367,7 @@ namespace WebWindowConfigurator
|
||||
}
|
||||
}
|
||||
// aggiungo Joint
|
||||
int nJointQty = 4;
|
||||
//int nJointQty = 4;
|
||||
switch (Value)
|
||||
{
|
||||
case Shapes.RECTANGLE:
|
||||
@@ -902,7 +902,7 @@ namespace WebWindowConfigurator
|
||||
}
|
||||
}
|
||||
|
||||
private Hardware m_SelHardware;
|
||||
//private Hardware m_SelHardware;
|
||||
//public Hardware SelHardware
|
||||
//{
|
||||
// get
|
||||
@@ -1924,6 +1924,7 @@ namespace WebWindowConfigurator
|
||||
if (m_Parent.bIsPercentage)
|
||||
{
|
||||
int nIndex = RelativeDimList.IndexOf(this);
|
||||
// se diminuisce dimensione
|
||||
if (value < m_dDimension)
|
||||
{
|
||||
if (nIndex < RelativeDimList.Count - 1)
|
||||
@@ -1936,9 +1937,11 @@ namespace WebWindowConfigurator
|
||||
return;
|
||||
}
|
||||
}
|
||||
// se aumenta dimensione
|
||||
else
|
||||
{
|
||||
double dRes = value;
|
||||
// se non ultima anta
|
||||
if (nIndex < RelativeDimList.Count - 1)
|
||||
{
|
||||
for (var nInd = 0; nInd <= nIndex - 1; nInd++)
|
||||
@@ -1947,13 +1950,21 @@ namespace WebWindowConfigurator
|
||||
for (var Ind = nIndex + 1; Ind <= RelativeDimList.Count - 1; Ind++)
|
||||
RelativeDimList[Ind].SetDimension(dRes);
|
||||
}
|
||||
// se ultima anta
|
||||
else if (RelativeDimList.Count > 1)
|
||||
{
|
||||
for (var Ind = nIndex + 1; Ind <= RelativeDimList.Count - 1; Ind++)
|
||||
dRes += RelativeDimList[Ind].dDimension;
|
||||
dRes = (100 - dRes) / (nIndex - 1);
|
||||
for (var nInd = 0; nInd <= nIndex - 1; nInd++)
|
||||
RelativeDimList[nInd].SetDimension(dRes);
|
||||
if (RelativeDimList.Count > 2)
|
||||
{
|
||||
for (var Ind = 0; Ind <= nIndex - 2; Ind++)
|
||||
dRes += RelativeDimList[Ind].dDimension;
|
||||
}
|
||||
|
||||
//for (var Ind = nIndex + 1; Ind <= RelativeDimList.Count - 1; Ind++)
|
||||
// dRes += RelativeDimList[Ind].dDimension;
|
||||
dRes = (100 - dRes);
|
||||
RelativeDimList[nIndex - 1].SetDimension(dRes);
|
||||
//for (var nInd = 0; nInd <= nIndex - 1; nInd++)
|
||||
// RelativeDimList[nInd].SetDimension(dRes);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2125,11 +2136,20 @@ namespace WebWindowConfigurator
|
||||
}
|
||||
else if (RelativeDimList.Count > 1)
|
||||
{
|
||||
for (var Ind = nIndex + 1; Ind <= RelativeDimList.Count - 1; Ind++)
|
||||
dRes += RelativeDimList[Ind].dDimension;
|
||||
dRes = (100 - dRes) / (nIndex - 1);
|
||||
for (var nInd = 0; nInd <= nIndex - 1; nInd++)
|
||||
RelativeDimList[nInd].SetDimension(dRes);
|
||||
if (RelativeDimList.Count > 2)
|
||||
{
|
||||
for (var Ind = 0; Ind <= nIndex - 2; Ind++)
|
||||
dRes += RelativeDimList[Ind].dDimension;
|
||||
}
|
||||
dRes = (100 - dRes);
|
||||
RelativeDimList[nIndex - 1].SetDimension(dRes);
|
||||
//for (var nInd = 0; nInd <= nIndex - 1; nInd++)
|
||||
// RelativeDimList[nInd].SetDimension(dRes);
|
||||
//for (var Ind = nIndex + 1; Ind <= RelativeDimList.Count - 1; Ind++)
|
||||
// dRes += RelativeDimList[Ind].dDimension;
|
||||
//dRes = (100 - dRes) / (nIndex - 1);
|
||||
//for (var nInd = 0; nInd <= nIndex - 1; nInd++)
|
||||
// RelativeDimList[nInd].SetDimension(dRes);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -38,7 +38,10 @@ namespace WebWindowJWD
|
||||
m_SashList = new List<Sash>();
|
||||
m_SplitList = new List<Split>();
|
||||
SearchInAreaList(m_CurrWindow.AreaList[0]);
|
||||
EC_OnUpdate.InvokeAsync(m_CurrJwd);
|
||||
Dictionary<string,string> Args = new Dictionary<string,string>();
|
||||
Args.Add("Jwd", m_CurrJwd);
|
||||
Args.Add("Mode", 1.ToString());
|
||||
EC_OnUpdate.InvokeAsync(Args);
|
||||
}
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
@@ -54,7 +57,7 @@ namespace WebWindowJWD
|
||||
public EventCallback<bool> EC_OnClose { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<string> EC_OnUpdate { get; set; }
|
||||
public EventCallback<Dictionary<string,string>> EC_OnUpdate { get; set; }
|
||||
|
||||
public List<Fill> FillList
|
||||
{
|
||||
@@ -87,9 +90,8 @@ namespace WebWindowJWD
|
||||
|
||||
protected enum CompileStep
|
||||
{
|
||||
Template = 0,
|
||||
Frame = 1,
|
||||
Split,
|
||||
Frame = 0,
|
||||
Split = 1,
|
||||
Sash,
|
||||
Fill
|
||||
}
|
||||
@@ -141,8 +143,14 @@ namespace WebWindowJWD
|
||||
|
||||
protected async Task DoPreviewSvg()
|
||||
{
|
||||
var CurrJwd = JsonConvert.SerializeObject(m_CurrWindow.Serialize(), Formatting.Indented);
|
||||
await EC_OnUpdate.InvokeAsync(CurrJwd);
|
||||
if(m_CurrWindow != null)
|
||||
{
|
||||
var CurrJwd = JsonConvert.SerializeObject(m_CurrWindow.Serialize(), Formatting.Indented);
|
||||
Dictionary<string, string> Args = new Dictionary<string, string>();
|
||||
Args.Add("Jwd", CurrJwd);
|
||||
Args.Add("Mode", 1.ToString());
|
||||
await EC_OnUpdate.InvokeAsync(Args);
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task DoSave()
|
||||
@@ -223,13 +231,11 @@ namespace WebWindowJWD
|
||||
|
||||
private void M_CurrWindow_OnPreview(object? sender, OnPreviewEventArgs e)
|
||||
{
|
||||
EC_OnUpdate.InvokeAsync(e.sJwd);
|
||||
#if false
|
||||
var CurrJwd = JsonConvert.SerializeObject(m_CurrWindow.Serialize(), Formatting.Indented);
|
||||
EC_OnUpdate.InvokeAsync(CurrJwd);
|
||||
#endif
|
||||
Dictionary<string, string> Args = new Dictionary<string, string>();
|
||||
Args.Add("Jwd", e.sJwd);
|
||||
Args.Add("Mode", 1.ToString());
|
||||
EC_OnUpdate.InvokeAsync(Args);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calcola il css del tab selezionato
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user