2cc76187f3
- creati oggetti Window, Area e Frame - modificata grafica di visualizzazione dimensioni
65 lines
1.9 KiB
C#
65 lines
1.9 KiB
C#
using Microsoft.AspNetCore.Components;
|
|
using Newtonsoft.Json;
|
|
using System.Runtime.Intrinsics.X86;
|
|
using System.Text.Json.Serialization;
|
|
using WebWindowConfigurator.Json;
|
|
|
|
namespace WebWindowConfigurator
|
|
{
|
|
public partial class WebWindowMaker
|
|
{
|
|
#region Public Properties
|
|
|
|
[Parameter]
|
|
public string CurrJwd { get; set; } = null!;
|
|
|
|
[Parameter]
|
|
public EventCallback<bool> EC_Close { get; set; }
|
|
|
|
[Parameter]
|
|
public EventCallback<string> EC_Update { get; set; }
|
|
|
|
#endregion Public Properties
|
|
|
|
#region Protected Methods
|
|
|
|
protected async Task DoClose()
|
|
{
|
|
await EC_Close.InvokeAsync(true);
|
|
}
|
|
|
|
protected async Task DoSave()
|
|
{
|
|
//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(m_CurrWindow.Serialize(), Formatting.Indented);
|
|
await EC_Update.InvokeAsync(CurrJwd);
|
|
}
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
//base.OnInitialized();
|
|
m_CurrWindow = new Window();
|
|
Frame NewFrame = (Frame)Frame.CreateFrame(m_CurrWindow);
|
|
m_CurrWindow.AreaList.Add(NewFrame);
|
|
m_SelArea = NewFrame;
|
|
}
|
|
|
|
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
|
|
}
|
|
} |