Components Initialize() rewritten, double StartChangeHandler() calls avoided, ToString() methods are equl, use ClassName.

This commit is contained in:
Milan Hanajik
2021-04-08 12:03:18 +02:00
parent 331803e51d
commit 1d50b7206d
178 changed files with 2003 additions and 2151 deletions
@@ -13,7 +13,7 @@ namespace TBF.BenchControl.DataEntry.Combined
public class EntryForm : ComponentBase, IOperation, IDataEntry, IHasCycleBeginForm, IHasCycleEndForm, IHasWMStatesForm
{
private static readonly ILog log = LogManager.GetLogger(typeof(EntryForm));
public override string ToString() { return string.Format("DataEntry.Combined({0})", Cfg.ToString(1)); }
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
public bool UsesCameras() { return false; }
@@ -60,25 +60,26 @@ namespace TBF.BenchControl.DataEntry.Combined
CurrentOp currentOp;
public EntryForm()
{
}
public EntryForm() { }
public EntryForm(Generic.IComponentCfg cfg)
: base(cfg)
{
entryFormCfg = cfg as EntryFormCfg;
disabled = new bool[Config.Data.CompoundWMsCount];
wmStartState = new double[Config.Data.CompoundWMsCount * 2];
wmStartStateStr = new string[Config.Data.CompoundWMsCount * 2];
wmEndState = new double[Config.Data.CompoundWMsCount * 2];
wmCycleEndState = new string[Config.Data.CompoundWMsCount * 2];
currentOp = CurrentOp.None;
log.Warn(this.ToString());
}
public override void Initialize()
{
disabled = new bool[Config.Data.CompoundWMsCount];
wmStartState = new double[Config.Data.CompoundWMsCount * 2];
wmStartStateStr = new string[Config.Data.CompoundWMsCount * 2];
wmEndState = new double[Config.Data.CompoundWMsCount * 2];
wmCycleEndState = new string[Config.Data.CompoundWMsCount * 2];
currentOp = CurrentOp.None;
log.FatalFormat("{0} initialized: {1}", Name, this);
}
/// <returns>Reference to the operation</returns>
public IOperation ShowCycleBeginFormOp()
{