Cambio metodo calcolo colonne x sel parametri da plottare
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user