using Microsoft.AspNetCore.Components; using Newtonsoft.Json; using System.Reflection.Metadata; using System.Runtime.Intrinsics.X86; using System.Text.Json.Serialization; using WebWindowConfigurator.Json; using static WebWindowConfigurator.Json.WindowConst; namespace WebWindowConfigurator { public partial class WebWindowMaker { #region Public Properties protected enum CompileStep { Draft = 0, General = 1, Sash, Split, Fill } private CompileStep currStep = CompileStep.Draft; [Parameter] public string CurrJwd { get; set; } = null!; [Parameter] public EventCallback EC_Close { get; set; } [Parameter] public EventCallback 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); } private void AdvStep(CompileStep newStep) { currStep = newStep; //switch(newStep) //{ // case CompileStep.General: // { // break; // } //} } private Window m_CurrWindow { get; set; } = new Window(); public Area m_SelArea { get; set; } = null!; protected Frame m_frame { get => (Frame)m_CurrWindow.AreaList[0]; } [Parameter] public List