fix calcolo percentuali progress bar
This commit is contained in:
@@ -16,9 +16,9 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<div>
|
||||
<b><span class="class= @cssLast(@currRecord.Title)">@currRecord.Title</span></b>
|
||||
<div class="col-6 pl-0 float-end">
|
||||
<div class="d-flex justify-content-between">
|
||||
<b><span class="@cssLast(@currRecord.Title) small">@currRecord.Title</span></b>
|
||||
<div class="pl-0 float-end">
|
||||
<div class="d-flex flex-column">
|
||||
<div class="d-flex flex-row-reverse "><span class="float-end"><b>@currRecord.Value</b></span></div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using MP.MONO.Core.DTO;
|
||||
using System.Diagnostics.Tracing;
|
||||
|
||||
namespace MP.MONO.UI.Components
|
||||
{
|
||||
@@ -19,9 +20,13 @@ namespace MP.MONO.UI.Components
|
||||
protected string percProgress(double num, double minVal, double maxVal)
|
||||
{
|
||||
string answ = "width: 0%;";
|
||||
#if false
|
||||
double den = (maxVal - minVal) != 0 ? (maxVal - minVal) : 1;
|
||||
double ratio = ((double)num) / den;
|
||||
answ = $"width: {ratio:P0};";
|
||||
double ratio = ((double)num) / den;
|
||||
#endif
|
||||
|
||||
int perc = (int)Math.Round(num,2);
|
||||
answ = $"width: {perc}%;";
|
||||
return answ;
|
||||
}
|
||||
protected string cssLast(string toolName)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Platforms>AnyCPU;x86;x64</Platforms>
|
||||
<Version>1.2.2210.318</Version>
|
||||
<Version>1.2.2210.408</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>MAPO-MONO</i>
|
||||
<h4>Version: 1.2.2210.318</h4>
|
||||
<h4>Version: 1.2.2210.408</h4>
|
||||
<br /> Release Note:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.2.2210.318
|
||||
1.2.2210.408
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.2.2210.318</version>
|
||||
<version>1.2.2210.408</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/MP.MONO.UI/stable/LAST/MP.Mon.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/MP.MONO.UI/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user