Merge branch 'release/AddNuget_01'
This commit is contained in:
+298
@@ -0,0 +1,298 @@
|
||||
variables:
|
||||
VERS_MAIN: '1.0'
|
||||
NEXUS_PATH: 'LUX'
|
||||
PROJ_PATH: ''
|
||||
NUM_REL: '0.1.2.3'
|
||||
NU_TYPE: 'Debug'
|
||||
APP_NAME: 'Test.UI'
|
||||
SOL_NAME: 'Test.UI'
|
||||
NUGET_PATH: 'C:\Tools\nuget.exe'
|
||||
DEST: 'install'
|
||||
|
||||
# nota: cer creazione rules: https://docs.gitlab.com/ee/ci/jobs/job_control.html#common-if-clauses-for-rules
|
||||
|
||||
# helper x fix pacchetti nuget da repo locale nexus.steamware.net
|
||||
.nuget-fix: &nuget-fix
|
||||
- |
|
||||
echo "esecuzione Nuget FIX steps"
|
||||
dotnet nuget list source
|
||||
$hasSource = dotnet nuget list source | Select-String -Pattern "Steamware Nexus Proxy"
|
||||
if (! [String]::IsNullOrWhiteSpace($hasSource)) {
|
||||
dotnet nuget remove source "`"Steamware Nexus Proxy`""
|
||||
}
|
||||
$hasSource = dotnet nuget list source | Select-String -Pattern "Steamware Nexus"
|
||||
if (! [String]::IsNullOrWhiteSpace($hasSource)) {
|
||||
dotnet nuget remove source "`"Steamware Nexus`""
|
||||
}
|
||||
$hasSource = dotnet nuget list source | Select-String -Pattern "nexus-proxy-v3"
|
||||
if (! [String]::IsNullOrWhiteSpace($hasSource)) {
|
||||
dotnet nuget remove source nexus-proxy-v3
|
||||
}
|
||||
$hasSource = dotnet nuget list source | Select-String -Pattern "nexus-hosted"
|
||||
if (! [String]::IsNullOrWhiteSpace($hasSource)) {
|
||||
dotnet nuget remove source nexus-hosted
|
||||
}
|
||||
$hasSource = dotnet nuget list source | Select-String -Pattern "Microsoft Visual Studio Offline Packages"
|
||||
if (! [String]::IsNullOrWhiteSpace($hasSource)) {
|
||||
dotnet nuget remove source 'Microsoft Visual Studio Offline Packages'
|
||||
}
|
||||
echo "Situazione sorgenti post remove:"
|
||||
dotnet nuget list source
|
||||
dotnet nuget add source https://nexus.steamware.net/repository/nuget-proxy-v3/index.json -n nexus-proxy-v3 -u nugetUser -p $NEXUS_PASSWD --store-password-in-clear-text
|
||||
dotnet nuget add source https://nexus.steamware.net/repository/nuget-hosted/ -n nexus-hosted -u nugetUser -p $NEXUS_PASSWD --store-password-in-clear-text
|
||||
$hasSource = dotnet nuget list source
|
||||
echo "Situazione sorgenti FINALE:"
|
||||
dotnet nuget list source
|
||||
|
||||
|
||||
## helper x fix appsettings config nei casi installer / office
|
||||
#.appsettings-fix: &appsettings-fix
|
||||
# - |
|
||||
# echo "esecuzione FIX appsettings.json"
|
||||
# $srcFile="$env:APP_NAME/appsettings.Production-install.json"
|
||||
# $dstFile="$env:APP_NAME/appsettings.Production.json"
|
||||
# if (($env:DEST -ne 'install')) {
|
||||
# $srcFile="$env:APP_NAME/appsettings.Production-office.json"
|
||||
# }
|
||||
# echo "Copy-Item -Path $srcFile -Destination $dstFile -force"
|
||||
# Copy-Item -Path $srcFile -Destination $dstFile -force
|
||||
# echo "Completata copia file appsettings.json corretto"
|
||||
|
||||
# helper creazione hash files x IIS
|
||||
.hashBuild: &hashBuild
|
||||
- |
|
||||
$Target = $env:APP_NAME + "\bin\publish\" + $env:APP_NAME + ".zip"
|
||||
$MD5 = Get-FileHash $Target -Algorithm MD5
|
||||
$SHA1 = Get-FileHash $Target -Algorithm SHA1
|
||||
New-Item $Target".md5"
|
||||
New-Item $Target".sha1"
|
||||
$MD5.Hash | Set-Content -Path $Target".md5"
|
||||
$SHA1.Hash | Set-Content -Path $Target".sha1"
|
||||
|
||||
echo "Created HASH files for $Target"
|
||||
|
||||
# helper x send su NEXUS x pack
|
||||
.nexusUpload: &nexusUpload
|
||||
- |
|
||||
Set-Alias mCurl C:\Windows\system32\curl.exe
|
||||
$fileVers = $env:APP_NAME + "\Resources\VersNum.txt"
|
||||
$VersNumb = Get-Content $fileVers
|
||||
echo "Curr Version: $VersNumb"
|
||||
if($CI_COMMIT_BRANCH -eq "master")
|
||||
{
|
||||
$version = "stable"
|
||||
}
|
||||
else
|
||||
{
|
||||
$version = "unstable"
|
||||
}
|
||||
$File2Send = Get-ChildItem($env:APP_NAME + "\bin\publish\*")
|
||||
ForEach ($File in $File2Send) {
|
||||
$FileName = Split-Path $File -leaf
|
||||
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/$FileName
|
||||
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/ARCHIVE/$VersNumb/$FileName
|
||||
}
|
||||
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file "$env:APP_NAME\Resources\manifest.xml" https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/manifest.xml
|
||||
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file "$env:APP_NAME\Resources\ChangeLog.html" https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/ChangeLog.html
|
||||
|
||||
# helper x fix version number
|
||||
.version-fix: &version-fix
|
||||
- |
|
||||
$env:NEW_REL = $env:VERS_MAIN+"."+(get-date -format yyMM)+"."+(get-date -format ddHH)
|
||||
$env:NUM_REL = $env:VERS_MAIN+"."+(get-date -format yyMM)+"."+(get-date -format dHH)
|
||||
$env:NUM_DEB = $env:VERS_MAIN+"."+(get-date -format yyMM)+"-beta."+(get-date -format dHH)
|
||||
# display versioni generate
|
||||
$resoconto = "Effettuato fix file VersGen | release v: " + $env:NUM_REL + " | debug v: " + $env:NUM_DEB;
|
||||
Write-Output $resoconto;
|
||||
echo "Replace completati"
|
||||
|
||||
# helper x fix nuspec file: se debug aggiunge -beta nel blocco 3 del SemVer
|
||||
.nuspec-fix: &nuspec-fix
|
||||
- |
|
||||
echo "Modifica dati versione pacchetto nuget"
|
||||
$fileNameRel = "$env:APP_NAME/$env:APP_NAME.csproj";
|
||||
$fileContent = Get-Content $fileNameRel -Raw;
|
||||
$pattern = '(?i)<Version>\s*(.*?)\s*</Version>'
|
||||
$vers = if ($fileContent -match $pattern) { $matches[1] } else { $null }
|
||||
echo "Versione corrente: $vers | NugetType: $env:NU_TYPE"
|
||||
if ($env:NU_TYPE -eq "Debug")
|
||||
{
|
||||
$env:NUM_REL = $vers -replace '^(\d+)\.(\d+)\.(\d+)\.(\d+)$', '$1.$2.$3-beta.$4'
|
||||
}
|
||||
elseif($env:NU_TYPE -eq "Release")
|
||||
{
|
||||
$env:NUM_REL = $vers
|
||||
}
|
||||
echo "Versione calcolata: $env:NUM_REL"
|
||||
$findVers = "<Version>(.|\n)*?</Version>";
|
||||
$replVers = "<Version>" + $env:NUM_REL + "</Version>";
|
||||
$newContent = $fileContent -replace $findVers, $replVers;
|
||||
Set-Content -Path $fileNameRel -Value $newContent;
|
||||
echo "Modifica dati file progetto x nuspec completata su file $fileNameRel"
|
||||
|
||||
# Stages previsti
|
||||
stages:
|
||||
- build
|
||||
- deploy
|
||||
# - installer
|
||||
# - release
|
||||
|
||||
# --------------------------------
|
||||
# BUILD
|
||||
# --------------------------------
|
||||
Test.UI:build:
|
||||
stage: build
|
||||
tags:
|
||||
- win
|
||||
variables:
|
||||
APP_NAME: Test.UI
|
||||
SOL_NAME: Test.UI
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == 'develop'
|
||||
- if: $CI_COMMIT_BRANCH == 'main'
|
||||
- if: $CI_COMMIT_BRANCH =~ /^feature\/Test.UI.+/
|
||||
when: always
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
- dotnet restore "$env:SOL_NAME.sln"
|
||||
script:
|
||||
- echo $CI_COMMIT_BRANCH
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
|
||||
# --------------------------------
|
||||
# DEPLOY develop (IIS01 + beta nuget)
|
||||
# --------------------------------
|
||||
Test.UI:IIS01:deploy:
|
||||
stage: deploy
|
||||
tags:
|
||||
- win
|
||||
variables:
|
||||
APP_NAME: Test.UI
|
||||
SOL_NAME: Test.UI
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
- dotnet restore "$env:SOL_NAME.sln"
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == 'develop'
|
||||
- if: $CI_COMMIT_BRANCH =~ /^feature\/Test.UI.+/
|
||||
when: always
|
||||
needs: ["Test.UI:build"]
|
||||
script:
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
WebWindowConfigurator:SDK:deploy:
|
||||
stage: deploy
|
||||
tags:
|
||||
- win
|
||||
variables:
|
||||
APP_NAME: WebWindowConfigurator
|
||||
SOL_NAME: Test.UI
|
||||
NU_TYPE: Debug
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
- dotnet restore "$env:SOL_NAME.sln"
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == 'develop'
|
||||
- if: $CI_COMMIT_BRANCH =~ /^feature\/Test.UI.+/
|
||||
when: always
|
||||
needs: ["Test.UI:build"]
|
||||
script:
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- *nuspec-fix
|
||||
- dotnet pack -p:Configuration=Debug -p:verbosity=quiet -p:PackageID=Egw.Lux.$env:APP_NAME --output $env:APP_NAME/bin/ $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- '& "$env:NUGET_PATH" setapikey $NUGET_API_KEY -source http://nexus.steamware.net/repository/nuget-hosted'
|
||||
- '& "$env:NUGET_PATH" push $env:APP_NAME/bin/Egw.Lux.$env:APP_NAME.$env:NUM_REL.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
|
||||
|
||||
# # --------------------------------
|
||||
# # DEPLOY master (IIS03/IIS04)
|
||||
# # --------------------------------
|
||||
# Test.UI:IIS03:deploy:
|
||||
# stage: deploy
|
||||
# tags:
|
||||
# - win
|
||||
# variables:
|
||||
# APP_NAME: Test.UI
|
||||
# SOL_NAME: Test.UI
|
||||
# before_script:
|
||||
# - *nuget-fix
|
||||
# - dotnet restore "$env:SOL_NAME.sln"
|
||||
# rules:
|
||||
# - if: $CI_COMMIT_BRANCH == 'main'
|
||||
# needs: ["Test.UI:build"]
|
||||
# script:
|
||||
# - dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
# - dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
# - dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
# # --------------------------------
|
||||
# # INSTALLER (develop/master)
|
||||
# # --------------------------------
|
||||
# Test.UI:installer:
|
||||
# stage: installer
|
||||
# tags:
|
||||
# - win
|
||||
# variables:
|
||||
# APP_NAME: Test.UI
|
||||
# SOL_NAME: Test.UI
|
||||
# NEXUS_PATH: MP-LAND
|
||||
# before_script:
|
||||
# - *nuget-fix
|
||||
# - dotnet restore "$env:SOL_NAME.sln"
|
||||
# rules:
|
||||
# - if: $CI_COMMIT_BRANCH == 'main'
|
||||
# - if: $CI_COMMIT_BRANCH == 'develop'
|
||||
# needs: ["Test.UI:build"]
|
||||
# script:
|
||||
# - dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
# - dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release $env:APP_NAME/$env:APP_NAME.csproj -o:publish -p:verbosity=quiet
|
||||
# # qui il deploy su nexus...
|
||||
# - *hashBuild
|
||||
# - *nexusUpload
|
||||
|
||||
|
||||
# --------------------------------
|
||||
# RELEASE (tags only + sdk)
|
||||
# --------------------------------
|
||||
# Test.UI:release:
|
||||
# stage: release
|
||||
# tags:
|
||||
# - win
|
||||
# variables:
|
||||
# APP_NAME: Test.UI
|
||||
# SOL_NAME: Test.UI
|
||||
# NEXUS_PATH: MP-LAND
|
||||
# before_script:
|
||||
# - *nuget-fix
|
||||
# - dotnet restore "$env:SOL_NAME.sln"
|
||||
# rules:
|
||||
# - if: $CI_COMMIT_TAG
|
||||
# needs: ["Test.UI:build"]
|
||||
# artifacts:
|
||||
# paths:
|
||||
# - publish/
|
||||
# script:
|
||||
# - dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
# - dotnet publish -c Release -o ./publish $env:APP_NAME/$env:APP_NAME.csproj -p:verbosity=quiet
|
||||
|
||||
WebWindowConfigurator:SDK:release:
|
||||
stage: release
|
||||
tags:
|
||||
- win
|
||||
variables:
|
||||
APP_NAME: WebWindowConfigurator
|
||||
SOL_NAME: Test.UI
|
||||
NU_TYPE: Release
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
- dotnet restore "$env:SOL_NAME.sln"
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == 'main'
|
||||
needs: ["Test.UI:build"]
|
||||
script:
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- *nuspec-fix
|
||||
- dotnet pack -p:Configuration=Debug -p:verbosity=quiet -p:PackageID=Egw.Lux.$env:APP_NAME --output $env:APP_NAME/bin/ $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- '& "$env:NUGET_PATH" setapikey $NUGET_API_KEY -source http://nexus.steamware.net/repository/nuget-hosted'
|
||||
- '& "$env:NUGET_PATH" push $env:APP_NAME/bin/Egw.Lux.$env:APP_NAME.$env:NUM_REL.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
|
||||
@@ -0,0 +1,19 @@
|
||||
@page "/counter"
|
||||
@rendermode InteractiveAuto
|
||||
|
||||
<PageTitle>Counter</PageTitle>
|
||||
|
||||
<h1>Counter</h1>
|
||||
|
||||
<p role="status">Current count: @currentCount</p>
|
||||
|
||||
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
|
||||
|
||||
@code {
|
||||
private int currentCount = 0;
|
||||
|
||||
private void IncrementCount()
|
||||
{
|
||||
currentCount++;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
||||
|
||||
var builder = WebAssemblyHostBuilder.CreateDefault(args);
|
||||
|
||||
await builder.Build().RunAsync();
|
||||
@@ -0,0 +1,15 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile>
|
||||
<StaticWebAssetProjectMode>Default</StaticWebAssetProjectMode>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.17" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,9 @@
|
||||
@using System.Net.Http
|
||||
@using System.Net.Http.Json
|
||||
@using Microsoft.AspNetCore.Components.Forms
|
||||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
@using static Microsoft.AspNetCore.Components.Web.RenderMode
|
||||
@using Microsoft.AspNetCore.Components.Web.Virtualization
|
||||
@using Microsoft.JSInterop
|
||||
@using Test.UI.Client
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.14.36203.30
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.UI", "Test.UI\Test.UI.csproj", "{8F1D6298-C1E6-44E6-82BD-4128AE17C0C7}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.UI.Client", "Test.UI.Client\Test.UI.Client.csproj", "{11C69377-47CD-4A5F-82A5-34D9A246C2DC}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebWindowConfigurator", "WebWindowConfigurator\WebWindowConfigurator.csproj", "{C7BED1A5-5B6B-4B3C-8802-D913A026D1E2}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebAedificaConfigurator", "WebAedificaConfigurator\WebAedificaConfigurator.csproj", "{BD1F43E8-BE5F-469E-9552-C98CA8639A06}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{8F1D6298-C1E6-44E6-82BD-4128AE17C0C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8F1D6298-C1E6-44E6-82BD-4128AE17C0C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8F1D6298-C1E6-44E6-82BD-4128AE17C0C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8F1D6298-C1E6-44E6-82BD-4128AE17C0C7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{11C69377-47CD-4A5F-82A5-34D9A246C2DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{11C69377-47CD-4A5F-82A5-34D9A246C2DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{11C69377-47CD-4A5F-82A5-34D9A246C2DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{11C69377-47CD-4A5F-82A5-34D9A246C2DC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C7BED1A5-5B6B-4B3C-8802-D913A026D1E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C7BED1A5-5B6B-4B3C-8802-D913A026D1E2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C7BED1A5-5B6B-4B3C-8802-D913A026D1E2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C7BED1A5-5B6B-4B3C-8802-D913A026D1E2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{BD1F43E8-BE5F-469E-9552-C98CA8639A06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BD1F43E8-BE5F-469E-9552-C98CA8639A06}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BD1F43E8-BE5F-469E-9552-C98CA8639A06}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BD1F43E8-BE5F-469E-9552-C98CA8639A06}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {9B0BA38B-EDFB-4B71-A910-576985C89AC6}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"version": 1,
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"dotnet-ef": {
|
||||
"version": "9.0.7",
|
||||
"commands": [
|
||||
"dotnet-ef"
|
||||
],
|
||||
"rollForward": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<base href="/" />
|
||||
<link rel="stylesheet" href="bootstrap/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="app.css" />
|
||||
<link rel="stylesheet" href="Test.UI.styles.css" />
|
||||
<link rel="stylesheet" href="css/site.min.css" />
|
||||
<link rel="icon" type="image/png" href="favicon.png" />
|
||||
<HeadOutlet />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<Routes />
|
||||
<script src="_framework/blazor.web.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,23 @@
|
||||
@inherits LayoutComponentBase
|
||||
|
||||
<div class="page">
|
||||
<div class="sidebar">
|
||||
<NavMenu />
|
||||
</div>
|
||||
|
||||
<main>
|
||||
<div class="top-row px-4">
|
||||
<a href="https://learn.microsoft.com/aspnet/core/" target="_blank">About</a>
|
||||
</div>
|
||||
|
||||
<article class="content px-4">
|
||||
@Body
|
||||
</article>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<div id="blazor-error-ui">
|
||||
An unhandled error has occurred.
|
||||
<a href="" class="reload">Reload</a>
|
||||
<a class="dismiss">🗙</a>
|
||||
</div>
|
||||
@@ -0,0 +1,96 @@
|
||||
.page {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
main {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
|
||||
}
|
||||
|
||||
.top-row {
|
||||
background-color: #f7f7f7;
|
||||
border-bottom: 1px solid #d6d5d5;
|
||||
justify-content: flex-end;
|
||||
height: 3.5rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.top-row ::deep a, .top-row ::deep .btn-link {
|
||||
white-space: nowrap;
|
||||
margin-left: 1.5rem;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.top-row ::deep a:hover, .top-row ::deep .btn-link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.top-row ::deep a:first-child {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
@media (max-width: 640.98px) {
|
||||
.top-row {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.top-row ::deep a, .top-row ::deep .btn-link {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 641px) {
|
||||
.page {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: 250px;
|
||||
height: 100vh;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.top-row {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.top-row.auth ::deep a:first-child {
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.top-row, article {
|
||||
padding-left: 2rem !important;
|
||||
padding-right: 1.5rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
#blazor-error-ui {
|
||||
background: lightyellow;
|
||||
bottom: 0;
|
||||
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
|
||||
display: none;
|
||||
left: 0;
|
||||
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
#blazor-error-ui .dismiss {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
right: 0.75rem;
|
||||
top: 0.5rem;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<div class="top-row ps-3 navbar navbar-dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="">Test.UI</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="checkbox" title="Navigation menu" class="navbar-toggler" />
|
||||
|
||||
<div class="nav-scrollable" onclick="document.querySelector('.navbar-toggler').click()">
|
||||
<nav class="flex-column">
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
|
||||
<span class="bi bi-house-door-fill-nav-menu" aria-hidden="true"></span> Home
|
||||
</NavLink>
|
||||
</div>
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="TestComponent">
|
||||
<span class="bi bi-plus-square-fill-nav-menu" aria-hidden="true"></span> Test Compo + Serv
|
||||
</NavLink>
|
||||
</div>
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="Aedifica">
|
||||
<span class="bi bi-plus-square-fill-nav-menu" aria-hidden="true"></span> Aedifica
|
||||
</NavLink>
|
||||
</div>
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="counter">
|
||||
<span class="bi bi-plus-square-fill-nav-menu" aria-hidden="true"></span> Counter
|
||||
</NavLink>
|
||||
</div>
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="weather">
|
||||
<span class="bi bi-list-nested-nav-menu" aria-hidden="true"></span> Weather
|
||||
</NavLink>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
.navbar-toggler {
|
||||
appearance: none;
|
||||
cursor: pointer;
|
||||
width: 3.5rem;
|
||||
height: 2.5rem;
|
||||
color: white;
|
||||
position: absolute;
|
||||
top: 0.5rem;
|
||||
right: 1rem;
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.navbar-toggler:checked {
|
||||
background-color: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
.top-row {
|
||||
height: 3.5rem;
|
||||
background-color: rgba(0,0,0,0.4);
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.bi {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
margin-right: 0.75rem;
|
||||
top: -1px;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.bi-house-door-fill-nav-menu {
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-house-door-fill' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z'/%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
.bi-plus-square-fill-nav-menu {
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-plus-square-fill' viewBox='0 0 16 16'%3E%3Cpath d='M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm6.5 4.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3a.5.5 0 0 1 1 0z'/%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
.bi-list-nested-nav-menu {
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-list-nested' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4.5 11.5A.5.5 0 0 1 5 11h10a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 3 7h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 1 3h10a.5.5 0 0 1 0 1H1a.5.5 0 0 1-.5-.5z'/%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
font-size: 0.9rem;
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.nav-item:first-of-type {
|
||||
padding-top: 1rem;
|
||||
}
|
||||
|
||||
.nav-item:last-of-type {
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
|
||||
.nav-item ::deep .nav-link {
|
||||
color: #d7d7d7;
|
||||
background: none;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
height: 3rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
line-height: 3rem;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.nav-item ::deep a.active {
|
||||
background-color: rgba(255,255,255,0.37);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.nav-item ::deep .nav-link:hover {
|
||||
background-color: rgba(255,255,255,0.1);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.nav-scrollable {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.navbar-toggler:checked ~ .nav-scrollable {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@media (min-width: 641px) {
|
||||
.navbar-toggler {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.nav-scrollable {
|
||||
/* Never collapse the sidebar for wide screens */
|
||||
display: block;
|
||||
|
||||
/* Allow sidebar to scroll for tall menus */
|
||||
height: calc(100vh - 3.5rem);
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
@rendermode InteractiveServer
|
||||
@page "/Aedifica"
|
||||
|
||||
<PageTitle>Aedifica</PageTitle>
|
||||
|
||||
<WebAedificaMaker
|
||||
EC_OnSave="SaveText"
|
||||
LiveSVG="@currSvg">
|
||||
</WebAedificaMaker>
|
||||
|
||||
@* <p>@currText</p> *@
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
using EgwCoreLib.Lux.Core;
|
||||
using EgwCoreLib.Lux.Core.RestPayload;
|
||||
using EgwCoreLib.Lux.Data.Services;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Test.UI.Components.Pages
|
||||
{
|
||||
public partial class Aedifica : IDisposable
|
||||
{
|
||||
|
||||
private string subChannel = "";
|
||||
private string CalcUid = "Pizza";
|
||||
private string currSvg = "";
|
||||
private string apiUrl = "";
|
||||
private string calcTag = "";
|
||||
private string GenericBasePath = "";
|
||||
|
||||
[Inject]
|
||||
protected IConfiguration Config { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected DataLayerServices DLService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected ImageCacheService ICService { get; set; } = null!;
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
DLService.CalcDonePipe.EA_NewMessage -= CalcDonePipe_EA_NewMessage;
|
||||
}
|
||||
|
||||
protected MarkupString JsonSer
|
||||
{
|
||||
get => (MarkupString)currSvg.Replace(Environment.NewLine, "<br/>").Replace(" ", " ");
|
||||
}
|
||||
|
||||
protected Dictionary<string, string> m_CurrArgs = new Dictionary<string, string>();
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
ConfInit();
|
||||
DLService.CalcDonePipe.EA_NewMessage += CalcDonePipe_EA_NewMessage;
|
||||
//await ReloadData();
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
private void ConfInit()
|
||||
{
|
||||
apiUrl = Config.GetValue<string>("ServerConf:Prog.ApiUrl") ?? "";
|
||||
GenericBasePath = Config.GetValue<string>("ServerConf:GenericBaseUrl") ?? "";
|
||||
//imgTag = Config.GetValue<string>("ServerConf:ImageFileTag") ?? "";
|
||||
calcTag = Config.GetValue<string>("ServerConf:CalcTag") ?? "";
|
||||
subChannel = Config.GetValue<string>("ServerConf:SvgChannel") ?? "";
|
||||
}
|
||||
|
||||
private async Task SaveText(Dictionary<string, string> CurrArgs)
|
||||
{
|
||||
m_CurrArgs = CurrArgs;
|
||||
// chiamo la chiamata POST alla API, che manda la richiesta via REDIS
|
||||
if (m_CurrArgs != null)
|
||||
{
|
||||
CalcRequestDTO calcRequestDTO = new CalcRequestDTO();
|
||||
calcRequestDTO.EnvType = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.BEAM;
|
||||
calcRequestDTO.DictExec = m_CurrArgs;
|
||||
await ICService.CallRestPost($"{apiUrl}/{GenericBasePath}", $"{calcTag}/{CalcUid}", calcRequestDTO);
|
||||
}
|
||||
}
|
||||
|
||||
private async void CalcDonePipe_EA_NewMessage(object? sender, EventArgs e)
|
||||
{
|
||||
// aggiorno visualizzazione
|
||||
PubSubEventArgs currArgs = (PubSubEventArgs)e;
|
||||
// conversione on-the-fly SVG da mostrare
|
||||
if (!string.IsNullOrEmpty(currArgs.newMessage))
|
||||
{
|
||||
if (currArgs.msgUid.Equals($"{subChannel}:{CalcUid}"))
|
||||
{
|
||||
currSvg = currArgs.newMessage;
|
||||
}
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
@page "/Error"
|
||||
@using System.Diagnostics
|
||||
|
||||
<PageTitle>Error</PageTitle>
|
||||
|
||||
<h1 class="text-danger">Error.</h1>
|
||||
<h2 class="text-danger">An error occurred while processing your request.</h2>
|
||||
|
||||
@if (ShowRequestId)
|
||||
{
|
||||
<p>
|
||||
<strong>Request ID:</strong> <code>@RequestId</code>
|
||||
</p>
|
||||
}
|
||||
|
||||
<h3>Development Mode</h3>
|
||||
<p>
|
||||
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
|
||||
</p>
|
||||
<p>
|
||||
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
|
||||
It can result in displaying sensitive information from exceptions to end users.
|
||||
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
|
||||
and restarting the app.
|
||||
</p>
|
||||
|
||||
@code{
|
||||
[CascadingParameter]
|
||||
private HttpContext? HttpContext { get; set; }
|
||||
|
||||
private string? RequestId { get; set; }
|
||||
private bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||||
|
||||
protected override void OnInitialized() =>
|
||||
RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
@rendermode InteractiveServer
|
||||
@page "/"
|
||||
|
||||
<PageTitle>Home</PageTitle>
|
||||
|
||||
<WebWindowMaker IN_TemplateDTOList="@AvailTemplateList"
|
||||
IN_SelTemplate="@SelTemplate"
|
||||
EC_OnUpdate="SaveJWD"
|
||||
EC_OnSelectedTemplate="SetTemplate"
|
||||
LiveSVG="@currSvg">
|
||||
</WebWindowMaker>
|
||||
|
||||
<p>@JsonSer</p>
|
||||
@@ -0,0 +1,174 @@
|
||||
using EgwCoreLib.Lux.Core;
|
||||
using EgwCoreLib.Lux.Data.Services;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Newtonsoft.Json;
|
||||
using System.Security.AccessControl;
|
||||
using WebWindowConfigurator;
|
||||
using WebWindowConfigurator.DTO;
|
||||
|
||||
namespace Test.UI.Components.Pages
|
||||
{
|
||||
public partial class Home : IDisposable
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public Template SelTemplate { get; set; } = new Template(0, "---SELECT---", "", "");
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
DLService.CalcDonePipe.EA_NewMessage -= CalcDonePipe_EA_NewMessage;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
protected string currJwd = "...";
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected List<TemplateSelectDTO> AvailTemplateList { get; set; } = new List<TemplateSelectDTO>();
|
||||
|
||||
[Inject]
|
||||
protected IConfiguration Config { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected DataLayerServices DLService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected ImageCacheService ICService { get; set; } = null!;
|
||||
|
||||
protected MarkupString JsonSer
|
||||
{
|
||||
get => (MarkupString)currJwd.Replace(Environment.NewLine, "<br/>").Replace(" ", " ");
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
ConfInit();
|
||||
DLService.CalcDonePipe.EA_NewMessage += CalcDonePipe_EA_NewMessage;
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private string apiUrl = "";
|
||||
private string calcTag = "";
|
||||
private string cFile = "Data/Setup.json";
|
||||
private TemplateSelectDTO? currSel = null;
|
||||
private string currSvg = "";
|
||||
|
||||
private string imgBasePath = "";
|
||||
|
||||
private string imgTag = "";
|
||||
|
||||
private string subChannel = "";
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private string windowUid = "CurrWindow";
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// string answ = "";
|
||||
// if (currSel != null)
|
||||
// {
|
||||
// answ = currSel.SVGFileName.Replace(".svg", "");
|
||||
// }
|
||||
// return answ;
|
||||
// }
|
||||
//}
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async void CalcDonePipe_EA_NewMessage(object? sender, EventArgs e)
|
||||
{
|
||||
// aggiorno visualizzazione
|
||||
PubSubEventArgs currArgs = (PubSubEventArgs)e;
|
||||
// conversione on-the-fly SVG da mostrare
|
||||
if (!string.IsNullOrEmpty(currArgs.newMessage))
|
||||
{
|
||||
if (currArgs.msgUid.Equals($"{subChannel}:{windowUid}"))
|
||||
{
|
||||
currSvg = currArgs.newMessage;
|
||||
}
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
private void ConfInit()
|
||||
{
|
||||
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") ?? "";
|
||||
subChannel = Config.GetValue<string>("ServerConf:SvgChannel") ?? "";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rilettura dati
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private async Task ReloadData()
|
||||
{
|
||||
//return base.OnInitializedAsync();
|
||||
AvailTemplateList = new List<TemplateSelectDTO>();
|
||||
await Task.Delay(100);
|
||||
// brutale, da rivedere...
|
||||
if (File.Exists(cFile))
|
||||
{
|
||||
string rawVal = File.ReadAllText(cFile);
|
||||
var rawList = JsonConvert.DeserializeObject<List<TemplateSelectDTO>>(rawVal) ?? new List<TemplateSelectDTO>();
|
||||
|
||||
// calcolo URL immagini... DTO interno da rivedere?
|
||||
foreach (var item in rawList)
|
||||
{
|
||||
item.ImageUrl = ICService.ImageUrl($"{apiUrl}/{imgBasePath}", false, item.SVGFileName);
|
||||
//item.ImageUrl = ICService.ImageUrl(imgBasePath, false, item.SVGFileName);
|
||||
AvailTemplateList.Add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async Task SaveJWD(string newSerial)
|
||||
{
|
||||
currJwd = newSerial;
|
||||
// chiamo la chiamata POST alla API, che manda la richiesta via REDIS
|
||||
if (currSel != null)
|
||||
{
|
||||
await ICService.CallRestPost($"{apiUrl}/{imgBasePath}", $"{calcTag}/{windowUid}", currJwd);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetTemplate(TemplateSelectDTO selTemp)
|
||||
{
|
||||
string rawVal = "";
|
||||
currSel = selTemp;
|
||||
// brutale,d a rivedere...
|
||||
if (File.Exists(selTemp.JwdFileName))
|
||||
{
|
||||
rawVal = File.ReadAllText(selTemp.JwdFileName);
|
||||
}
|
||||
SelTemplate = new Template(selTemp.Index, selTemp.Description, selTemp.SVGFileName, rawVal);
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
@page "/TestComponent"
|
||||
@rendermode InteractiveServer
|
||||
|
||||
<PageTitle>TestComponent</PageTitle>
|
||||
|
||||
<WebWindowMaker IN_TemplateDTOList="@AvailTemplateList"
|
||||
IN_SelTemplate="@SelTemplate"
|
||||
EC_OnUpdate="SaveJWD"
|
||||
EC_OnSelectedTemplate="SetTemplate"
|
||||
LiveSVG="@currSvg">
|
||||
</WebWindowMaker>
|
||||
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
using EgwCoreLib.Lux.Core;
|
||||
using EgwCoreLib.Lux.Data.Services;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Newtonsoft.Json;
|
||||
using NLog;
|
||||
using WebWindowConfigurator;
|
||||
using WebWindowConfigurator.DTO;
|
||||
|
||||
namespace Test.UI.Components.Pages
|
||||
{
|
||||
public partial class TestComponent : IDisposable
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public Template SelTemplate { get; set; } = new Template(0, "---SELECT---", "", "");
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
DLService.CalcDonePipe.EA_NewMessage -= CalcDonePipe_EA_NewMessage;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
protected string currJwd = "...";
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected List<TemplateSelectDTO> AvailTemplateList { get; set; } = new List<TemplateSelectDTO>();
|
||||
|
||||
[Inject]
|
||||
protected IConfiguration Config { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected DataLayerServices DLService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected ImageCacheService ICService { get; set; } = null!;
|
||||
|
||||
protected MarkupString JsonSer
|
||||
{
|
||||
get => (MarkupString)currJwd.Replace(Environment.NewLine, "<br/>").Replace(" ", " ");
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
ConfInit();
|
||||
DLService.CalcDonePipe.EA_NewMessage += CalcDonePipe_EA_NewMessage;
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private string apiUrl = "";
|
||||
private string calcTag = "";
|
||||
private string cFile = "Data/Setup.json";
|
||||
private TemplateSelectDTO? currSel = null;
|
||||
private string currSvg = "";
|
||||
|
||||
private string imgBasePath = "";
|
||||
|
||||
private string imgTag = "";
|
||||
|
||||
private string subChannel = "";
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private string windowUid = "CurrWindow";
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// string answ = "";
|
||||
// if (currSel != null)
|
||||
// {
|
||||
// answ = currSel.SVGFileName.Replace(".svg", "");
|
||||
// }
|
||||
// return answ;
|
||||
// }
|
||||
//}
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async void CalcDonePipe_EA_NewMessage(object? sender, EventArgs e)
|
||||
{
|
||||
// aggiorno visualizzazione
|
||||
PubSubEventArgs currArgs = (PubSubEventArgs)e;
|
||||
// conversione on-the-fly SVG da mostrare
|
||||
if (!string.IsNullOrEmpty(currArgs.newMessage))
|
||||
{
|
||||
if (currArgs.msgUid.Equals($"{subChannel}:{windowUid}"))
|
||||
{
|
||||
currSvg = currArgs.newMessage;
|
||||
}
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
private void ConfInit()
|
||||
{
|
||||
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") ?? "";
|
||||
subChannel = Config.GetValue<string>("ServerConf:SvgChannel") ?? "";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rilettura dati
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private async Task ReloadData()
|
||||
{
|
||||
//return base.OnInitializedAsync();
|
||||
AvailTemplateList = new List<TemplateSelectDTO>();
|
||||
await Task.Delay(100);
|
||||
// brutale, da rivedere...
|
||||
if (File.Exists(cFile))
|
||||
{
|
||||
string rawVal = File.ReadAllText(cFile);
|
||||
var rawList = JsonConvert.DeserializeObject<List<TemplateSelectDTO>>(rawVal) ?? new List<TemplateSelectDTO>();
|
||||
|
||||
// calcolo URL immagini... DTO interno da rivedere?
|
||||
foreach (var item in rawList)
|
||||
{
|
||||
item.ImageUrl = ICService.ImageUrl($"{apiUrl}/{imgBasePath}", false, item.SVGFileName);
|
||||
AvailTemplateList.Add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async Task SaveJWD(string newSerial)
|
||||
{
|
||||
currJwd = newSerial;
|
||||
// chiamo la chiamata POST alla API, che manda la richiesta via REDIS
|
||||
if (currSel != null)
|
||||
{
|
||||
await ICService.CallRestPost($"{apiUrl}/{imgBasePath}", $"{calcTag}/{windowUid}", currJwd);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetTemplate(TemplateSelectDTO selTemp)
|
||||
{
|
||||
string rawVal = "";
|
||||
currSel = selTemp;
|
||||
// brutale,d a rivedere...
|
||||
if (File.Exists(selTemp.JwdFileName))
|
||||
{
|
||||
rawVal = File.ReadAllText(selTemp.JwdFileName);
|
||||
}
|
||||
SelTemplate = new Template(selTemp.Index, selTemp.Description, selTemp.SVGFileName, rawVal);
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
@page "/weather"
|
||||
@attribute [StreamRendering]
|
||||
|
||||
<PageTitle>Weather</PageTitle>
|
||||
|
||||
<h1>Weather</h1>
|
||||
|
||||
<p>This component demonstrates showing data.</p>
|
||||
|
||||
@if (forecasts == null)
|
||||
{
|
||||
<p><em>Loading...</em></p>
|
||||
}
|
||||
else
|
||||
{
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Temp. (C)</th>
|
||||
<th>Temp. (F)</th>
|
||||
<th>Summary</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var forecast in forecasts)
|
||||
{
|
||||
<tr>
|
||||
<td>@forecast.Date.ToShortDateString()</td>
|
||||
<td>@forecast.TemperatureC</td>
|
||||
<td>@forecast.TemperatureF</td>
|
||||
<td>@forecast.Summary</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
|
||||
@code {
|
||||
private WeatherForecast[]? forecasts;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
// Simulate asynchronous loading to demonstrate streaming rendering
|
||||
await Task.Delay(500);
|
||||
|
||||
var startDate = DateOnly.FromDateTime(DateTime.Now);
|
||||
var summaries = new[] { "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" };
|
||||
forecasts = Enumerable.Range(1, 5).Select(index => new WeatherForecast
|
||||
{
|
||||
Date = startDate.AddDays(index),
|
||||
TemperatureC = Random.Shared.Next(-20, 55),
|
||||
Summary = summaries[Random.Shared.Next(summaries.Length)]
|
||||
}).ToArray();
|
||||
}
|
||||
|
||||
private class WeatherForecast
|
||||
{
|
||||
public DateOnly Date { get; set; }
|
||||
public int TemperatureC { get; set; }
|
||||
public string? Summary { get; set; }
|
||||
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<Router AppAssembly="typeof(Program).Assembly" AdditionalAssemblies="new[] { typeof(Client._Imports).Assembly }">
|
||||
<Found Context="routeData">
|
||||
<RouteView RouteData="routeData" DefaultLayout="typeof(Layout.MainLayout)" />
|
||||
<FocusOnNavigate RouteData="routeData" Selector="h1" />
|
||||
</Found>
|
||||
</Router>
|
||||
@@ -0,0 +1,13 @@
|
||||
@using System.Net.Http
|
||||
@using System.Net.Http.Json
|
||||
@using Microsoft.AspNetCore.Components.Forms
|
||||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
@using static Microsoft.AspNetCore.Components.Web.RenderMode
|
||||
@using Microsoft.AspNetCore.Components.Web.Virtualization
|
||||
@using Microsoft.JSInterop
|
||||
@using Test.UI
|
||||
@using Test.UI.Client
|
||||
@using Test.UI.Components
|
||||
@using WebWindowConfigurator
|
||||
@using WebAedificaConfigurator
|
||||
@@ -0,0 +1,101 @@
|
||||
{
|
||||
"ProfilePath": "Profilo78",
|
||||
"AreaList": [
|
||||
{
|
||||
"Shape": "RECTANGLE",
|
||||
"DimensionList": [
|
||||
{
|
||||
"nIndex": 1,
|
||||
"sName": "Width",
|
||||
"dValue": 1200.0
|
||||
},
|
||||
{
|
||||
"nIndex": 2,
|
||||
"sName": "Height",
|
||||
"dValue": 1500.0
|
||||
}
|
||||
],
|
||||
"JointList": [
|
||||
{
|
||||
"nIndex": 1,
|
||||
"JointType": "FULL_V"
|
||||
},
|
||||
{
|
||||
"nIndex": 2,
|
||||
"JointType": "FULL_V"
|
||||
},
|
||||
{
|
||||
"nIndex": 3,
|
||||
"JointType": "FULL_V"
|
||||
},
|
||||
{
|
||||
"nIndex": 4,
|
||||
"JointType": "FULL_V"
|
||||
}
|
||||
],
|
||||
"BottomRail": false,
|
||||
"BottomRailQty": 0,
|
||||
"AreaList": [
|
||||
{
|
||||
"bIsSashVertical": true,
|
||||
"SashList": [
|
||||
{
|
||||
"OpeningType": "TURNONLY_LEFT",
|
||||
"bHasHandle": false,
|
||||
"dDimension": 50.0
|
||||
},
|
||||
{
|
||||
"OpeningType": "TILTTURN_RIGHT",
|
||||
"bHasHandle": true,
|
||||
"dDimension": 50.0
|
||||
}
|
||||
],
|
||||
"SashType": "NULL",
|
||||
"JointList": [
|
||||
{
|
||||
"nIndex": 1,
|
||||
"JointType": "FULL_V"
|
||||
},
|
||||
{
|
||||
"nIndex": 2,
|
||||
"JointType": "FULL_V"
|
||||
},
|
||||
{
|
||||
"nIndex": 3,
|
||||
"JointType": "FULL_V"
|
||||
},
|
||||
{
|
||||
"nIndex": 4,
|
||||
"JointType": "FULL_V"
|
||||
}
|
||||
],
|
||||
"Hardware": "000000",
|
||||
"AreaList": [
|
||||
{
|
||||
"AreaList": [
|
||||
{
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLITTED"
|
||||
},
|
||||
{
|
||||
"AreaList": [
|
||||
{
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLITTED"
|
||||
}
|
||||
],
|
||||
"AreaType": "SASH"
|
||||
}
|
||||
],
|
||||
"AreaType": "FRAME"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
{
|
||||
"ProfilePath": "Profilo78",
|
||||
"AreaList": [
|
||||
{
|
||||
"Shape": "RECTANGLE",
|
||||
"DimensionList": [
|
||||
{
|
||||
"nIndex": 1,
|
||||
"sName": "Width",
|
||||
"dValue": 800.0
|
||||
},
|
||||
{
|
||||
"nIndex": 2,
|
||||
"sName": "Height",
|
||||
"dValue": 1200.0
|
||||
}
|
||||
],
|
||||
"JointList": [
|
||||
{
|
||||
"nIndex": 1,
|
||||
"JointType": "FULL_H"
|
||||
},
|
||||
{
|
||||
"nIndex": 2,
|
||||
"JointType": "FULL_H"
|
||||
},
|
||||
{
|
||||
"nIndex": 3,
|
||||
"JointType": "FULL_H"
|
||||
},
|
||||
{
|
||||
"nIndex": 4,
|
||||
"JointType": "FULL_H"
|
||||
}
|
||||
],
|
||||
"BottomRail": false,
|
||||
"BottomRailQty": 0,
|
||||
"AreaList": [
|
||||
{
|
||||
"bIsSashVertical": true,
|
||||
"SashList": [
|
||||
{
|
||||
"OpeningType": "TILTTURN_LEFT",
|
||||
"bHasHandle": true,
|
||||
"dDimension": 100.0
|
||||
}
|
||||
],
|
||||
"SashType": "NULL",
|
||||
"JointList": [
|
||||
{
|
||||
"nIndex": 1,
|
||||
"JointType": "FULL_H"
|
||||
},
|
||||
{
|
||||
"nIndex": 2,
|
||||
"JointType": "FULL_H"
|
||||
},
|
||||
{
|
||||
"nIndex": 3,
|
||||
"JointType": "FULL_H"
|
||||
},
|
||||
{
|
||||
"nIndex": 4,
|
||||
"JointType": "FULL_H"
|
||||
}
|
||||
],
|
||||
"Hardware": "000000",
|
||||
"AreaList": [
|
||||
{
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
],
|
||||
"AreaType": "SASH"
|
||||
}
|
||||
],
|
||||
"AreaType": "FRAME"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
{
|
||||
"ProfilePath": "Profilo78",
|
||||
"AreaList": [
|
||||
{
|
||||
"Shape": "RECTANGLE",
|
||||
"DimensionList": [
|
||||
{
|
||||
"nIndex": 1,
|
||||
"sName": "Width",
|
||||
"dValue": 1500.0
|
||||
},
|
||||
{
|
||||
"nIndex": 2,
|
||||
"sName": "Height",
|
||||
"dValue": 2100.0
|
||||
}
|
||||
],
|
||||
"JointList": [
|
||||
{
|
||||
"nIndex": 1,
|
||||
"JointType": "FULL_H"
|
||||
},
|
||||
{
|
||||
"nIndex": 2,
|
||||
"JointType": "FULL_H"
|
||||
},
|
||||
{
|
||||
"nIndex": 3,
|
||||
"JointType": "FULL_H"
|
||||
},
|
||||
{
|
||||
"nIndex": 4,
|
||||
"JointType": "FULL_H"
|
||||
}
|
||||
],
|
||||
"BottomRail": false,
|
||||
"BottomRailQty": 0,
|
||||
"AreaList": [
|
||||
{
|
||||
"SplitShape": "HORIZONTAL",
|
||||
"SplitPositionList": [
|
||||
{
|
||||
"bIsRelative": true,
|
||||
"dDimension": 40.0
|
||||
},
|
||||
{
|
||||
"bIsRelative": true,
|
||||
"dDimension": 60.0
|
||||
}
|
||||
],
|
||||
"AreaList": [
|
||||
{
|
||||
"AreaList": [
|
||||
{
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLITTED"
|
||||
},
|
||||
{
|
||||
"AreaList": [
|
||||
{
|
||||
"bIsSashVertical": true,
|
||||
"SashList": [
|
||||
{
|
||||
"OpeningType": "TURNONLY_LEFT",
|
||||
"bHasHandle": false,
|
||||
"dDimension": 50.0
|
||||
},
|
||||
{
|
||||
"OpeningType": "TILTTURN_RIGHT",
|
||||
"bHasHandle": true,
|
||||
"dDimension": 50.0
|
||||
}
|
||||
],
|
||||
"SashType": "NULL",
|
||||
"JointList": [
|
||||
{
|
||||
"nIndex": 1,
|
||||
"JointType": "FULL_H"
|
||||
},
|
||||
{
|
||||
"nIndex": 2,
|
||||
"JointType": "FULL_H"
|
||||
},
|
||||
{
|
||||
"nIndex": 3,
|
||||
"JointType": "FULL_H"
|
||||
},
|
||||
{
|
||||
"nIndex": 4,
|
||||
"JointType": "FULL_H"
|
||||
}
|
||||
],
|
||||
"Hardware": "000000",
|
||||
"AreaList": [
|
||||
{
|
||||
"AreaList": [
|
||||
{
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLITTED"
|
||||
},
|
||||
{
|
||||
"AreaList": [
|
||||
{
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLITTED"
|
||||
}
|
||||
],
|
||||
"AreaType": "SASH"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLITTED"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLIT"
|
||||
}
|
||||
],
|
||||
"AreaType": "FRAME"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
{
|
||||
"ProfilePath": "Profilo78",
|
||||
"AreaList": [
|
||||
{
|
||||
"Shape": "RECTANGLE",
|
||||
"DimensionList": [
|
||||
{
|
||||
"nIndex": 1,
|
||||
"sName": "Width",
|
||||
"dValue": 1500.0
|
||||
},
|
||||
{
|
||||
"nIndex": 2,
|
||||
"sName": "Height",
|
||||
"dValue": 1800.0
|
||||
}
|
||||
],
|
||||
"JointList": [
|
||||
{
|
||||
"nIndex": 1,
|
||||
"JointType": "FULL_H"
|
||||
},
|
||||
{
|
||||
"nIndex": 2,
|
||||
"JointType": "FULL_H"
|
||||
},
|
||||
{
|
||||
"nIndex": 3,
|
||||
"JointType": "FULL_H"
|
||||
},
|
||||
{
|
||||
"nIndex": 4,
|
||||
"JointType": "FULL_H"
|
||||
}
|
||||
],
|
||||
"BottomRail": false,
|
||||
"BottomRailQty": 0,
|
||||
"AreaList": [
|
||||
{
|
||||
"SplitShape": "VERTICAL",
|
||||
"SplitPositionList": [
|
||||
{
|
||||
"bIsRelative": true,
|
||||
"dDimension": 50.0
|
||||
},
|
||||
{
|
||||
"bIsRelative": true,
|
||||
"dDimension": 50.0
|
||||
}
|
||||
],
|
||||
"AreaList": [
|
||||
{
|
||||
"AreaList": [
|
||||
{
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLITTED"
|
||||
},
|
||||
{
|
||||
"AreaList": [
|
||||
{
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLITTED"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLIT"
|
||||
}
|
||||
],
|
||||
"AreaType": "FRAME"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
{
|
||||
"ProfilePath": "Profilo78",
|
||||
"AreaList": [
|
||||
{
|
||||
"Shape": "RECTANGLE",
|
||||
"DimensionList": [
|
||||
{
|
||||
"nIndex": 1,
|
||||
"sName": "Width",
|
||||
"dValue": 1500.0
|
||||
},
|
||||
{
|
||||
"nIndex": 2,
|
||||
"sName": "Height",
|
||||
"dValue": 1800.0
|
||||
}
|
||||
],
|
||||
"JointList": [
|
||||
{
|
||||
"nIndex": 1,
|
||||
"JointType": "FULL_H"
|
||||
},
|
||||
{
|
||||
"nIndex": 2,
|
||||
"JointType": "FULL_H"
|
||||
},
|
||||
{
|
||||
"nIndex": 3,
|
||||
"JointType": "FULL_H"
|
||||
},
|
||||
{
|
||||
"nIndex": 4,
|
||||
"JointType": "FULL_H"
|
||||
}
|
||||
],
|
||||
"BottomRail": false,
|
||||
"BottomRailQty": 0,
|
||||
"AreaList": [
|
||||
{
|
||||
"SplitShape": "VERTICAL",
|
||||
"SplitPositionList": [
|
||||
{
|
||||
"bIsRelative": true,
|
||||
"dDimension": 50.0
|
||||
},
|
||||
{
|
||||
"bIsRelative": true,
|
||||
"dDimension": 50.0
|
||||
}
|
||||
],
|
||||
"AreaList": [
|
||||
{
|
||||
"AreaList": [
|
||||
{
|
||||
"SplitShape": "HORIZONTAL",
|
||||
"SplitPositionList": [
|
||||
{
|
||||
"bIsRelative": true,
|
||||
"dDimension": 40.0
|
||||
},
|
||||
{
|
||||
"bIsRelative": true,
|
||||
"dDimension": 60.0
|
||||
}
|
||||
],
|
||||
"AreaList": [
|
||||
{
|
||||
"AreaList": [
|
||||
{
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLITTED"
|
||||
},
|
||||
{
|
||||
"AreaList": [
|
||||
{
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLITTED"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLIT"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLITTED"
|
||||
},
|
||||
{
|
||||
"AreaList": [
|
||||
{
|
||||
"SplitShape": "HORIZONTAL",
|
||||
"SplitPositionList": [
|
||||
{
|
||||
"bIsRelative": true,
|
||||
"dDimension": 40.0
|
||||
},
|
||||
{
|
||||
"bIsRelative": true,
|
||||
"dDimension": 60.0
|
||||
}
|
||||
],
|
||||
"AreaList": [
|
||||
{
|
||||
"AreaList": [
|
||||
{
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLITTED"
|
||||
},
|
||||
{
|
||||
"AreaList": [
|
||||
{
|
||||
"FillType": "GLASS",
|
||||
"AreaList": [],
|
||||
"AreaType": "FILL"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLITTED"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLIT"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLITTED"
|
||||
}
|
||||
],
|
||||
"AreaType": "SPLIT"
|
||||
}
|
||||
],
|
||||
"AreaType": "FRAME"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
[
|
||||
{
|
||||
"Index": 1,
|
||||
"Description": "Anta singola",
|
||||
"SVGFileName": "AntaSingola.svg",
|
||||
"JwdFileName": "Data/AntaSingola.jwd"
|
||||
},
|
||||
{
|
||||
"Index": 2,
|
||||
"Description": "Anta doppia",
|
||||
"SVGFileName": "AntaDoppia.svg",
|
||||
"JwdFileName": "Data/AntaDoppia.jwd"
|
||||
},
|
||||
{
|
||||
"Index": 3,
|
||||
"Description": "Finestra con split verticale",
|
||||
"SVGFileName": "FinestraSplitVert.svg",
|
||||
"JwdFileName": "Data/FinestraSplitVert.jwd"
|
||||
},
|
||||
{
|
||||
"Index": 4,
|
||||
"Description": "Finestra con split verticale e orizzontale",
|
||||
"SVGFileName": "FinestraSplitVertOriz.svg",
|
||||
"JwdFileName": "Data/FinestraSplitVertOriz.jwd"
|
||||
},
|
||||
{
|
||||
"Index": 5,
|
||||
"Description": "Finestra con split orizzontale (sopra due ante e sotto vetro fisso)",
|
||||
"SVGFileName": "FinDueAnteBottomFisso.svg",
|
||||
"JwdFileName": "Data/FinDueAnteBottomFisso.jwd"
|
||||
}
|
||||
|
||||
]
|
||||
@@ -0,0 +1,57 @@
|
||||
using EgwCoreLib.Lux.Data.Services;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using StackExchange.Redis;
|
||||
using System.Reflection;
|
||||
using Test.UI.Client.Pages;
|
||||
using Test.UI.Components;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
|
||||
var assemblyVersion = Assembly.GetExecutingAssembly().GetName().Version?.ToString();
|
||||
|
||||
ConfigurationManager configuration = builder.Configuration;
|
||||
|
||||
// Add services to the container.
|
||||
builder.Services.AddRazorComponents()
|
||||
.AddInteractiveServerComponents()
|
||||
.AddInteractiveWebAssemblyComponents();
|
||||
|
||||
// costruzione connectionMultiplexer redis...
|
||||
string connStr = configuration.GetConnectionString("Redis") ?? "localhost";
|
||||
ConnectionMultiplexer redisConn = ConnectionMultiplexer.Connect(connStr);
|
||||
// registro connMultiplexer REDIS
|
||||
builder.Services.AddSingleton<IConnectionMultiplexer>(redisConn);
|
||||
// registro wrapper servizi REDIS
|
||||
builder.Services.AddSingleton<IRedisService, RedisService>();
|
||||
builder.Services.AddSingleton<RedisSubscriptionManager>();
|
||||
// Aggiunta servizi specifici
|
||||
builder.Services.AddSingleton<DataLayerServices>();
|
||||
builder.Services.AddSingleton<ImageCacheService>();
|
||||
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseWebAssemblyDebugging();
|
||||
}
|
||||
else
|
||||
{
|
||||
app.UseExceptionHandler("/Error", createScopeForErrors: true);
|
||||
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
||||
app.UseHsts();
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
app.UseStaticFiles();
|
||||
app.UseAntiforgery();
|
||||
|
||||
app.MapRazorComponents<App>()
|
||||
.AddInteractiveServerRenderMode()
|
||||
.AddInteractiveWebAssemblyRenderMode()
|
||||
.AddAdditionalAssemblies(typeof(Test.UI.Client._Imports).Assembly);
|
||||
|
||||
app.Run();
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"$schema": "http://json.schemastore.org/launchsettings.json",
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:38216",
|
||||
"sslPort": 44387
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"http": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
|
||||
"applicationUrl": "http://localhost:5069",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"https": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
|
||||
"applicationUrl": "https://localhost:7083;http://localhost:5069",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Remove="compilerconfig.json" />
|
||||
<Content Remove="Data\Setup.json" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="compilerconfig.json" />
|
||||
<None Include="Data\Setup.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="wwwroot\Images\ImgRouter\Doppia.svg">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="wwwroot\Images\ImgRouter\Singola.svg">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Test.UI.Client\Test.UI.Client.csproj" />
|
||||
<ProjectReference Include="..\WebAedificaConfigurator\WebAedificaConfigurator.csproj" />
|
||||
<ProjectReference Include="..\WebWindowConfigurator\WebWindowConfigurator.csproj" />
|
||||
<PackageReference Include="EgwCoreLib.Lux.Core" Version="0.9.2508.712" />
|
||||
<PackageReference Include="EgwCoreLib.Lux.Data" Version="0.9.2508.712" />
|
||||
<PackageReference Include="EgwCoreLib.Razor" Version="1.5.2507.1815" />
|
||||
<PackageReference Include="EgwCoreLib.Utils" Version="1.5.2507.1815" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.17" />
|
||||
<PackageReference Include="RestSharp" Version="112.1.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="Data\AntaDoppia.jwd">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Data\AntaSingola.jwd">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
"Redis": "redis.ufficio:26379, serviceName=devel, DefaultDatabase=6, keepAlive=180, connectTimeout=15000, syncTimeout=15000, asyncTimeout=15000, abortConnect=false, ssl=false, allowAdmin=true"
|
||||
},
|
||||
"ServerConf": {
|
||||
"PubChannel": "EgwEngineInput",
|
||||
"SubChannel": "EgwEngineOutput",
|
||||
"SvgChannel": "svg:img",
|
||||
"Prog.ApiUrl": "https://iis01.egalware.com/lux/srv/api",
|
||||
"ImageBaseUrl": "window",
|
||||
"GenericBaseUrl": "generic",
|
||||
"ImageLiveTag": "svg",
|
||||
"ImageFileTag": "svgfile",
|
||||
"ImageCalcTag": "svg-preview",
|
||||
"CalcTag": "calc"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
[
|
||||
{
|
||||
"outputFile": "wwwroot/css/site.css",
|
||||
"inputFile": "wwwroot/css/site.less"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"compilers": {
|
||||
"less": {
|
||||
"autoPrefix": "",
|
||||
"cssComb": "none",
|
||||
"ieCompat": true,
|
||||
"math": null,
|
||||
"strictMath": false,
|
||||
"strictUnits": false,
|
||||
"relativeUrls": true,
|
||||
"rootPath": "",
|
||||
"sourceMapRoot": "",
|
||||
"sourceMapBasePath": "",
|
||||
"sourceMap": false
|
||||
},
|
||||
"sass": {
|
||||
"autoPrefix": "",
|
||||
"loadPaths": "",
|
||||
"style": "expanded",
|
||||
"relativeUrls": true,
|
||||
"sourceMap": false
|
||||
},
|
||||
"stylus": {
|
||||
"sourceMap": false
|
||||
},
|
||||
"babel": {
|
||||
"sourceMap": false
|
||||
},
|
||||
"coffeescript": {
|
||||
"bare": false,
|
||||
"runtimeMode": "node",
|
||||
"sourceMap": false
|
||||
},
|
||||
"handlebars": {
|
||||
"root": "",
|
||||
"noBOM": false,
|
||||
"name": "",
|
||||
"namespace": "",
|
||||
"knownHelpersOnly": false,
|
||||
"forcePartial": false,
|
||||
"knownHelpers": [],
|
||||
"commonjs": "",
|
||||
"amd": false,
|
||||
"sourceMap": false
|
||||
}
|
||||
},
|
||||
"minifiers": {
|
||||
"css": {
|
||||
"enabled": true,
|
||||
"termSemicolons": true,
|
||||
"gzip": false
|
||||
},
|
||||
"javascript": {
|
||||
"enabled": true,
|
||||
"termSemicolons": true,
|
||||
"gzip": false
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 233 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 149 KiB |
@@ -0,0 +1,51 @@
|
||||
html, body {
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
a, .btn-link {
|
||||
color: #006bb7;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
color: #fff;
|
||||
background-color: #1b6ec2;
|
||||
border-color: #1861ac;
|
||||
}
|
||||
|
||||
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
|
||||
box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding-top: 1.1rem;
|
||||
}
|
||||
|
||||
h1:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.valid.modified:not([type=checkbox]) {
|
||||
outline: 1px solid #26b050;
|
||||
}
|
||||
|
||||
.invalid {
|
||||
outline: 1px solid #e50000;
|
||||
}
|
||||
|
||||
.validation-message {
|
||||
color: #e50000;
|
||||
}
|
||||
|
||||
.blazor-error-boundary {
|
||||
background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
|
||||
padding: 1rem 1rem 1rem 3.7rem;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.blazor-error-boundary::after {
|
||||
content: "An error has occurred."
|
||||
}
|
||||
|
||||
.darker-border-checkbox.form-check-input {
|
||||
border-color: #929292;
|
||||
}
|
||||
+7
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,451 @@
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
b,
|
||||
display-1,
|
||||
display-2,
|
||||
display-3,
|
||||
display-4 {
|
||||
/*font-family: 'Roboto', sans-serif;*/
|
||||
font-family: 'Lato', sans-serif;
|
||||
}
|
||||
html,
|
||||
body {
|
||||
/*font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;*/
|
||||
/*font-family: 'Roboto Condensed', sans-serif;*/
|
||||
font-family: 'Roboto', sans-serif;
|
||||
line-height: 1.3;
|
||||
}
|
||||
h1:focus {
|
||||
outline: none;
|
||||
}
|
||||
a,
|
||||
.btn-link {
|
||||
color: #0071c1;
|
||||
}
|
||||
.btn-primary {
|
||||
color: #fff;
|
||||
background-color: #1b6ec2;
|
||||
border-color: #1861ac;
|
||||
}
|
||||
.content {
|
||||
padding-top: 1.1rem;
|
||||
}
|
||||
.valid.modified:not([type=checkbox]) {
|
||||
outline: 1px solid #26b050;
|
||||
}
|
||||
.invalid {
|
||||
outline: 1px solid red;
|
||||
}
|
||||
.validation-message {
|
||||
color: red;
|
||||
}
|
||||
.regionnotclicked {
|
||||
fill: white;
|
||||
}
|
||||
.regionclicked {
|
||||
fill: red;
|
||||
}
|
||||
.striked {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
/* Gestione dropdown menu x week planner */
|
||||
.dropdown {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
.dropdown:hover .dropdown-content,
|
||||
.dropdown:hover .dropdown-content-top,
|
||||
.dropdown:hover .dropdown-content-left,
|
||||
.dropdown:hover .dropdown-content-top-left {
|
||||
display: block;
|
||||
}
|
||||
.dropdown-content {
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: -10em;
|
||||
min-width: 8em;
|
||||
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
|
||||
z-index: 1;
|
||||
}
|
||||
.dropdown-content .a {
|
||||
color: black;
|
||||
padding: 12px 16px;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
}
|
||||
.dropdown-content .a:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
.dropdown-content-top {
|
||||
display: none;
|
||||
position: absolute;
|
||||
min-width: 8em;
|
||||
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
|
||||
z-index: 1;
|
||||
top: -13em;
|
||||
left: -10em;
|
||||
}
|
||||
.dropdown-content-top .a {
|
||||
color: black;
|
||||
padding: 12px 16px;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
}
|
||||
.dropdown-content-top .a:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
.dropdown-content-left {
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: -10em;
|
||||
min-width: 8em;
|
||||
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
|
||||
z-index: 1;
|
||||
left: -24em;
|
||||
}
|
||||
.dropdown-content-left .a {
|
||||
color: black;
|
||||
padding: 12px 16px;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
}
|
||||
.dropdown-content-left .a:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
.dropdown-content-top-left {
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: -10em;
|
||||
min-width: 8em;
|
||||
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
|
||||
z-index: 1;
|
||||
top: -13em;
|
||||
left: -24em;
|
||||
}
|
||||
.dropdown-content-top-left .a {
|
||||
color: black;
|
||||
padding: 12px 16px;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
}
|
||||
.dropdown-content-top-left .a:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
.textTrim {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.maxChar {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.max5Char {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
width: 5rem;
|
||||
}
|
||||
.max10Char {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
width: 10rem;
|
||||
}
|
||||
.max20Char {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
width: 20rem;
|
||||
}
|
||||
.max30Char {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
width: 30rem;
|
||||
}
|
||||
.max40Char {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
width: 40rem;
|
||||
}
|
||||
.max50Char {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
width: 50rem;
|
||||
}
|
||||
.max100Char {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
width: 100rem;
|
||||
}
|
||||
.footer {
|
||||
line-height: 1.8em;
|
||||
}
|
||||
#blazor-error-ui {
|
||||
background: lightyellow;
|
||||
bottom: 0;
|
||||
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
|
||||
display: none;
|
||||
left: 0;
|
||||
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 1000;
|
||||
}
|
||||
#blazor-error-ui .dismiss {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
right: 0.75rem;
|
||||
top: 0.5rem;
|
||||
}
|
||||
.blazor-error-boundary {
|
||||
background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
|
||||
padding: 1rem 1rem 1rem 3.7rem;
|
||||
color: white;
|
||||
}
|
||||
.blazor-error-boundary::after {
|
||||
content: "An error has occurred.";
|
||||
}
|
||||
/* gestione SVG responsive */
|
||||
.table-svg {
|
||||
min-height: 50rem;
|
||||
display: block;
|
||||
}
|
||||
.responsive-svg {
|
||||
/* SVG scala a fit del container */
|
||||
width: 100%;
|
||||
/* Altezza massima in rem (caratteri) */
|
||||
height: 50rem;
|
||||
/* Removes extra space below SVG */
|
||||
display: block;
|
||||
}
|
||||
/*------------------------------------------------------------------
|
||||
[ Shortcuts / .shortcuts ]
|
||||
*/
|
||||
.shortcuts {
|
||||
text-align: center;
|
||||
}
|
||||
.shortcuts .shortcut-icon {
|
||||
font-size: 2rem;
|
||||
}
|
||||
.shortcuts .shortcut {
|
||||
min-width: 10rem;
|
||||
min-height: 5rem;
|
||||
display: inline-block;
|
||||
padding: 2rem/3 0;
|
||||
margin: 0 2px 1em;
|
||||
vertical-align: top;
|
||||
text-decoration: none;
|
||||
background: #F3F3F3;
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#eeeeee));
|
||||
background-image: -webkit-linear-gradient(top, #ffffff, 0%, #eeeeee, 100%);
|
||||
background-image: -moz-linear-gradient(top, #ffffff 0%, #eeeeee 100%);
|
||||
background-image: linear-gradient(to bottom, #ffffff 0%, #eeeeee 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffeeeeee', GradientType=0);
|
||||
border: 1px solid #ddd;
|
||||
box-sizing: border-box;
|
||||
border-radius: 1rem/2;
|
||||
}
|
||||
.shortcuts .shortcut-sm {
|
||||
min-width: 4.5rem;
|
||||
min-height: 3rem;
|
||||
display: inline-block;
|
||||
padding: 1rem/4 0;
|
||||
margin: 0 2px 1em;
|
||||
vertical-align: top;
|
||||
text-decoration: none;
|
||||
background: #F3F3F3;
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#eeeeee));
|
||||
background-image: -webkit-linear-gradient(top, #ffffff, 0%, #eeeeee, 100%);
|
||||
background-image: -moz-linear-gradient(top, #ffffff 0%, #eeeeee 100%);
|
||||
background-image: linear-gradient(to bottom, #ffffff 0%, #eeeeee 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffeeeeee', GradientType=0);
|
||||
border: 1px solid #ddd;
|
||||
box-sizing: border-box;
|
||||
border-radius: 1rem/2;
|
||||
}
|
||||
.shortcuts .shortcut .shortcut-icon {
|
||||
width: 100%;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
font-size: 2rem;
|
||||
color: #333;
|
||||
}
|
||||
.shortcuts .shortcut-sm .shortcut-icon {
|
||||
width: 100%;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
font-size: 2rem;
|
||||
color: #333;
|
||||
}
|
||||
.shortcuts .shortcut:hover {
|
||||
background: #E8E8E8;
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fafafa), to(#e1e1e1));
|
||||
background-image: -webkit-linear-gradient(top, #fafafa, 0%, #e1e1e1, 100%);
|
||||
background-image: -moz-linear-gradient(top, #fafafa 0%, #e1e1e1 100%);
|
||||
background-image: linear-gradient(to bottom, #fafafa 0%, #e1e1e1 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa', endColorstr='#ffe1e1e1', GradientType=0);
|
||||
}
|
||||
.shortcuts .shortcut-sm:hover {
|
||||
background: #E8E8E8;
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fafafa), to(#e1e1e1));
|
||||
background-image: -webkit-linear-gradient(top, #fafafa, 0%, #e1e1e1, 100%);
|
||||
background-image: -moz-linear-gradient(top, #fafafa 0%, #e1e1e1 100%);
|
||||
background-image: linear-gradient(to bottom, #fafafa 0%, #e1e1e1 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa', endColorstr='#ffe1e1e1', GradientType=0);
|
||||
}
|
||||
.shortcuts .shortcut:active {
|
||||
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
||||
}
|
||||
.shortcuts .shortcut-sm:active {
|
||||
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
||||
}
|
||||
.shortcuts .shortcut:hover .shortcut-icon {
|
||||
color: #C93;
|
||||
}
|
||||
.shortcuts .shortcut-sm:hover .shortcut-icon {
|
||||
color: #666;
|
||||
}
|
||||
.shortcuts .shortcut-label {
|
||||
display: block;
|
||||
margin-top: 0.75em;
|
||||
font-weight: 400;
|
||||
color: #666;
|
||||
}
|
||||
.wHead {
|
||||
line-height: 1;
|
||||
}
|
||||
@media (max-width: 640px) {
|
||||
.shortcuts .shortcut {
|
||||
min-width: 8rem;
|
||||
min-height: 4rem;
|
||||
}
|
||||
body {
|
||||
font-size: 0.8em;
|
||||
line-height: 1.1;
|
||||
}
|
||||
}
|
||||
@media (max-width: 1650px) {
|
||||
body {
|
||||
font-size: 0.9em;
|
||||
line-height: 1.2;
|
||||
}
|
||||
}
|
||||
/* gestione btn report */
|
||||
.reportPivot {
|
||||
background: #EFEFEF;
|
||||
background-image: url(../images/PivotData.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: top;
|
||||
background-position: left;
|
||||
min-height: 250px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: block;
|
||||
position: relative;
|
||||
}
|
||||
.reportOre {
|
||||
background: #EFEFEF;
|
||||
background-image: url(../images/ReportGerarchico.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: top;
|
||||
background-position: left;
|
||||
min-height: 250px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: block;
|
||||
position: relative;
|
||||
}
|
||||
.reportFolders {
|
||||
background: #EFEFEF;
|
||||
background-image: url(../images/ReportFolders.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: top;
|
||||
background-position: left;
|
||||
min-height: 250px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: block;
|
||||
position: relative;
|
||||
}
|
||||
.reportBadge {
|
||||
background: #EFEFEF;
|
||||
background-image: url(../images/Barcode.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: top;
|
||||
background-position: left;
|
||||
min-height: 250px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: block;
|
||||
position: relative;
|
||||
}
|
||||
/* Text position */
|
||||
.areaTesto {
|
||||
white-space: normal;
|
||||
overflow: visible;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 50%;
|
||||
bottom: 0;
|
||||
margin: 0;
|
||||
padding: 0 20px;
|
||||
min-height: 25%;
|
||||
line-height: 1.5;
|
||||
color: White;
|
||||
background: #333;
|
||||
background: rgba(50, 50, 50, 0.9);
|
||||
-webkit-background-clip: padding;
|
||||
background-clip: padding-box;
|
||||
border-bottom-left-radius: inherit;
|
||||
border-bottom-right-radius: inherit;
|
||||
}
|
||||
/* versioni small */
|
||||
.areaTestoSmall {
|
||||
white-space: normal;
|
||||
overflow: visible;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 50%;
|
||||
bottom: 0;
|
||||
margin: 0;
|
||||
padding: 0 3px;
|
||||
min-height: 50%;
|
||||
line-height: 1.5;
|
||||
font-size: 7pt;
|
||||
color: White;
|
||||
background: #999;
|
||||
background: rgba(160, 160, 160, 0.9);
|
||||
-webkit-background-clip: padding;
|
||||
background-clip: padding-box;
|
||||
border-bottom-left-radius: inherit;
|
||||
border-bottom-right-radius: inherit;
|
||||
}
|
||||
.reportFoldersSmall {
|
||||
background: #EFEFEF;
|
||||
background-image: url(../images/ReportGerarchico.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: left top;
|
||||
background-size: 60px 60px;
|
||||
min-height: 36px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
display: block;
|
||||
position: relative;
|
||||
}
|
||||
@@ -0,0 +1,460 @@
|
||||
|
||||
h1, h2, h3, h4, h5, h6, b, display-1, display-2, display-3, display-4 {
|
||||
/*font-family: 'Roboto', sans-serif;*/
|
||||
font-family: 'Lato', sans-serif;
|
||||
}
|
||||
|
||||
html, body {
|
||||
/*font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;*/
|
||||
/*font-family: 'Roboto Condensed', sans-serif;*/
|
||||
font-family: 'Roboto', sans-serif;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
|
||||
|
||||
h1:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
a, .btn-link {
|
||||
color: #0071c1;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
color: #fff;
|
||||
background-color: #1b6ec2;
|
||||
border-color: #1861ac;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding-top: 1.1rem;
|
||||
}
|
||||
|
||||
.valid.modified:not([type=checkbox]) {
|
||||
outline: 1px solid #26b050;
|
||||
}
|
||||
|
||||
.invalid {
|
||||
outline: 1px solid red;
|
||||
}
|
||||
|
||||
.validation-message {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.regionnotclicked {
|
||||
fill: white;
|
||||
}
|
||||
|
||||
.regionclicked {
|
||||
fill: red;
|
||||
}
|
||||
|
||||
.striked {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
|
||||
/* Gestione dropdown menu x week planner */
|
||||
|
||||
@dropTop: -13.0em;
|
||||
@dropLeftL: -10em;
|
||||
@dropLeftR: -24em;
|
||||
|
||||
.dropdown {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
|
||||
&:hover .dropdown-content, &:hover .dropdown-content-top, &:hover .dropdown-content-left, &:hover .dropdown-content-top-left {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-content {
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: @dropLeftL;
|
||||
min-width: 8em;
|
||||
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
||||
z-index: 1;
|
||||
|
||||
.a {
|
||||
color: black;
|
||||
padding: 12px 16px;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.a:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.dropdown-content-top {
|
||||
.dropdown-content();
|
||||
top: @dropTop;
|
||||
left: @dropLeftL;
|
||||
}
|
||||
|
||||
.dropdown-content-left {
|
||||
.dropdown-content();
|
||||
left: @dropLeftR;
|
||||
}
|
||||
|
||||
.dropdown-content-top-left {
|
||||
.dropdown-content();
|
||||
top: @dropTop;
|
||||
left: @dropLeftR;
|
||||
}
|
||||
|
||||
|
||||
.textTrim {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
|
||||
.maxChar {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.max5Char {
|
||||
.maxChar;
|
||||
width: 5rem;
|
||||
}
|
||||
|
||||
.max10Char {
|
||||
.maxChar;
|
||||
width: 10rem;
|
||||
}
|
||||
|
||||
.max20Char {
|
||||
.maxChar;
|
||||
width: 20rem;
|
||||
}
|
||||
|
||||
.max30Char {
|
||||
.maxChar;
|
||||
width: 30rem;
|
||||
}
|
||||
|
||||
.max40Char {
|
||||
.maxChar;
|
||||
width: 40rem;
|
||||
}
|
||||
|
||||
.max50Char {
|
||||
.maxChar;
|
||||
width: 50rem;
|
||||
}
|
||||
|
||||
|
||||
.max100Char {
|
||||
.maxChar;
|
||||
width: 100rem;
|
||||
}
|
||||
|
||||
.footer {
|
||||
line-height: 1.8em;
|
||||
}
|
||||
|
||||
#blazor-error-ui {
|
||||
background: lightyellow;
|
||||
bottom: 0;
|
||||
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
|
||||
display: none;
|
||||
left: 0;
|
||||
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
#blazor-error-ui .dismiss {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
right: 0.75rem;
|
||||
top: 0.5rem;
|
||||
}
|
||||
|
||||
.blazor-error-boundary {
|
||||
background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
|
||||
padding: 1rem 1rem 1rem 3.7rem;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.blazor-error-boundary::after {
|
||||
content: "An error has occurred."
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* gestione SVG responsive */
|
||||
.table-svg {
|
||||
min-height: 50rem;
|
||||
display: block;
|
||||
}
|
||||
.responsive-svg {
|
||||
/* SVG scala a fit del container */
|
||||
width: 100%;
|
||||
/* Altezza massima in rem (caratteri) */
|
||||
height: 50rem;
|
||||
/* Removes extra space below SVG */
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------
|
||||
[ Shortcuts / .shortcuts ]
|
||||
*/
|
||||
|
||||
@blSCut: 1rem;
|
||||
|
||||
.shortcuts {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.shortcuts .shortcut-icon {
|
||||
font-size: 2*@blSCut;
|
||||
}
|
||||
|
||||
.shortcuts .shortcut {
|
||||
min-width: @blSCut * 10;
|
||||
min-height: @blSCut * 5;
|
||||
display: inline-block;
|
||||
padding: @blSCut*2/3 0;
|
||||
margin: 0 2px 1em;
|
||||
vertical-align: top;
|
||||
text-decoration: none;
|
||||
background: #F3F3F3;
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#eeeeee));
|
||||
background-image: -webkit-linear-gradient(top, #ffffff, 0%, #eeeeee, 100%);
|
||||
background-image: -moz-linear-gradient(top, #ffffff 0%, #eeeeee 100%);
|
||||
background-image: linear-gradient(to bottom, #ffffff 0%, #eeeeee 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffeeeeee', GradientType=0);
|
||||
border: 1px solid #ddd;
|
||||
box-sizing: border-box;
|
||||
border-radius: @blSCut/2;
|
||||
}
|
||||
|
||||
.shortcuts .shortcut-sm {
|
||||
min-width: @blSCut * 4.5;
|
||||
min-height: @blSCut * 3;
|
||||
display: inline-block;
|
||||
padding: @blSCut/4 0;
|
||||
margin: 0 2px 1em;
|
||||
vertical-align: top;
|
||||
text-decoration: none;
|
||||
background: #F3F3F3;
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#eeeeee));
|
||||
background-image: -webkit-linear-gradient(top, #ffffff, 0%, #eeeeee, 100%);
|
||||
background-image: -moz-linear-gradient(top, #ffffff 0%, #eeeeee 100%);
|
||||
background-image: linear-gradient(to bottom, #ffffff 0%, #eeeeee 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffeeeeee', GradientType=0);
|
||||
border: 1px solid #ddd;
|
||||
box-sizing: border-box;
|
||||
border-radius: @blSCut/2;
|
||||
}
|
||||
|
||||
.shortcuts .shortcut .shortcut-icon {
|
||||
width: 100%;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
font-size: @blSCut*2;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.shortcuts .shortcut-sm .shortcut-icon {
|
||||
width: 100%;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
font-size: @blSCut*2;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.shortcuts .shortcut:hover {
|
||||
background: #E8E8E8;
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fafafa), to(#e1e1e1));
|
||||
background-image: -webkit-linear-gradient(top, #fafafa, 0%, #e1e1e1, 100%);
|
||||
background-image: -moz-linear-gradient(top, #fafafa 0%, #e1e1e1 100%);
|
||||
background-image: linear-gradient(to bottom, #fafafa 0%, #e1e1e1 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa', endColorstr='#ffe1e1e1', GradientType=0);
|
||||
}
|
||||
|
||||
.shortcuts .shortcut-sm:hover {
|
||||
background: #E8E8E8;
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fafafa), to(#e1e1e1));
|
||||
background-image: -webkit-linear-gradient(top, #fafafa, 0%, #e1e1e1, 100%);
|
||||
background-image: -moz-linear-gradient(top, #fafafa 0%, #e1e1e1 100%);
|
||||
background-image: linear-gradient(to bottom, #fafafa 0%, #e1e1e1 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa', endColorstr='#ffe1e1e1', GradientType=0);
|
||||
}
|
||||
|
||||
.shortcuts .shortcut:active {
|
||||
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
||||
}
|
||||
|
||||
.shortcuts .shortcut-sm:active {
|
||||
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
||||
}
|
||||
|
||||
.shortcuts .shortcut:hover .shortcut-icon {
|
||||
color: #C93;
|
||||
}
|
||||
|
||||
.shortcuts .shortcut-sm:hover .shortcut-icon {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.shortcuts .shortcut-label {
|
||||
display: block;
|
||||
margin-top: .75em;
|
||||
font-weight: 400;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.wHead {
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.shortcuts .shortcut {
|
||||
min-width: @blSCut * 8;
|
||||
min-height: @blSCut * 4;
|
||||
}
|
||||
|
||||
body {
|
||||
font-size: 0.8em;
|
||||
line-height: 1.1;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1650px) {
|
||||
|
||||
body {
|
||||
font-size: 0.9em;
|
||||
line-height: 1.2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* gestione btn report */
|
||||
.reportPivot {
|
||||
background: #EFEFEF;
|
||||
background-image: url(../images/PivotData.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: top;
|
||||
background-position: left;
|
||||
min-height: 250px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: block;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.reportOre {
|
||||
background: #EFEFEF;
|
||||
background-image: url(../images/ReportGerarchico.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: top;
|
||||
background-position: left;
|
||||
min-height: 250px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: block;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.reportFolders {
|
||||
background: #EFEFEF;
|
||||
background-image: url(../images/ReportFolders.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: top;
|
||||
background-position: left;
|
||||
min-height: 250px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: block;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.reportBadge {
|
||||
background: #EFEFEF;
|
||||
background-image: url(../images/Barcode.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: top;
|
||||
background-position: left;
|
||||
min-height: 250px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: block;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Text position */
|
||||
.areaTesto {
|
||||
white-space: normal;
|
||||
overflow: visible;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 50%;
|
||||
bottom: 0;
|
||||
margin: 0;
|
||||
padding: 0 20px;
|
||||
min-height: 25%;
|
||||
line-height: 1.5;
|
||||
color: White;
|
||||
background: #333;
|
||||
background: rgba(50,50,50,.9);
|
||||
-webkit-background-clip: padding;
|
||||
background-clip: padding-box;
|
||||
border-bottom-left-radius: inherit;
|
||||
border-bottom-right-radius: inherit;
|
||||
}
|
||||
|
||||
/* versioni small */
|
||||
.areaTestoSmall {
|
||||
white-space: normal;
|
||||
overflow: visible;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 50%;
|
||||
bottom: 0;
|
||||
margin: 0;
|
||||
padding: 0 3px;
|
||||
min-height: 50%;
|
||||
line-height: 1.5;
|
||||
font-size: 7pt;
|
||||
color: White;
|
||||
background: #999;
|
||||
background: rgba(160,160,160,.9);
|
||||
-webkit-background-clip: padding;
|
||||
background-clip: padding-box;
|
||||
border-bottom-left-radius: inherit;
|
||||
border-bottom-right-radius: inherit;
|
||||
}
|
||||
|
||||
.reportFoldersSmall {
|
||||
background: #EFEFEF;
|
||||
background-image: url(../images/ReportGerarchico.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: left top;
|
||||
background-size: 60px 60px;
|
||||
min-height: 36px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
display: block;
|
||||
position: relative;
|
||||
}
|
||||
Vendored
+1
File diff suppressed because one or more lines are too long
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,37 @@
|
||||
using Microsoft.JSInterop;
|
||||
|
||||
namespace WebAedificaConfigurator
|
||||
{
|
||||
// This class provides an example of how JavaScript functionality can be wrapped
|
||||
// in a .NET class for easy consumption. The associated JavaScript module is
|
||||
// loaded on demand when first needed.
|
||||
//
|
||||
// This class can be registered as scoped DI service and then injected into Blazor
|
||||
// components for use.
|
||||
|
||||
public class ExampleJsInterop : IAsyncDisposable
|
||||
{
|
||||
private readonly Lazy<Task<IJSObjectReference>> moduleTask;
|
||||
|
||||
public ExampleJsInterop(IJSRuntime jsRuntime)
|
||||
{
|
||||
moduleTask = new(() => jsRuntime.InvokeAsync<IJSObjectReference>(
|
||||
"import", "./_content/WebAedificaConfigurator/exampleJsInterop.js").AsTask());
|
||||
}
|
||||
|
||||
public async ValueTask<string> Prompt(string message)
|
||||
{
|
||||
var module = await moduleTask.Value;
|
||||
return await module.InvokeAsync<string>("showPrompt", message);
|
||||
}
|
||||
|
||||
public async ValueTask DisposeAsync()
|
||||
{
|
||||
if (moduleTask.IsValueCreated)
|
||||
{
|
||||
var module = await moduleTask.Value;
|
||||
await module.DisposeAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<SupportedPlatform Include="browser" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.18" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,29 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<div class="card text-center" style="min-height: 50rem">
|
||||
<div class="card-header" style="background-color: #d5f1f2;">
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
<li class="nav-item">
|
||||
File BTL
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="alert alert-light text-center display-4">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="mb-3">
|
||||
<input type="text" style="height: 30rem" class="form-control" id="exampleFormControlInput1" @bind="@m_FilePath">
|
||||
<button class="btn btn-lg btn-primary btn-sm" @onclick="DoSave">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
@outSvg
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,55 @@
|
||||
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";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
.my-component {
|
||||
border: 2px dashed red;
|
||||
padding: 1em;
|
||||
margin: 1em 0;
|
||||
background-image: url('background.png');
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 378 B |
@@ -0,0 +1,6 @@
|
||||
// This is a JavaScript module that is loaded on demand. It can export any number of
|
||||
// functions, and may import other JavaScript modules if required.
|
||||
|
||||
export function showPrompt(message) {
|
||||
return prompt(message, 'Type anything here');
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebWindowConfigurator.DTO
|
||||
{
|
||||
public class TemplateSelectDTO
|
||||
{
|
||||
public int Index { get; set; } = 0;
|
||||
public string Description { get; set; } = "";
|
||||
public string JwdFileName { get; set; } = "";
|
||||
public string SVGFileName { get; set; } = "";
|
||||
public string ImageUrl { get; set; } = "";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using Microsoft.JSInterop;
|
||||
|
||||
namespace WebWindowConfigurator
|
||||
{
|
||||
// This class provides an example of how JavaScript functionality can be wrapped
|
||||
// in a .NET class for easy consumption. The associated JavaScript module is
|
||||
// loaded on demand when first needed.
|
||||
//
|
||||
// This class can be registered as scoped DI service and then injected into Blazor
|
||||
// components for use.
|
||||
|
||||
public class ExampleJsInterop : IAsyncDisposable
|
||||
{
|
||||
private readonly Lazy<Task<IJSObjectReference>> moduleTask;
|
||||
|
||||
public ExampleJsInterop(IJSRuntime jsRuntime)
|
||||
{
|
||||
moduleTask = new(() => jsRuntime.InvokeAsync<IJSObjectReference>(
|
||||
"import", "./_content/WebWindowConfigurator/exampleJsInterop.js").AsTask());
|
||||
}
|
||||
|
||||
public async ValueTask<string> Prompt(string message)
|
||||
{
|
||||
var module = await moduleTask.Value;
|
||||
return await module.InvokeAsync<string>("showPrompt", message);
|
||||
}
|
||||
|
||||
public async ValueTask DisposeAsync()
|
||||
{
|
||||
if (moduleTask.IsValueCreated)
|
||||
{
|
||||
var module = await moduleTask.Value;
|
||||
await module.DisposeAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,753 @@
|
||||
using Microsoft.VisualBasic;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
using static WebWindowConfigurator.Json.WindowConst;
|
||||
|
||||
namespace WebWindowConfigurator.Json
|
||||
{
|
||||
[JsonObject(MemberSerialization.OptIn)]
|
||||
public class JsonWindow
|
||||
{
|
||||
private string m_sProfilePath;
|
||||
[JsonProperty]
|
||||
public string ProfilePath
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_sProfilePath;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_sProfilePath = value;
|
||||
}
|
||||
}
|
||||
|
||||
private List<JsonArea> m_AreaList = new List<JsonArea>();
|
||||
[JsonProperty]
|
||||
public List<JsonArea> AreaList
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_AreaList;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_AreaList = value;
|
||||
}
|
||||
}
|
||||
|
||||
public JsonWindow(string ProfilePath)
|
||||
{
|
||||
m_sProfilePath = ProfilePath;
|
||||
}
|
||||
|
||||
internal Window Deserialize()
|
||||
{
|
||||
Window Window = new Window() { sProfilePath = m_sProfilePath };
|
||||
foreach (var Area in AreaList)
|
||||
Window.AreaList.Add((Frame)Area.Deserialize(null,Window));
|
||||
return Window;
|
||||
}
|
||||
}
|
||||
|
||||
public class JsonArea
|
||||
{
|
||||
private List<JsonArea> m_AreaList = new List<JsonArea>();
|
||||
|
||||
[JsonProperty]
|
||||
public List<JsonArea> AreaList
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_AreaList;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_AreaList = value;
|
||||
}
|
||||
}
|
||||
|
||||
private AreaTypes m_AreaType;
|
||||
[JsonProperty]
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public AreaTypes AreaType
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_AreaType;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_AreaType = value;
|
||||
}
|
||||
}
|
||||
|
||||
public JsonArea(AreaTypes AreaType)
|
||||
{
|
||||
m_AreaType = AreaType;
|
||||
}
|
||||
|
||||
internal virtual Area? Deserialize(Area ParentArea, Window ParentWindow)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public class JsonFrame : JsonArea
|
||||
{
|
||||
private Shapes m_Shape;
|
||||
[JsonProperty]
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public Shapes Shape
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Shape;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Shape = value;
|
||||
}
|
||||
}
|
||||
|
||||
private List<JsonFrameDimension> m_DimensionList = new List<JsonFrameDimension>();
|
||||
[JsonProperty]
|
||||
public List<JsonFrameDimension> DimensionList
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_DimensionList;
|
||||
}
|
||||
}
|
||||
|
||||
private List<JsonJoint> m_JointList = new List<JsonJoint>();
|
||||
[JsonProperty]
|
||||
public List<JsonJoint> JointList
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_JointList;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_JointList = value;
|
||||
}
|
||||
}
|
||||
|
||||
private bool m_bBottomRail;
|
||||
[JsonProperty]
|
||||
public bool BottomRail
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_bBottomRail;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_bBottomRail = value;
|
||||
}
|
||||
}
|
||||
|
||||
private int m_nBottomRailQty;
|
||||
[JsonProperty]
|
||||
public int BottomRailQty
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_nBottomRailQty;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_nBottomRailQty = value;
|
||||
}
|
||||
}
|
||||
|
||||
public JsonFrame() : base(AreaTypes.FRAME)
|
||||
{
|
||||
}
|
||||
|
||||
public JsonFrame(Shapes Shape, bool BottomRail, int BottomRailQty) : base(AreaTypes.FRAME)
|
||||
{
|
||||
m_Shape = Shape;
|
||||
m_bBottomRail = BottomRail;
|
||||
m_nBottomRailQty = BottomRailQty;
|
||||
}
|
||||
|
||||
internal override Area Deserialize(Area ParentArea, Window ParentWindow)
|
||||
{
|
||||
Frame newFrame = new Frame(null, ParentWindow);
|
||||
newFrame.SetAreaType(AreaTypes.FRAME);
|
||||
newFrame.SetSelShape(m_Shape);
|
||||
newFrame.SetBottomRail(m_bBottomRail);
|
||||
newFrame.SetBottomRailQty(m_nBottomRailQty);
|
||||
//Frame.AppliedDone();
|
||||
for (var DimensionIndex = 0; DimensionIndex <= m_DimensionList.Count - 1; DimensionIndex++)
|
||||
newFrame.DimensionList[DimensionIndex].dValue = m_DimensionList[DimensionIndex].dValue;
|
||||
for (var JointIndex = 0; JointIndex <= m_JointList.Count - 1; JointIndex++)
|
||||
newFrame.JointList[JointIndex].SetSelJointType(m_JointList[JointIndex].JointType);
|
||||
foreach (var Area in AreaList)
|
||||
{
|
||||
var aList = Area.Deserialize(newFrame, ParentWindow);
|
||||
if (aList != null)
|
||||
{
|
||||
newFrame.AreaList.Add(aList);
|
||||
}
|
||||
}
|
||||
return newFrame;
|
||||
}
|
||||
}
|
||||
|
||||
public class JsonSash : JsonArea
|
||||
{
|
||||
private bool m_bIsSashVertical;
|
||||
[JsonProperty]
|
||||
public bool bIsSashVertical
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_bIsSashVertical;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_bIsSashVertical = value;
|
||||
}
|
||||
}
|
||||
|
||||
private List<JsonSashDimension> m_SashList = new List<JsonSashDimension>();
|
||||
[JsonProperty]
|
||||
public List<JsonSashDimension> SashList
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SashList;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_SashList = value;
|
||||
}
|
||||
}
|
||||
|
||||
private SashTypes m_SashType;
|
||||
[JsonProperty]
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public SashTypes SashType
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SashType;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_SashType = value;
|
||||
}
|
||||
}
|
||||
|
||||
private List<JsonJoint> m_JointList = new List<JsonJoint>();
|
||||
[JsonProperty]
|
||||
public List<JsonJoint> JointList
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_JointList;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_JointList = value;
|
||||
}
|
||||
}
|
||||
|
||||
private bool m_bSashBottomRail;
|
||||
[JsonProperty]
|
||||
public bool SashBottomRail
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_bSashBottomRail;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_bSashBottomRail = value;
|
||||
}
|
||||
}
|
||||
|
||||
private int m_nSashBottomRailQty;
|
||||
[JsonProperty]
|
||||
public int SashBottomRailQty
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_nSashBottomRailQty;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_nSashBottomRailQty = value;
|
||||
}
|
||||
}
|
||||
|
||||
private string m_Hardware;
|
||||
[JsonProperty]
|
||||
public string Hardware
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Hardware;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Hardware = value;
|
||||
}
|
||||
}
|
||||
|
||||
public JsonSash() : base(AreaTypes.SASH)
|
||||
{
|
||||
}
|
||||
|
||||
public JsonSash(bool bIsSashVertical, SashTypes SashType, bool SashBottomRail, int SashBottomRailQty/*, string Hardware*/) : base(AreaTypes.SASH)
|
||||
{
|
||||
m_bIsSashVertical = bIsSashVertical;
|
||||
m_SashType = SashType;
|
||||
m_bSashBottomRail = SashBottomRail;
|
||||
m_nSashBottomRailQty = SashBottomRailQty;
|
||||
m_Hardware = Hardware;
|
||||
}
|
||||
|
||||
internal override Area Deserialize(Area ParentArea, Window ParentWindow)
|
||||
{
|
||||
Sash newSash = new Sash(ParentArea, ParentWindow);
|
||||
newSash.SetAreaType(AreaTypes.SASH);
|
||||
newSash.SetSashQty(m_SashList.Count);
|
||||
newSash.SetIsSashVertical(m_bIsSashVertical);
|
||||
newSash.SetSashBottomRail(m_bSashBottomRail);
|
||||
newSash.SetSashBottomRailQty(m_nSashBottomRailQty);
|
||||
//Sash.AppliedDone();
|
||||
for (var SashIndex = 0; SashIndex <= m_SashList.Count - 1; SashIndex++)
|
||||
{
|
||||
newSash.SashList[SashIndex].SetOpeningType(m_SashList[SashIndex].OpeningType);
|
||||
newSash.SashList[SashIndex].SetHasHandle(m_SashList[SashIndex].bHasHandle);
|
||||
newSash.SashList[SashIndex].SetDimension(m_SashList[SashIndex].dDimension);
|
||||
}
|
||||
foreach (var Joint in m_JointList)
|
||||
newSash.JointList.Add(Joint.Deserialize((Area)ParentArea));
|
||||
//Sash.RefreshHardwareList();
|
||||
//Sash.SetSelHardwareFromId(Hardware);
|
||||
foreach (var Area in AreaList)
|
||||
{
|
||||
var AreaDeserealized = Area.Deserialize(newSash, ParentWindow);
|
||||
if (AreaDeserealized != null)
|
||||
{
|
||||
newSash.AreaList.Add(AreaDeserealized);
|
||||
}
|
||||
}
|
||||
return newSash;
|
||||
}
|
||||
}
|
||||
|
||||
public class JsonSplit : JsonArea
|
||||
{
|
||||
private SplitShapes m_SplitShape;
|
||||
[JsonProperty]
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
internal SplitShapes SplitShape
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SplitShape;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_SplitShape = value;
|
||||
}
|
||||
}
|
||||
|
||||
private List<JsonSplitDimension> m_SplitPositionList = new List<JsonSplitDimension>();
|
||||
[JsonProperty]
|
||||
public List<JsonSplitDimension> SplitPositionList
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SplitPositionList;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_SplitPositionList = value;
|
||||
}
|
||||
}
|
||||
|
||||
public JsonSplit() : base(AreaTypes.SPLIT)
|
||||
{
|
||||
}
|
||||
|
||||
public JsonSplit(SplitShapes SplitShape) : base(AreaTypes.SPLIT)
|
||||
{
|
||||
m_SplitShape = SplitShape;
|
||||
}
|
||||
|
||||
internal override Area Deserialize(Area ParentArea, Window ParentWindow)
|
||||
{
|
||||
Split Split = new Split(ParentArea, ParentWindow);
|
||||
Split.SetAreaType(AreaTypes.SPLIT);
|
||||
Split.SetSplitShape(m_SplitShape, true);
|
||||
Split.SetSplitQty(m_SplitPositionList.Count - 1, true);
|
||||
//Split.AppliedDone();
|
||||
for (var SplitIndex = 0; SplitIndex <= m_SplitPositionList.Count - 1; SplitIndex++)
|
||||
{
|
||||
Split.SplitPositionList[SplitIndex].SetIsRelative(m_SplitPositionList[SplitIndex].bIsRelative);
|
||||
Split.SplitPositionList[SplitIndex].SetDimension(m_SplitPositionList[SplitIndex].dDimension);
|
||||
}
|
||||
foreach (var Area in AreaList)
|
||||
{
|
||||
var AreaDeserealized = Area.Deserialize(Split, ParentWindow);
|
||||
if (AreaDeserealized != null)
|
||||
{
|
||||
Split.AreaList.Add(AreaDeserealized);
|
||||
}
|
||||
}
|
||||
return Split;
|
||||
}
|
||||
}
|
||||
|
||||
public class JsonSplitted : JsonArea
|
||||
{
|
||||
public JsonSplitted() : base(AreaTypes.SPLITTED)
|
||||
{
|
||||
}
|
||||
|
||||
internal override Area Deserialize(Area ParentArea, Window ParentWindow)
|
||||
{
|
||||
Splitted Split = new Splitted(ParentArea, ParentWindow);
|
||||
Split.SetAreaType(AreaTypes.SPLITTED);
|
||||
//Split.AppliedDone();
|
||||
foreach (var Area in AreaList)
|
||||
{
|
||||
var AreaDeserealized = Area.Deserialize(Split, ParentWindow);
|
||||
if (AreaDeserealized != null)
|
||||
{
|
||||
Split.AreaList.Add(AreaDeserealized);
|
||||
}
|
||||
}
|
||||
|
||||
return Split;
|
||||
}
|
||||
}
|
||||
|
||||
public class JsonFill : JsonArea
|
||||
{
|
||||
private FillTypes m_FillType;
|
||||
[JsonProperty]
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public FillTypes FillType
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_FillType;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_FillType = value;
|
||||
}
|
||||
}
|
||||
|
||||
public JsonFill() : base(AreaTypes.FILL)
|
||||
{
|
||||
}
|
||||
|
||||
public JsonFill(FillTypes FillType) : base(AreaTypes.FILL)
|
||||
{
|
||||
m_FillType = FillType;
|
||||
}
|
||||
|
||||
internal override Area Deserialize(Area ParentArea, Window ParentWindow)
|
||||
{
|
||||
Fill Fill = new Fill(ParentArea, ParentWindow);
|
||||
Fill.SetAreaType(AreaTypes.FILL);
|
||||
Fill.SetFillType(m_FillType);
|
||||
//Fill.AppliedDone();
|
||||
foreach (var Area in AreaList)
|
||||
{
|
||||
var AreaDeserealized = Area.Deserialize(Fill, ParentWindow);
|
||||
if (AreaDeserealized != null)
|
||||
{
|
||||
Fill.AreaList.Add(AreaDeserealized);
|
||||
}
|
||||
}
|
||||
return Fill;
|
||||
}
|
||||
}
|
||||
|
||||
public class JsonJoint
|
||||
{
|
||||
private int m_nIndex;
|
||||
[JsonProperty]
|
||||
public int nIndex
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_nIndex;
|
||||
}
|
||||
}
|
||||
|
||||
private Joints m_JointType;
|
||||
[JsonProperty]
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public Joints JointType
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_JointType;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_JointType = value;
|
||||
}
|
||||
}
|
||||
|
||||
public JsonJoint(int nIndex, Joints JointType)
|
||||
{
|
||||
m_nIndex = nIndex;
|
||||
m_JointType = JointType;
|
||||
}
|
||||
|
||||
internal Joint Deserialize(Area newArea)
|
||||
{
|
||||
Joint newJoint = new Joint(newArea, m_nIndex, m_JointType);
|
||||
return newJoint;
|
||||
}
|
||||
}
|
||||
|
||||
public class JsonCurve
|
||||
{
|
||||
private GDB_TY m_CurveType;
|
||||
[JsonProperty]
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public GDB_TY CurveType
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_CurveType;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_CurveType = value;
|
||||
}
|
||||
}
|
||||
|
||||
private Point3d m_ptStart;
|
||||
[JsonProperty]
|
||||
public Point3d ptStart
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ptStart;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_ptStart = value;
|
||||
}
|
||||
}
|
||||
|
||||
private Point3d m_ptEnd;
|
||||
[JsonProperty]
|
||||
public Point3d ptEnd
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ptEnd;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_ptEnd = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class JsonFrameDimension
|
||||
{
|
||||
private int m_nIndex;
|
||||
[JsonProperty]
|
||||
public int nIndex
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_nIndex;
|
||||
}
|
||||
}
|
||||
|
||||
private string m_sName;
|
||||
[JsonProperty]
|
||||
public string sName
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_sName;
|
||||
}
|
||||
}
|
||||
|
||||
private double m_dValue;
|
||||
[JsonProperty]
|
||||
public double dValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_dValue;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_dValue = value;
|
||||
}
|
||||
}
|
||||
|
||||
public JsonFrameDimension(int nIndex, string sName, double dValue)
|
||||
{
|
||||
m_nIndex = nIndex;
|
||||
m_sName = sName;
|
||||
m_dValue = dValue;
|
||||
}
|
||||
}
|
||||
|
||||
public class JsonSashDimension
|
||||
{
|
||||
private Openings m_OpeningType;
|
||||
[JsonProperty]
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public Openings OpeningType
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_OpeningType;
|
||||
}
|
||||
}
|
||||
|
||||
private bool m_bHasHandle;
|
||||
[JsonProperty]
|
||||
public bool bHasHandle
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_bHasHandle;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_bHasHandle = value;
|
||||
}
|
||||
}
|
||||
|
||||
private double m_dDimension;
|
||||
[JsonProperty]
|
||||
public double dDimension
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_dDimension;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_dDimension = value;
|
||||
}
|
||||
}
|
||||
|
||||
public JsonSashDimension(Openings OpeningType, bool bHasHandle, double dDimension)
|
||||
{
|
||||
m_OpeningType = OpeningType;
|
||||
m_bHasHandle = bHasHandle;
|
||||
m_dDimension = dDimension;
|
||||
}
|
||||
}
|
||||
|
||||
public class JsonSplitDimension
|
||||
{
|
||||
private bool m_bIsRelative = false;
|
||||
[JsonProperty]
|
||||
public bool bIsRelative
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_bIsRelative;
|
||||
}
|
||||
}
|
||||
|
||||
private double m_dDimension;
|
||||
[JsonProperty]
|
||||
public double dDimension
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_dDimension;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_dDimension = value;
|
||||
}
|
||||
}
|
||||
|
||||
public JsonSplitDimension(bool bIsRelative, double dDimension)
|
||||
{
|
||||
m_bIsRelative = bIsRelative;
|
||||
m_dDimension = dDimension;
|
||||
}
|
||||
}
|
||||
|
||||
public class PolymorphicJsonConverter : JsonConverter
|
||||
{
|
||||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
|
||||
{
|
||||
// disambiguo il tipo JsonArea grazie al capo AreaType nelle classi giuste, e le popolo di dati
|
||||
JObject item = JObject.Load(reader);
|
||||
var RawType = (string?)item["AreaType"];
|
||||
AreaTypes Type = AreaTypes.NULL;
|
||||
Enum.TryParse<AreaTypes>(RawType, out Type);
|
||||
JsonArea JsonArea = null;
|
||||
switch (Type)
|
||||
{
|
||||
case AreaTypes.FRAME:
|
||||
{
|
||||
JsonArea = new JsonFrame();
|
||||
break;
|
||||
}
|
||||
|
||||
case AreaTypes.SASH:
|
||||
{
|
||||
JsonArea = new JsonSash();
|
||||
break;
|
||||
}
|
||||
|
||||
case AreaTypes.FILL:
|
||||
{
|
||||
JsonArea = new JsonFill();
|
||||
break;
|
||||
}
|
||||
|
||||
case AreaTypes.SPLIT:
|
||||
{
|
||||
JsonArea = new JsonSplit();
|
||||
break;
|
||||
}
|
||||
|
||||
case AreaTypes.SPLITTED:
|
||||
{
|
||||
JsonArea = new JsonSplitted();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!Information.IsNothing(JsonArea))
|
||||
{
|
||||
serializer.Populate(item.CreateReader(), JsonArea);
|
||||
return JsonArea;
|
||||
}
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override bool CanConvert(Type objectType)
|
||||
{
|
||||
// gestisco solo i tipi dericati da JsonArea
|
||||
return typeof(JsonArea).IsAssignableFrom(objectType);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebWindowConfigurator.Json
|
||||
{
|
||||
public static class WindowConst
|
||||
{
|
||||
public enum AreaTypes
|
||||
{
|
||||
NULL = 0,
|
||||
FRAME = 1,
|
||||
SASH = 2,
|
||||
FILL = 3,
|
||||
SPLIT = 4,
|
||||
SPLITTED = 5
|
||||
}
|
||||
|
||||
public enum FillTypes
|
||||
{
|
||||
NULL = 0,
|
||||
GLASS = 1,
|
||||
WOOD = 2
|
||||
}
|
||||
|
||||
public enum Shapes : int
|
||||
{
|
||||
RECTANGLE = 1,
|
||||
RIGHTCHAMFER = 2,
|
||||
LEFTCHAMFER = 3,
|
||||
DOUBLECHAMFER = 4,
|
||||
ARC = 11,
|
||||
ARC_FULL = 12,
|
||||
FILLET = 13,
|
||||
DOUBLEARC = 14,
|
||||
TRIANGLE = 21,
|
||||
CUSTOM = 100
|
||||
}
|
||||
|
||||
public enum SplitShapes : int
|
||||
{
|
||||
NULL = 0,
|
||||
VERTICAL = 1,
|
||||
HORIZONTAL = 2,
|
||||
GRID = 3,
|
||||
CUSTOM = 100
|
||||
}
|
||||
|
||||
public enum Joints : int
|
||||
{
|
||||
ANGLED = 1,
|
||||
FULL_H = 2,
|
||||
FULL_V = 3
|
||||
}
|
||||
|
||||
public enum SashTypes : int
|
||||
{
|
||||
NULL = 0,
|
||||
ACTIVE = 1,
|
||||
INACTIVE = 2,
|
||||
ACTIVE_IN = 3,
|
||||
ACTIVE_OUT = 4,
|
||||
INACTIVE_IN = 5,
|
||||
INACTIVE_OUT = 6
|
||||
}
|
||||
|
||||
public enum Openings : int
|
||||
{
|
||||
NULL = 0,
|
||||
TURNONLY_LEFT = 1,
|
||||
TURNONLY_RIGHT = 2,
|
||||
TILTTURN_LEFT = 3,
|
||||
TILTTURN_RIGHT = 4,
|
||||
TILTONLY_TOP = 5,
|
||||
TILTONLY_BOTTOM = 6,
|
||||
PIVOT = 7,
|
||||
FIXED = 8,
|
||||
COMPLANARSLIDE_LEFT = 9,
|
||||
COMPLANARSLIDE_RIGHT = 10,
|
||||
LIFTSLIDE_LEFT = 11,
|
||||
LIFTSLIDE_RIGHT = 12
|
||||
}
|
||||
|
||||
public enum OpeningTypes : int
|
||||
{
|
||||
NULL = 0,
|
||||
TURNONLY = 1,
|
||||
TILTTURN = 2,
|
||||
TILTONLY = 3,
|
||||
PIVOT = 4,
|
||||
FIXED = 5,
|
||||
COMPLANARSLIDE = 6,
|
||||
LIFTSLIDE = 7
|
||||
}
|
||||
|
||||
public enum OpeningSides : int
|
||||
{
|
||||
NULL = 0,
|
||||
LEFT = 1,
|
||||
RIGHT = 2
|
||||
}
|
||||
|
||||
public enum OrientationSash : int
|
||||
{
|
||||
NULL = 0,
|
||||
VERTICAL = 1,
|
||||
HORIZONTAL = 2
|
||||
}
|
||||
|
||||
public enum GDB_TY
|
||||
{
|
||||
NONE = 0,
|
||||
GROUP = 2,
|
||||
GEO_VECTOR = 128,
|
||||
GEO_POINT = 129,
|
||||
GEO_FRAME = 130,
|
||||
CRV_LINE = 256,
|
||||
CRV_ARC = 257,
|
||||
CRV_BEZ = 258,
|
||||
CRV_COMPO = 259,
|
||||
SRF_MESH = 512,
|
||||
SRF_FRGN = 513,
|
||||
SRF_BEZ = 514,
|
||||
VOL_ZMAP = 1024,
|
||||
EXT_TEXT = 2048,
|
||||
EXT_DIMENSION = 2049
|
||||
}
|
||||
|
||||
public enum GDB_ID
|
||||
{
|
||||
ROOT = 0,
|
||||
NULL = -1,
|
||||
SEL = -2,
|
||||
GRID = -3,
|
||||
CURRPART = -4,
|
||||
CURRLAYER = -5,
|
||||
SELPART = -6,
|
||||
SELLAYER = -7
|
||||
}
|
||||
|
||||
// Specifies the display state of an element.
|
||||
public enum Visibility
|
||||
{
|
||||
// Display the element.
|
||||
VISIBLE,
|
||||
// Do not display the element, but reserve space for the element in layout.
|
||||
HIDDEN,
|
||||
// Do not display the element, and do not reserve space for it in layout.
|
||||
COLLAPSED
|
||||
}
|
||||
|
||||
//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;
|
||||
|
||||
public double y;
|
||||
|
||||
public double z;
|
||||
|
||||
public Point3d(double dX, double dY, double dZ)
|
||||
{
|
||||
this = default(Point3d);
|
||||
x = dX;
|
||||
y = dY;
|
||||
z = dZ;
|
||||
}
|
||||
|
||||
public Point3d(ref Point3d PtP)
|
||||
{
|
||||
this = default(Point3d);
|
||||
x = PtP.x;
|
||||
y = PtP.y;
|
||||
z = PtP.z;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return x.ToString("F3", CultureInfo.InvariantCulture) + "," + y.ToString("F3", CultureInfo.InvariantCulture) + "," + z.ToString("F3", CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
public static Point3d ORIG()
|
||||
{
|
||||
return new Point3d(0.0, 0.0, 0.0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebWindowConfigurator
|
||||
{
|
||||
public class Template
|
||||
{
|
||||
private int m_nIndex;
|
||||
public int nIndex
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_nIndex;
|
||||
}
|
||||
}
|
||||
|
||||
public string sDescription { get; set; } = "";
|
||||
|
||||
private string m_JWD;
|
||||
public string JWD
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_JWD;
|
||||
}
|
||||
}
|
||||
|
||||
private string m_SVG;
|
||||
public string SVG
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SVG;
|
||||
}
|
||||
}
|
||||
|
||||
public Template(int nIndex, string sDescription, string SVG, string JWD)
|
||||
{
|
||||
m_nIndex = nIndex;
|
||||
this.sDescription = sDescription;
|
||||
m_SVG = SVG;
|
||||
m_JWD = JWD;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>2.7.8.809</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione JWD per LUX</Description>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Remove="compilerconfig.json" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="compilerconfig.json" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<SupportedPlatform Include="browser" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="EgwCoreLib.Razor" Version="1.5.2507.1815" />
|
||||
<PackageReference Include="EgwCoreLib.Utils" Version="1.5.2507.1815" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.17" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Exec Command="powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\post-build.ps1 -ProjectPath $(ProjectPath)" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,320 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="@mainCss">
|
||||
<div class="card text-center table-svg">
|
||||
<div class="card-header" style="background-color: #d5f1f2;">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
<li class="nav-item">
|
||||
@if (currStep == CompileStep.Template)
|
||||
{
|
||||
<a data-target="#Template" class="nav-link active fw-bold" aria-current="true" @onclick="() => AdvStep(CompileStep.Template)">Template</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<a data-target="#Template" class="nav-link text-secondary" @onclick="() => AdvStep(CompileStep.Template)">Template</a>
|
||||
}
|
||||
</li>
|
||||
@if (SelTemplateDTO != null)
|
||||
{
|
||||
<li class="nav-item">
|
||||
<a data-target="#Frame" class="@tabNavCss(CompileStep.Frame)" aria-current="true" @onclick="() => DoSelectAndPreview(CompileStep.Frame)">Frame</a>
|
||||
</li>
|
||||
@if ( m_SplitList.Count > 0)
|
||||
{
|
||||
<li class="nav-item">
|
||||
<a data-target="#Split" class="@tabNavCss(CompileStep.Split)" aria-current="true" @onclick="() => DoSelectAndPreview(CompileStep.Split)">Split</a>
|
||||
</li>
|
||||
}
|
||||
@if(m_SashList.Count > 0)
|
||||
{
|
||||
<li class="nav-item">
|
||||
<a data-target="#Sash" class="@tabNavCss(CompileStep.Sash)" aria-current="true" @onclick="() => DoSelectAndPreview(CompileStep.Sash)">Sash</a>
|
||||
</li>
|
||||
}
|
||||
<li class="nav-item">
|
||||
<a data-target="#Fill" class="@tabNavCss(CompileStep.Fill)" aria-current="true" @onclick="() => DoSelectAndPreview(CompileStep.Fill)">Fill</a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-6 d-grid gap-2 d-md-flex justify-content-md-end">
|
||||
<button class="btn btn-lg btn-primary btn-sm" @onclick="DoSave">Save</button>
|
||||
<button class="btn btn-lg btn-primary btn-sm" @onclick="DoPreviewSvg">Preview Svg</button>
|
||||
<button class="btn btn-lg btn-primary btn-sm" @onclick="DoClose">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body bg-transparent">
|
||||
<div class="alert alert-light text-center display-4">
|
||||
@if (currStep == CompileStep.Template)
|
||||
{
|
||||
<table class="table table-hover align-middle">
|
||||
<thead class="table-light fs-5">
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col" class="col-4">Image</th>
|
||||
<th scope="col" class="text-start">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="table-group-divider fs-5">
|
||||
@foreach (var item in IN_TemplateDTOList)
|
||||
{
|
||||
string colorClass = "";
|
||||
@if (SelTemplateDTO != null && item.Index == SelTemplateDTO.Index)
|
||||
colorClass = "table-success";
|
||||
else
|
||||
colorClass = "";
|
||||
<tr style="height: 150px;" class="@colorClass" @onclick="() => DoSelect(item)">
|
||||
<td>@item.Index</td>
|
||||
<td><img class="img-fluid" width="100" src="@item.ImageUrl" /></td>
|
||||
<td class="text-start">@item.Description</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
@*<button class="btn btn-sm btn-primary" title="Reset selezione" @onclick="DoReset"><i class="fa-solid fa-arrow-rotate-right"></i></button> *@
|
||||
}
|
||||
else if (currStep == CompileStep.Frame)
|
||||
{
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="alert alert-light text-start p-1 display-4 w-50">
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="FrameShape">Shape</label>
|
||||
<select class="form-select" @bind="@m_Frame.SelShapeIndex">
|
||||
<option value="0">Rectangle</option>
|
||||
<option value="1">Right Chamfer</option>
|
||||
<option value="2">Left Chamfer</option>
|
||||
<option value="3">Double Chamfer</option>
|
||||
<option value="4">Arc</option>
|
||||
<option value="5">Arc Full</option>
|
||||
<option value="6">Double Arc</option>
|
||||
<option value="7">Triangle</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<h5 class="card-title">Dimension</h5>
|
||||
@foreach (FrameDimension dimension in m_Frame.DimensionList)
|
||||
{
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="IndexDimFrame">@dimension.nIndex</span>
|
||||
<span class="input-group-text" id="NameDimFrame">@dimension.sName</span>
|
||||
<input type="number" class="form-control" aria-label="@dimension.dValue" @bind="@dimension.dValue">
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<h5 class="card-title">Joints frame</h5>
|
||||
@foreach (Joint joint in m_Frame.JointList)
|
||||
{
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="IndexJoint">@joint.nIndex</label>
|
||||
<select class="form-select" @bind="@joint.SelJointTypeIndex">
|
||||
<option value="0">Angled</option>
|
||||
<option value="1">Full H</option>
|
||||
<option value="2">Full V</option>
|
||||
</select>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@if (m_SashList.Count == 0)
|
||||
{
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<h5 class="card-title">Bottom rail</h5>
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="BottomRailQty">Quantity</span>
|
||||
<input type="number" class="form-control" aria-label="BottomRailQty" @bind="@m_Frame.BottomRailQty">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else if (currStep == CompileStep.Split)
|
||||
{
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="alert alert-light text-start p-1 display-4 w-50">
|
||||
@foreach (var item in SplitList)
|
||||
{
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="basic-addon1Split">Number</span>
|
||||
<input type="number" class="form-control" placeholder="0" aria-label="basic-addon1Split" @bind="@item.nSplitQty">
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="basic-addon2Split">Shape</label>
|
||||
<select class="form-select" @bind="@item.SelSplitShapeIndex">
|
||||
<option value="0">Vertical</option>
|
||||
<option value="1">Horizontal</option>
|
||||
<option value="2">Grid</option>
|
||||
<option value="3">Custom</option>
|
||||
</select>
|
||||
</div>
|
||||
@foreach (var dim in item.SplitPositionList)
|
||||
{
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="basic-addon3Split">Altezza area inferiore</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>
|
||||
}
|
||||
else if (currStep == CompileStep.Sash)
|
||||
{
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="alert alert-light text-start p-1 display-4 w-50">
|
||||
@foreach (var item in SashList)
|
||||
{
|
||||
<div class="input-group mb-2">
|
||||
<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="card-body py-2">
|
||||
<h5 class="card-title">Orientation</h5>
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="OrientationSash">Tipology</label>
|
||||
<select class="form-select" @bind="@item.SelOrientationSashTypeIndex">
|
||||
<option value="0">Vertical</option>
|
||||
<option value="1">Horizontal</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
<div class="px-2">
|
||||
<label class="form-check-label fs-6 text-dark" for="HandleSashLabel">Handle</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<h5 class="card-title">Sash joints</h5>
|
||||
@foreach (Joint joint in item.JointList)
|
||||
{
|
||||
<div class="input-group mb-2">
|
||||
<label class="input-group-text" for="IndexJoint">@joint.nIndex</label>
|
||||
<select class="form-select" @bind="@joint.SelJointTypeIndex">
|
||||
<option value="0">Angled</option>
|
||||
<option value="1">Full H</option>
|
||||
<option value="2">Full V</option>
|
||||
</select>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
<h5 class="card-title">Bottom rail</h5>
|
||||
<div class="input-group mb-2">
|
||||
<span class="input-group-text" id="BottomRailQty">Quantity</span>
|
||||
<input type="number" class="form-control" aria-label="BottomRailQty" @bind="@item.SashBottomRailQty">
|
||||
</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>
|
||||
}
|
||||
else if (currStep == CompileStep.Fill)
|
||||
{
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="alert alert-light text-start p-1 display-4 w-50">
|
||||
@foreach (var Fill in FillList)
|
||||
{
|
||||
<div class="border mb-2">
|
||||
<div class="card-body py-2">
|
||||
@if(FillList.Count == 1)
|
||||
{
|
||||
<h5 class="card-title">Fill</h5>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h5 class="card-title">Fill @(FillList.IndexOf(Fill) + 1)</h5>
|
||||
}
|
||||
<div class="input-group mb-2">
|
||||
<select class="form-select" @bind="@Fill.SelFillTypeIndex">
|
||||
<option value="0">Glass</option>
|
||||
<option value="1">Wood</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if (SelTemplateDTO != null && currStep != CompileStep.Template)
|
||||
{
|
||||
<div class="col-6">
|
||||
@outSvg
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -0,0 +1,274 @@
|
||||
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;
|
||||
|
||||
namespace WebWindowConfigurator
|
||||
{
|
||||
public partial class WebWindowMaker : IDisposable
|
||||
{
|
||||
public void Dispose()
|
||||
{
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
m_CurrWindow.OnPreview -= M_CurrWindow_OnPreview;
|
||||
m_CurrWindow = null;
|
||||
}
|
||||
}
|
||||
|
||||
#region Public Properties
|
||||
|
||||
[Parameter]
|
||||
public string CssSvg { get; set; } = "responsive-svg";
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<bool> EC_OnClose { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<TemplateSelectDTO> EC_OnSelectedTemplate { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<string> EC_OnUpdate { get; set; }
|
||||
|
||||
public List<Fill> FillList
|
||||
{
|
||||
get => m_FillList;
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public Template IN_SelTemplate
|
||||
{
|
||||
get => m_SelTemplate;
|
||||
set
|
||||
{
|
||||
if (value != null && (m_SelTemplate == null || (m_SelTemplate != null && value.nIndex != m_SelTemplate.nIndex)) && !string.IsNullOrEmpty(value.JWD))
|
||||
{
|
||||
m_SelTemplate = value;
|
||||
JsonWindow WindowFromJson = JsonConvert.DeserializeObject<JsonWindow>(m_SelTemplate.JWD, new PolymorphicJsonConverter()) ?? new JsonWindow("");
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
m_CurrWindow.OnPreview -= M_CurrWindow_OnPreview;
|
||||
m_CurrWindow = null;
|
||||
}
|
||||
m_CurrWindow = WindowFromJson.Deserialize();
|
||||
m_CurrWindow.OnPreview += M_CurrWindow_OnPreview;
|
||||
m_FillList = new List<Fill>();
|
||||
m_SashList = new List<Sash>();
|
||||
m_SplitList = new List<Split>();
|
||||
SearchInAreaList(m_CurrWindow.AreaList[0]);
|
||||
m_SelSVG = m_SelTemplate.SVG;
|
||||
}
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
m_FillList = new List<Fill>();
|
||||
m_SashList = new List<Sash>();
|
||||
m_SplitList = new List<Split>();
|
||||
SearchInAreaList(m_CurrWindow.AreaList[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public List<TemplateSelectDTO> IN_TemplateDTOList { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public string LiveSVG
|
||||
{
|
||||
get => m_SelSVG;
|
||||
set => m_SelSVG = value;
|
||||
}
|
||||
|
||||
public List<Sash> SashList
|
||||
{
|
||||
get => m_SashList;
|
||||
}
|
||||
|
||||
public TemplateSelectDTO? SelTemplateDTO { get; set; } = null;
|
||||
|
||||
public List<Split> SplitList
|
||||
{
|
||||
get => m_SplitList;
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public void SearchInAreaList(Area node)
|
||||
{
|
||||
if (node != null)
|
||||
{
|
||||
switch (node.AreaType)
|
||||
{
|
||||
case AreaTypes.FRAME:
|
||||
{
|
||||
m_Frame = (Frame)node;
|
||||
break;
|
||||
}
|
||||
case AreaTypes.SASH:
|
||||
{
|
||||
m_SashList.Add((Sash)node);
|
||||
break;
|
||||
}
|
||||
case AreaTypes.FILL:
|
||||
{
|
||||
m_FillList.Add((Fill)node);
|
||||
break;
|
||||
}
|
||||
case AreaTypes.SPLIT:
|
||||
{
|
||||
m_SplitList.Add((Split)node);
|
||||
break;
|
||||
}
|
||||
}
|
||||
foreach (var item in node.AreaList)
|
||||
{
|
||||
SearchInAreaList(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Enums
|
||||
|
||||
protected enum CompileStep
|
||||
{
|
||||
Template = 0,
|
||||
Frame = 1,
|
||||
Split,
|
||||
Sash,
|
||||
Fill
|
||||
}
|
||||
|
||||
#endregion Protected Enums
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected Frame Frame
|
||||
{
|
||||
get => m_Frame;
|
||||
set => m_Frame = value;
|
||||
}
|
||||
|
||||
protected string m_SelSVG { get; set; } = "";
|
||||
|
||||
/// <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;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected async Task DoSave()
|
||||
{
|
||||
//manca salvataggio JWD
|
||||
await EC_OnClose.InvokeAsync(true);
|
||||
}
|
||||
|
||||
protected async Task DoClose()
|
||||
{
|
||||
await EC_OnClose.InvokeAsync(true);
|
||||
}
|
||||
|
||||
#if false
|
||||
protected void DoUpdatePreview(object sender, OnPreviewEventArgs e)
|
||||
{
|
||||
EC_OnUpdate.InvokeAsync(e.sJwd);
|
||||
var CurrJwd = JsonConvert.SerializeObject(m_CurrWindow.Serialize(), Formatting.Indented);
|
||||
EC_OnUpdate.InvokeAsync(CurrJwd);
|
||||
}
|
||||
#endif
|
||||
|
||||
protected async Task DoPreviewSvg()
|
||||
{
|
||||
var CurrJwd = JsonConvert.SerializeObject(m_CurrWindow.Serialize(), Formatting.Indented);
|
||||
await EC_OnUpdate.InvokeAsync(CurrJwd);
|
||||
}
|
||||
|
||||
protected async void DoSelect(TemplateSelectDTO newSel)
|
||||
{
|
||||
SelTemplateDTO = newSel;
|
||||
await EC_OnSelectedTemplate.InvokeAsync(newSel);
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
protected async void DoSelectAndPreview(CompileStep newStep)
|
||||
{
|
||||
currStep = newStep;
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
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>();
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private Window? m_CurrWindow { get; set; } = null;
|
||||
//private Window m_CurrWindow { get; set; } = new Window();
|
||||
|
||||
private Template m_SelTemplate { get; set; } = null!;
|
||||
|
||||
private string mainCss
|
||||
{
|
||||
get => (SelTemplateDTO != null && currStep != CompileStep.Template) ? "col-6" : "col-12";
|
||||
}
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void AdvStep(CompileStep newStep)
|
||||
{
|
||||
currStep = newStep;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calcola il css del tab selezionato
|
||||
/// </summary>
|
||||
/// <param name="testStep"></param>
|
||||
/// <returns></returns>
|
||||
private string tabNavCss(CompileStep testStep)
|
||||
{
|
||||
return testStep.Equals(currStep) ? "nav-link active fw-bold" : "nav-link text-secondary";
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
.my-component {
|
||||
border: 2px dashed red;
|
||||
padding: 1em;
|
||||
margin: 1em 0;
|
||||
background-image: url('background.png');
|
||||
}
|
||||
|
||||
|
||||
/* gestione SVG responsive */
|
||||
.responsive-svg {
|
||||
/* SVG scala a fit del container */
|
||||
width: 100%;
|
||||
/* Altezza massima in rem (caratteri) */
|
||||
height: 40rem;
|
||||
/* Removes extra space below SVG */
|
||||
display: block;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
@@ -0,0 +1,6 @@
|
||||
[
|
||||
{
|
||||
"outputFile": "WebWindowMaker.razor.css",
|
||||
"inputFile": "WebWindowMaker.razor.less"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"compilers": {
|
||||
"less": {
|
||||
"autoPrefix": "",
|
||||
"cssComb": "none",
|
||||
"ieCompat": true,
|
||||
"math": null,
|
||||
"strictMath": false,
|
||||
"strictUnits": false,
|
||||
"relativeUrls": true,
|
||||
"rootPath": "",
|
||||
"sourceMapRoot": "",
|
||||
"sourceMapBasePath": "",
|
||||
"sourceMap": false
|
||||
},
|
||||
"sass": {
|
||||
"autoPrefix": "",
|
||||
"loadPaths": "",
|
||||
"style": "expanded",
|
||||
"relativeUrls": true,
|
||||
"sourceMap": false
|
||||
},
|
||||
"stylus": {
|
||||
"sourceMap": false
|
||||
},
|
||||
"babel": {
|
||||
"sourceMap": false
|
||||
},
|
||||
"coffeescript": {
|
||||
"bare": false,
|
||||
"runtimeMode": "node",
|
||||
"sourceMap": false
|
||||
},
|
||||
"handlebars": {
|
||||
"root": "",
|
||||
"noBOM": false,
|
||||
"name": "",
|
||||
"namespace": "",
|
||||
"knownHelpersOnly": false,
|
||||
"forcePartial": false,
|
||||
"knownHelpers": [],
|
||||
"commonjs": "",
|
||||
"amd": false,
|
||||
"sourceMap": false
|
||||
}
|
||||
},
|
||||
"minifiers": {
|
||||
"css": {
|
||||
"enabled": true,
|
||||
"termSemicolons": true,
|
||||
"gzip": false
|
||||
},
|
||||
"javascript": {
|
||||
"enabled": true,
|
||||
"termSemicolons": true,
|
||||
"gzip": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
param([string]$ProjectPath);
|
||||
|
||||
|
||||
# Gestione calcolata numero Versione del componente: Major/Minor da gestire a mano, Rel e Build ricalcolate in compilazione
|
||||
|
||||
echo "Modifica dati versione pacchetto nuget"
|
||||
$fileContent = Get-Content $ProjectPath -Raw;
|
||||
$pattern = '(?i)<Version>\s*(.*?)\s*</Version>'
|
||||
$vers = if ($fileContent -match $pattern) { $matches[1] } else { $null }
|
||||
echo "Versione corrente: $vers"
|
||||
# calcolo Rel e Build...
|
||||
$Release = (Get-Date).Month;
|
||||
$Build = get-date -format dHH;
|
||||
$parts = $vers -split '\.'
|
||||
#$newVers = "$parts[0].$parts[1].$Release.$Build"
|
||||
$newParts = @($parts[0], $parts[1], $Release, $Build)
|
||||
$newVers = $newParts -join '.'
|
||||
echo "Versione calcolata: $newVers"
|
||||
$findVers = "<Version>(.|\n)*?</Version>";
|
||||
$replVers = "<Version>" + $newVers + "</Version>";
|
||||
$newContent = $fileContent -replace $findVers, $replVers;
|
||||
Set-Content -Path $ProjectPath -Value $newContent;
|
||||
echo "Modifica dati file progetto x nuspec completata su file $ProjectPath"
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 378 B |
@@ -0,0 +1,6 @@
|
||||
// This is a JavaScript module that is loaded on demand. It can export any number of
|
||||
// functions, and may import other JavaScript modules if required.
|
||||
|
||||
export function showPrompt(message) {
|
||||
return prompt(message, 'Type anything here');
|
||||
}
|
||||
Reference in New Issue
Block a user