diff --git a/MP.MONO.UI/Components/ParamPlot.razor b/MP.MONO.UI/Components/ParamPlot.razor index eae6475..0f9a2c9 100644 --- a/MP.MONO.UI/Components/ParamPlot.razor +++ b/MP.MONO.UI/Components/ParamPlot.razor @@ -7,10 +7,12 @@ @inject CurrentDataService MMDataService -
-
- @SelectedParam - @(LevelVal.Count) rec -
+
+
+ @SelectedParam +
+
+
- @*@if (showParam) + @if (showParam) { -
- Num Val Sample sec time -
- }*@ + + Num Rec + + Sample Sec Time + + + } +
+ @*@if (showParam) + { +
+ Num Val Sample sec time +
+ }*@
-
+
+
+
@if (LevelVal == null || LevelVal.Count == 0) { } else { - + }
diff --git a/MP.MONO.UI/Components/ParamPlot.razor.cs b/MP.MONO.UI/Components/ParamPlot.razor.cs index 7f63724..9e57b0e 100644 --- a/MP.MONO.UI/Components/ParamPlot.razor.cs +++ b/MP.MONO.UI/Components/ParamPlot.razor.cs @@ -15,6 +15,8 @@ namespace MP.MONO.UI.Components protected int sampleSecMin = 1; + private List? ListRecords { get; set; } = null; + //protected string cssSel(string ParamName) //{ // string answ = ParamName == SelVal ? "fa-solid fa-chevron-right" : ""; @@ -79,6 +81,10 @@ namespace MP.MONO.UI.Components showParam = !showParam; } + protected string? MinVal { get; set; } = null; + + protected string? MaxVal { get; set; } = null; + //private int inputValue = 123; private void ParametersPipe_EA_NewMessage(object? sender, EventArgs e) { @@ -95,6 +101,11 @@ namespace MP.MONO.UI.Components if (ListRecords != null) { var newData = ListRecords.Where(x => x.Title == SelectedParam).FirstOrDefault(); + if (string.IsNullOrEmpty(MinVal) || string.IsNullOrEmpty(MaxVal)) + { + MinVal = $"{newData.MinVal:N0}" ; + MaxVal = $"{newData.MaxVal:N0}"; + } // lo accodo if (newData != null) { diff --git a/MP.MONO.UI/Pages/Parameters.razor b/MP.MONO.UI/Pages/Parameters.razor index d4fb75e..2288553 100644 --- a/MP.MONO.UI/Pages/Parameters.razor +++ b/MP.MONO.UI/Pages/Parameters.razor @@ -36,14 +36,4 @@ -@code { - protected string selParam { get; set; } = ""; - protected void resetSel() - { - selParam = ""; - } - protected void paramSelected(string paramName) - { - selParam = paramName; - } -} + diff --git a/MP.MONO.UI/Pages/Parameters.razor.cs b/MP.MONO.UI/Pages/Parameters.razor.cs new file mode 100644 index 0000000..15a37f1 --- /dev/null +++ b/MP.MONO.UI/Pages/Parameters.razor.cs @@ -0,0 +1,33 @@ +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 + { + protected string selParam { get; set; } = ""; + protected void resetSel() + { + selParam = ""; + } + + protected void paramSelected(string paramName) + { + selParam = paramName; + } + } +} \ No newline at end of file