28 lines
718 B
C#
28 lines
718 B
C#
using Microsoft.AspNetCore.Components;
|
|
using MP.MONO.Core.DTO;
|
|
|
|
namespace MP.MONO.UI.Components
|
|
{
|
|
public partial class DisplayRecordComponent
|
|
{
|
|
#region Public Properties
|
|
|
|
[Parameter]
|
|
public DisplayDataDTO? currRecord { get; set; } = null;
|
|
|
|
#endregion Public Properties
|
|
|
|
#region Protected Methods
|
|
|
|
protected string percProgress(double num, double minVal, double maxVal)
|
|
{
|
|
string answ = "width: 0%;";
|
|
double den = (maxVal - minVal) != 0 ? (maxVal - minVal) : 1;
|
|
double ratio = ((double)num) / den;
|
|
answ = $"width: {ratio:P0};";
|
|
return answ;
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
}
|
|
} |