51 lines
1.6 KiB
C#
51 lines
1.6 KiB
C#
///
|
|
/// Copyright (c) 2020-2021 Sensus Slovensko a.s.
|
|
///
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Xml.Serialization;
|
|
using TBF.BenchControl.Generic;
|
|
|
|
namespace TBF.BenchControl.DataEntry.S620
|
|
{
|
|
public class EntryFormCfg : ComponentCfgBase, Generic.IChildComponentCfg
|
|
{
|
|
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(EntryFormCfg) })[0];
|
|
public override XmlSerializer GetSerializer() { return Serializer; }
|
|
|
|
public IComponentCfgCtrl GetControl(IList<Config.Entities.Component> cmpntEntities) { return new EntryFormCfgCtrl(); }
|
|
|
|
///
|
|
/// Serialized parameters
|
|
///
|
|
public int MaxWMsCount;
|
|
public char CloseButton;
|
|
public bool ProductionTracing;
|
|
|
|
/// Private parameterless constructor invoked by all other (public) constructors
|
|
EntryFormCfg() { }
|
|
|
|
public EntryFormCfg(string name, IComponentFactory factory)
|
|
: this()
|
|
{
|
|
Name = name;
|
|
ParentName = "ProductionMonitoring";
|
|
Factory = factory;
|
|
MaxWMsCount = 20;
|
|
CloseButton = '+';
|
|
ProductionTracing = true;
|
|
}
|
|
|
|
public string ToString(int i)
|
|
{
|
|
return string.Format("Name={0}, MaxWMsCount={1}, CloseButton={2}, ProductionTracing={3}, Parent={4}",
|
|
Name,
|
|
MaxWMsCount,
|
|
(CloseButton == '+') ? "+" : (CloseButton == '\t') ? "Tab" : "none",
|
|
ProductionTracing,
|
|
string.IsNullOrEmpty(ParentName) ? "-" : ParentName);
|
|
}
|
|
}
|
|
}
|