127 lines
2.9 KiB
C#
127 lines
2.9 KiB
C#
namespace MP.MONO.UI.Pages
|
|
{
|
|
public partial class Tools
|
|
{
|
|
//protected List<string> selParams { get; set; } = new List<string>();
|
|
#region Private Fields
|
|
|
|
private int maxRecord = 120;
|
|
private bool showParam = false;
|
|
|
|
private DateTime DateFrom
|
|
{
|
|
get => SelFilter.DtStart;
|
|
set => SelFilter.DtStart = value;
|
|
}
|
|
private DateTime DateTo
|
|
{
|
|
get => SelFilter.DtEnd;
|
|
set => SelFilter.DtEnd = value;
|
|
}
|
|
|
|
protected MP.MONO.UI.Data.DataLogFilter SelFilter { get; set; } = new MP.MONO.UI.Data.DataLogFilter();
|
|
|
|
#endregion Private Fields
|
|
|
|
#region Protected Fields
|
|
|
|
protected bool isRT = true;
|
|
protected double sampleSecMin = 1;
|
|
|
|
#endregion Protected Fields
|
|
|
|
#region Protected Properties
|
|
|
|
protected string currMode
|
|
{
|
|
get => isRT ? "RealTime" : "Log View";
|
|
}
|
|
|
|
protected string btnResetCss
|
|
{
|
|
get => selTools != null && selTools.Count > 0 ? "" : "disabled";
|
|
}
|
|
|
|
protected List<string> selTools { get; set; } = new List<string>();
|
|
|
|
#endregion Protected Properties
|
|
|
|
#region Public Properties
|
|
|
|
public string pcss
|
|
{
|
|
get
|
|
{
|
|
string answ = "col-12";
|
|
int numPar = selTools.Count;
|
|
if (numPar > 6)
|
|
{
|
|
answ = "col-4";
|
|
}
|
|
else if (numPar > 3)
|
|
{
|
|
answ = "col-6";
|
|
}
|
|
return answ;
|
|
}
|
|
}
|
|
|
|
#endregion Public Properties
|
|
|
|
#region Private Methods
|
|
|
|
#endregion Private Methods
|
|
|
|
#region Protected Methods
|
|
|
|
protected void toolAdded(string toolName)
|
|
{
|
|
if (!selTools.Contains(toolName))
|
|
{
|
|
selTools.Add(toolName);
|
|
}
|
|
}
|
|
|
|
protected string lastTool
|
|
{
|
|
get
|
|
{
|
|
string answ = "";
|
|
if (selTools.Count > 0)
|
|
{
|
|
answ = $"{selTools.LastOrDefault()}";
|
|
}
|
|
return answ;
|
|
}
|
|
}
|
|
|
|
protected void toolRemoved(string toolName)
|
|
{
|
|
if (selTools.Contains(toolName))
|
|
{
|
|
// controllo se è ultimo rimuovo direttamente
|
|
if (toolName == lastTool)
|
|
{
|
|
selTools.Remove(toolName);
|
|
}
|
|
}
|
|
}
|
|
|
|
protected void resetSel()
|
|
{
|
|
selTools = new List<string>();
|
|
}
|
|
|
|
protected void toggleRT()
|
|
{
|
|
isRT = !isRT;
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
private void toggleShowParams()
|
|
{
|
|
showParam = !showParam;
|
|
}
|
|
}
|
|
}
|