Info message when at least one of the components is in Simulation mode, version 1.5.98.
This commit is contained in:
@@ -252,11 +252,20 @@ namespace TBF.BenchControl
|
||||
ControlBoard.InitializeComponent(ctrlBrdComponent, valvesToInvert, tankCapacities);
|
||||
}
|
||||
|
||||
public static void InitializeDevices()
|
||||
public static string InitializeDevices()
|
||||
{
|
||||
bool anyComponentIsInSimulMode = false;
|
||||
StringBuilder inSimulMode = new StringBuilder();
|
||||
|
||||
/// Add all devices to the state machine and initialize them
|
||||
foreach (var cmpnt in components)
|
||||
{
|
||||
if (cmpnt.DebugLevel == Entities.DebugMode.Simulate)
|
||||
{
|
||||
inSimulMode.AppendFormat("{0}{1}", anyComponentIsInSimulMode ? ", " : "", cmpnt.Name);
|
||||
anyComponentIsInSimulMode = true;
|
||||
}
|
||||
|
||||
if (cmpnt is IDevice)
|
||||
{
|
||||
AddDevice(cmpnt as IDevice);
|
||||
@@ -276,6 +285,11 @@ namespace TBF.BenchControl
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (anyComponentIsInSimulMode)
|
||||
return inSimulMode.ToString();
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user