2020-05-10 20:41:08 +02:00
|
|
|
|
using System.Collections.Generic;
|
2018-05-22 10:11:50 +02:00
|
|
|
|
using Core.Main;
|
|
|
|
|
using Core.Main.DataObjects.PTMagicData;
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
namespace Monitor.Pages
|
|
|
|
|
{
|
|
|
|
|
public class PresetFilesModel : _Internal.BasePageModelSecure
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public List<GlobalSetting> GlobalSettingsWithPresets = new List<GlobalSetting>();
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public void OnGet()
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
base.Init();
|
|
|
|
|
|
|
|
|
|
BindData();
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public void BindData()
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
string notification = GetStringParameter("n", "");
|
2018-12-15 22:07:29 +01:00
|
|
|
|
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";
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|