/// /// Copyright (c) 2015-2016 Sensus Metering Systems /// Author: Milan Hanajík /// using System; using System.Collections.Generic; using System.Xml.Serialization; using TBF.BenchControl.Generic; namespace TBF.BenchControl.BenchInfo.Polska { /// /// Holds information identifying the test bench - serializable configuration. /// public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg { public IComponent GetComponent(IList components) { return new Component(this); } public IComponentCfgCtrl GetControl() { return new ComponentCfgCtrl(); } /// /// Serialized parameters /// public string TestBenchName; public int TestBenchId; public string Address1; public string Address2; public string Address3; public string Address4; public string Address5; public string ApprovalId; public string ApprovalDate; public string ApprovedBy; /// Private parameterless constructor invoked by all other (public) constructors ComponentCfg() { Name = "BenchInfoEx"; ParentName = string.Empty; TestBenchName = "1"; TestBenchId = 1; Address1 = string.Empty; Address2 = string.Empty; Address3 = string.Empty; Address4 = string.Empty; Address5 = string.Empty; ApprovalId = string.Empty; ApprovalDate = string.Empty; ApprovedBy = string.Empty; } public ComponentCfg(IComponentFactory factory) : this() { this.Factory = factory; } public string ToString(int i) { return string.Format("Name={0}, Bench name={1}, Bench Id={2}", Name, TestBenchName, TestBenchId); } } }