Refactoring : TestBenchFramework --> TBF ver. 2.18.789

This commit is contained in:
Milan Hanajik
2018-01-29 09:48:01 +01:00
parent 06018303e7
commit 0d3ee53bd5
1300 changed files with 441 additions and 612 deletions
@@ -0,0 +1,64 @@
///
/// Copyright (c) 2017 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
using System.IO;
using System.Xml.Serialization;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.Output.FileWriters.ImageArchiver
{
public class ArchiverCfg : ComponentCfgBase, Generic.IComponentCfg
{
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(ArchiverCfg) })[0];
protected override XmlSerializer GetSerializer() { return Serializer; }
public IComponentCfgCtrl GetControl() { return new ArchiverCfgCtrl(); }
public string DestinationPath; /// Directory path into which the results will be saved
public string DestinationPath2; /// Directory path into which the 2nd copy of results will be saved
public YearFolders YearFolders;
public MonthFolders MonthFolders;
public DayFolders DayFolders;
public string ArchiveFormat;
public bool SaveGoodOnly;
[XmlIgnore]
public Config.Entities.MetersKind MetersKind;
/// Private parameterless constructor invoked by all other (public) constructors
ArchiverCfg()
{
}
public ArchiverCfg(string name, IComponentFactory factory, Config.Entities.MetersKind metersKind)
: this()
{
Name = name;
Factory = factory;
MetersKind = metersKind;
ParentName = string.Empty;
DestinationPath = Program.HomeDir + "Results\\";
DestinationPath2 = string.Empty;
YearFolders = YearFolders.FourDigit;
MonthFolders = MonthFolders.Digit;
DayFolders = DayFolders.Digit;
ArchiveFormat = "{1:yyyyMMdd-HHmm}-{3}";
SaveGoodOnly = false;
}
public string ToString(int i)
{
return string.Format("Name={0}, Path={1}, Y={2}, M={3}, D={4}, ArchiveFmt={5}, GoodOnly={6}",
Name,
DestinationPath,
YearFolders,
MonthFolders,
DayFolders,
ArchiveFormat,
SaveGoodOnly);
}
}
}