56 lines
1.4 KiB
C#
56 lines
1.4 KiB
C#
using Microsoft.AspNetCore.Components;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Xml;
|
|
|
|
namespace WebAedificaConfigurator
|
|
{
|
|
public partial class WebAedificaMaker
|
|
{
|
|
string m_FilePath = "";
|
|
string m_sSvg = "";
|
|
|
|
[Parameter]
|
|
public EventCallback<Dictionary<string,string>> EC_OnSave { get; set; }
|
|
|
|
[Parameter]
|
|
public string CssSvg { get; set; } = "responsive-svg";
|
|
|
|
[Parameter]
|
|
public string LiveSVG
|
|
{
|
|
get => m_sSvg;
|
|
set => m_sSvg = value;
|
|
}
|
|
|
|
protected async Task DoSave()
|
|
{
|
|
Dictionary<string,string> Args = new Dictionary<string,string>();
|
|
Args.Add("FilePath", m_FilePath);
|
|
Args.Add("Mode", 1.ToString());
|
|
await EC_OnSave.InvokeAsync(Args);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Componente SVG da mostrare
|
|
/// </summary>
|
|
protected MarkupString outSvg
|
|
{
|
|
get
|
|
{
|
|
// aggiunta gestione classe svg per posizionamento con costraints
|
|
var newSvg = LiveSVG.Replace("<svg", $"<svg class=\"{CssSvg}\"");
|
|
return (MarkupString)newSvg;
|
|
}
|
|
}
|
|
|
|
private string mainCss
|
|
{
|
|
get => "col-6";
|
|
}
|
|
}
|
|
}
|