Refactorization : BenchControl -> Rig

This commit is contained in:
Milan Hanajik
2021-03-05 16:12:24 +01:00
parent 84c8ec26b6
commit 6cf3bd6160
1461 changed files with 6330 additions and 6330 deletions
+8 -8
View File
@@ -154,15 +154,15 @@ namespace TBF
/// </summary>
/// <param name="entity">Entity implementing IHasValves</param>
/// <returns>A list of IValves</returns>
public static IList<BenchControl.GenericDevices.IValve> ValvesOpen(IHasValves entity)
public static IList<Rig.GenericDevices.IValve> ValvesOpen(IHasValves entity)
{
var valvesOpen = new List<BenchControl.GenericDevices.IValve>();
var valvesOpen = new List<Rig.GenericDevices.IValve>();
if (entity != null && entity.ValvesOpen != null && entity.ValvesOpen != string.Empty)
{
string[] vOpen = entity.ValvesOpen.Split(new char[] { ';' });
foreach (var vName in vOpen)
{
valvesOpen.Add((BenchControl.GenericDevices.IValve)BenchControl.TbfComponents.FindComponent(vName));
valvesOpen.Add((Rig.GenericDevices.IValve)Rig.TbfComponents.FindComponent(vName));
}
}
return valvesOpen;
@@ -173,15 +173,15 @@ namespace TBF
/// </summary>
/// <param name="entity">Entity implementing IHasValves</param>
/// <returns>A list of IValves</returns>
public static IList<BenchControl.GenericDevices.IValve> ValvesClose(IHasValves entity)
public static IList<Rig.GenericDevices.IValve> ValvesClose(IHasValves entity)
{
var valvesClose = new List<BenchControl.GenericDevices.IValve>();
var valvesClose = new List<Rig.GenericDevices.IValve>();
if (entity != null && entity.ValvesClose != null && entity.ValvesClose != string.Empty)
{
string[] vClose = entity.ValvesClose.Split(new char[] { ';' });
foreach (var vName in vClose)
{
valvesClose.Add((BenchControl.GenericDevices.IValve)BenchControl.TbfComponents.FindComponent(vName));
valvesClose.Add((Rig.GenericDevices.IValve)Rig.TbfComponents.FindComponent(vName));
}
}
return valvesClose;
@@ -195,7 +195,7 @@ namespace TBF
/// <returns>float[] of regulation valve positions from 0 to 100.0f</returns>
public static float[] GetRegulValvesPositions(TransitionStep step)
{
int regvCount = BenchControl.Sequences.SequenceBase.RegulValves.Count;
int regvCount = Rig.Sequences.SequenceBase.RegulValves.Count;
float[] result = new float[regvCount];
string[] rvPosStr = (step.RegulValvesPct != null) ? step.RegulValvesPct.Split(new char[] { ';' }) : new string[0];
@@ -224,7 +224,7 @@ namespace TBF
/// <returns>float[] of FM-pump power percentages from 0 to 100.0f</returns>
public static float[] GetPumpWithFMPcts(TransitionStep step)
{
int fmPumpCount = BenchControl.Sequences.SequenceBase.PumpsWithFM.Count;
int fmPumpCount = Rig.Sequences.SequenceBase.PumpsWithFM.Count;
float[] result = new float[fmPumpCount];
string[] fmPctsStr = (step.PumpWithFMPcts != null) ? step.PumpWithFMPcts.Split(new char[] { ';' }) : new string[0];