/// /// Copyright (c) 2015 Sensus Metering Systems /// Author: Milan Hanajík /// using System; using System.Collections.Generic; using System.IO; using System.Xml.Serialization; using TBF.BenchControl.Generic; namespace TBF.BenchControl.DB.SensusOracle { public enum Separator { None, Space, Tabulator, Comma, Semicolon, Count } public class DatabaseCfg : ComponentCfgBase, Generic.IComponentCfg { public IComponent GetComponent(IList components) { return new Database(this); } public IComponentCfgCtrl GetControl() { return new DatabaseCfgCtrl(); } public int TestBenchId; public string DestinationPath; /// Directory path into which the results will be saved public bool YearFolders; public bool MonthFolders; public bool DayFolders; public Separator Separator; public bool EliminateSpaces; /// Private parameterless constructor invoked by all other (public) constructors DatabaseCfg() { Name = "Sensus-Oracle-DB"; ParentName = string.Empty; TestBenchId = 1; DestinationPath = Program.HomeDir + "Results\\"; YearFolders = true; MonthFolders = true; DayFolders = false; Separator = Separator.None; EliminateSpaces = false; } public DatabaseCfg(IComponentFactory factory) : this() { this.Factory = factory; } public string ToString(int i) { return string.Format("Name={0}, BenchId={1}, Path={2}, Y={3}, M={4}, D={5}, Elim.Spaces={6}, Separator={7}", Name, TestBenchId, DestinationPath, YearFolders, MonthFolders, DayFolders, EliminateSpaces, Separator); } } }