44 lines
1.1 KiB
C#
44 lines
1.1 KiB
C#
///
|
|
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
|
///
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Xml.Serialization;
|
|
using TBF.BenchControl.Generic;
|
|
|
|
namespace TBF.BenchControl.DataEntry.Combined
|
|
{
|
|
public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg
|
|
{
|
|
public IComponent GetComponent(IList<IComponent> components) { return new EntryForm(this); }
|
|
public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); }
|
|
|
|
///
|
|
/// Serialized parameters
|
|
///
|
|
public Entities.UnitsVolume Units;
|
|
|
|
/// Private parameterless constructor invoked by all other (public) constructors
|
|
EntryFormCfg()
|
|
{
|
|
Name = "DataEntry-Combined";
|
|
ParentName = string.Empty;
|
|
}
|
|
|
|
public EntryFormCfg(IComponentFactory factory)
|
|
: this()
|
|
{
|
|
this.Factory = factory;
|
|
this.Units = Entities.UnitsVolume.CubicMtr;
|
|
}
|
|
|
|
public string ToString(int i)
|
|
{
|
|
return string.Format("Name={0}, Units={1}",
|
|
Name,
|
|
(Units == Entities.UnitsVolume.CubicMtr) ? "m3" : "l");
|
|
}
|
|
}
|
|
}
|