- indentata stringa di output
- creati oggetti Window, Area e Frame - modificata grafica di visualizzazione dimensioni
This commit is contained in:
@@ -10,7 +10,7 @@ Welcome to your new app.
|
||||
|
||||
<WebWindowMaker EC_Update="SaveJWD" CurrJwd="@currJwd"></WebWindowMaker>
|
||||
|
||||
<b>@currJwd</b>
|
||||
<p>@JsonSer</p>
|
||||
|
||||
@code {
|
||||
protected string currJwd = "...";
|
||||
@@ -19,4 +19,10 @@ Welcome to your new app.
|
||||
{
|
||||
currJwd = newSerial;
|
||||
}
|
||||
|
||||
|
||||
protected MarkupString JsonSer
|
||||
{
|
||||
get => (MarkupString)currJwd.Replace(Environment.NewLine, "<br/>").Replace(" ", " ");
|
||||
}
|
||||
}
|
||||
@@ -122,6 +122,17 @@ namespace WebWindowConfigurator.Json
|
||||
EXT_DIMENSION = 2049
|
||||
}
|
||||
|
||||
//LUA
|
||||
public enum LuaShapes {
|
||||
RECT = 1,
|
||||
CHAMFER_SIDE = 2,
|
||||
CHAMFER = 3,
|
||||
ROUND_ARC = 4,
|
||||
SEGMENTAL_ARC = 5,
|
||||
POINTED_ARC = 6,
|
||||
TRIANGLE = 7
|
||||
}
|
||||
|
||||
public struct Point3d
|
||||
{
|
||||
public double x;
|
||||
|
||||
@@ -6,14 +6,18 @@
|
||||
<i>questo ci serve come segnaposto x generare il componente di disegno delle finestre</i>
|
||||
</div>
|
||||
<div>
|
||||
<div class="input-group mb-3 w-25">
|
||||
<span class="input-group-text" id="basic-addon1">Altezza</span>
|
||||
<input type="number" class="form-control" placeholder="1800" aria-label="Height" @bind="@CurrWindow.Altezza">
|
||||
<span class="input-group-text">mm</span>
|
||||
</div>
|
||||
<div class="input-group mb-3 w-25">
|
||||
|
||||
@foreach (FrameDimension dimension in m_frame.DimensionList)
|
||||
{
|
||||
<div class="input-group mb-3 w-25">
|
||||
<span class="input-group-text" id="basic-addon1">@dimension.nIndex</span>
|
||||
<span class="input-group-text" id="basic-addon1">@dimension.sName</span>
|
||||
<input type="number" class="form-control" placeholder="1800" aria-label="Height" @bind="@dimension.dValue">
|
||||
</div>
|
||||
}
|
||||
@* <div class="input-group mb-3 w-25">
|
||||
<span class="input-group-text" id="basic-addon1">Larghezza</span>
|
||||
<input type="number" class="form-control" placeholder="1200" aria-label="Width" @bind="@CurrWindow.Larghezza">
|
||||
<input type="number" class="form-control" placeholder="1200" aria-label="Width" @bind="@CurrWindow.Width">
|
||||
<span class="input-group-text">mm</span>
|
||||
</div>
|
||||
<div class="input-group mb-3 w-25">
|
||||
@@ -28,7 +32,7 @@
|
||||
<span class="input-group-text" id="basic-addon1">Altezza maniglia</span>
|
||||
<input type="text" class="form-control" placeholder="1000" aria-label="HeightHandle">
|
||||
<span class="input-group-text">mm</span>
|
||||
</div>
|
||||
</div> *@
|
||||
</div>
|
||||
<button class="btn btn-lg btn-primary" @onclick="DoSave">Save</button>
|
||||
<button class="btn btn-lg btn-primary" @onclick="DoClose">Close</button>
|
||||
|
||||
@@ -30,28 +30,35 @@ namespace WebWindowConfigurator
|
||||
|
||||
protected async Task DoSave()
|
||||
{
|
||||
var CurrentWindow = new JsonWindow("Profilo68");
|
||||
var Frame = new JsonFrame(CurrWindow.Forma, false, 0);
|
||||
Frame.DimensionList.Add(new JsonFrameDimension(1, "Larghezza", CurrWindow.Larghezza));
|
||||
Frame.DimensionList.Add(new JsonFrameDimension(1, "Altezza", CurrWindow.Altezza));
|
||||
Frame.AreaList.Add(new JsonSash(true, WindowConst.SashTypes.ACTIVE, ""));
|
||||
CurrentWindow.AreaList.Add(Frame);
|
||||
//var CurrentWindow = new JsonWindow("Profilo68");
|
||||
//var Frame = new JsonFrame(CurrWindow., false, 0);
|
||||
//Frame.DimensionList.Add(new JsonFrameDimension(1, "Larghezza", CurrWindow.Height));
|
||||
//Frame.DimensionList.Add(new JsonFrameDimension(1, "Altezza", CurrWindow.Width));
|
||||
//Frame.AreaList.Add(new JsonSash(true, WindowConst.SashTypes.ACTIVE, ""));
|
||||
//CurrentWindow.AreaList.Add(Frame);
|
||||
|
||||
//CurrJwd = @"prova";
|
||||
CurrJwd = JsonConvert.SerializeObject(CurrentWindow, Formatting.Indented);
|
||||
CurrJwd = JsonConvert.SerializeObject(m_CurrWindow.Serialize(), Formatting.Indented);
|
||||
await EC_Update.InvokeAsync(CurrJwd);
|
||||
}
|
||||
|
||||
public class WindowDto
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
public double Altezza { get; set; } = 1200;
|
||||
public double Larghezza { get; set; } = 800;
|
||||
|
||||
public WindowConst.Shapes Forma { get; set; } = WindowConst.Shapes.RECTANGLE;
|
||||
//base.OnInitialized();
|
||||
m_CurrWindow = new Window();
|
||||
Frame NewFrame = (Frame)Frame.CreateFrame(m_CurrWindow);
|
||||
m_CurrWindow.AreaList.Add(NewFrame);
|
||||
m_SelArea = NewFrame;
|
||||
}
|
||||
|
||||
protected WindowDto CurrWindow { get; set; } = new WindowDto();
|
||||
private Window m_CurrWindow { get; set; } = new Window();
|
||||
|
||||
public Area m_SelArea { get; set; } = null!;
|
||||
|
||||
protected Frame m_frame
|
||||
{
|
||||
get => (Frame)m_SelArea;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user