UltrasoundLevelMeter parent name is 'Modbus' only.

This commit is contained in:
Milan Hanajik 2018-09-27 15:20:34 +02:00
parent 2ad5843f4f
commit e77c0460de

View File

@ -18,16 +18,18 @@ namespace TBF.BenchControl.Modbus.UltrasoundLevelMeter
public IComponentCfgCtrl GetControl()
{
IList<string> parents = new List<string>();
if (StateMachine.Components != null)
{
foreach (var cmpnt in StateMachine.Components)
{
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is TBF.BenchControl.Modbus.Common.Factory)
{
parents.Add(cmpnt.Name);
}
}
}
// TODO:
//if (StateMachine.Components != null)
//{
// foreach (var cmpnt in StateMachine.Components)
// {
// if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is TBF.BenchControl.Modbus.Common.Factory)
// {
// parents.Add(cmpnt.Name);
// }
// }
//}
parents.Add("Modbus");
return new Configs.ParamsProvider.ComponentCfgCtrl(this, parents);
}