PTMagic/Monitor/Pages/PresetFiles.cshtml.cs

38 lines
1.0 KiB
C#
Raw Permalink Normal View History

using System.Collections.Generic;
2018-05-22 10:11:50 +02:00
using Core.Main;
using Core.Main.DataObjects.PTMagicData;
namespace Monitor.Pages
{
public class PresetFilesModel : _Internal.BasePageModelSecure
{
2018-05-22 10:11:50 +02:00
public List<GlobalSetting> GlobalSettingsWithPresets = new List<GlobalSetting>();
public void OnGet()
{
2018-05-22 10:11:50 +02:00
base.Init();
BindData();
}
public void BindData()
{
2018-05-22 10:11:50 +02:00
string notification = GetStringParameter("n", "");
if (notification.Equals("PresetFileSaved"))
{
2018-05-22 10:11:50 +02:00
NotifyHeadline = "Preset File Saved!";
NotifyMessage = "The preset file was saved and will be applied during the next interval.";
NotifyType = "success";
}
foreach (GlobalSetting globalSetting in PTMagicConfiguration.AnalyzerSettings.GlobalSettings)
{
if (globalSetting.PairsProperties.ContainsKey("File") || globalSetting.DCAProperties.ContainsKey("File") || globalSetting.IndicatorsProperties.ContainsKey("File"))
{
2018-05-22 10:11:50 +02:00
GlobalSettingsWithPresets.Add(globalSetting);
}
}
}
}
}