54 lines
1.7 KiB
C#
54 lines
1.7 KiB
C#
///
|
|
/// Copyright (c) 2018-2023 Sensus Slovensko a.s.
|
|
///
|
|
using System.Collections.Generic;
|
|
using System.Xml.Serialization;
|
|
using TBF.Rig.Generic;
|
|
|
|
namespace TBF.Rig.Output.DB.ProductionTracing
|
|
{
|
|
///
|
|
/// Class and file name is preserved for backward compatibility
|
|
///
|
|
public class MonitoringCfg : ComponentCfgBase, Generic.IComponentCfg
|
|
{
|
|
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(MonitoringCfg) })[0];
|
|
public override XmlSerializer GetSerializer() { return Serializer; }
|
|
|
|
public IComponentCfgCtrl GetControl(IList<Config.Entities.Component> cmpntEntities) { return new TracingCfgCtrl(); }
|
|
|
|
|
|
public string ConnStr;
|
|
public string NetAdapter;
|
|
public bool CheckPreviousRecords;
|
|
public bool SaveTracingRecords;
|
|
|
|
|
|
/// Private parameterless constructor invoked by all other (public) constructors
|
|
MonitoringCfg()
|
|
{
|
|
ParentName = string.Empty;
|
|
NetAdapter = string.Empty;
|
|
ConnStr = "server=10.42.128.35; database=sledovanie2019; uid=sledovanie2019; pwd=velka-javorina-970; charset=utf8;";
|
|
CheckPreviousRecords = true;
|
|
SaveTracingRecords = true;
|
|
}
|
|
|
|
public MonitoringCfg(string name, IComponentFactory factory)
|
|
: this()
|
|
{
|
|
this.Name = name;
|
|
this.Factory = factory;
|
|
}
|
|
|
|
public string ToString(int i)
|
|
{
|
|
return string.Format("Name={0}, CheckPrev={1}, SaveRecords={2}, ConnStr={3}",
|
|
Name,
|
|
CheckPreviousRecords,
|
|
SaveTracingRecords,
|
|
ConnStr);
|
|
}
|
|
}
|
|
}
|