tbf/TBF/BenchControl/RegisterReaders/KPackE/DataEntryForRadio/EntryFormCfg.cs

44 lines
1.2 KiB
C#

///
/// Copyright (c) 2018 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
using System.IO;
using System.Xml.Serialization;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.RegisterReaders.KPackE.DataEntryForRadio
{
public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg
{
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(EntryFormCfg) })[0];
public override XmlSerializer GetSerializer() { return Serializer; }
public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); }
///
/// Serialized parameters
///
public string Radio; /// Name of a radio component
/// Private parameterless constructor invoked by all other (public) constructors
EntryFormCfg()
{
Name = "DataEntryForRadio";
Radio = "KPackE.Radio";
ParentName = string.Empty;
}
public EntryFormCfg(IComponentFactory factory)
: this()
{
this.Factory = factory;
}
public string ToString(int i)
{
return string.Format("Name={0}, Radio={1}", Name, Radio);
}
}
}