Cambio metodo calcolo colonne x sel parametri da plottare

This commit is contained in:
Samuele Locatelli
2022-03-16 17:18:34 +01:00
parent f7f9ace8de
commit a8ca83d07a
2 changed files with 33 additions and 36 deletions
+1 -16
View File
@@ -24,22 +24,7 @@
else
{
<div class="row">
@if (selParams.Count == 1)
{
pcss = "col-12";
}
else
{
@if (selParams.Count <= 4)
{
pcss = "col-6";
}
else
{
pcss = "col-4";
}
}
@foreach (var item in selParams)
{
<div class="@pcss">
+32 -20
View File
@@ -1,31 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
using System.Net.Http;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.AspNetCore.Components.Forms;
using Microsoft.AspNetCore.Components.Routing;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.Web.Virtualization;
using Microsoft.JSInterop;
using MP.MONO.UI;
using MP.MONO.UI.Shared;
using MP.MONO.UI.Components;
namespace MP.MONO.UI.Pages
{
public partial class Parameters
{
#region Protected Properties
protected List<string> selParams { get; set; } = new List<string>();
protected void resetSel()
#endregion Protected Properties
#region Public Properties
public string pcss
{
selParams = new List<string>();
get
{
string answ = "col-12";
int numPar = selParams.Count;
if (numPar > 4)
{
answ = "col-4";
}
else if (numPar > 2)
{
answ = "col-6";
}
return answ;
}
}
public string pcss = "0";
#endregion Public Properties
#region Protected Methods
protected void paramSelected(string paramName)
{
@@ -34,5 +39,12 @@ namespace MP.MONO.UI.Pages
selParams.Add(paramName);
}
}
protected void resetSel()
{
selParams = new List<string>();
}
#endregion Protected Methods
}
}