using System; using System.Collections.Generic; namespace TBF.Entities { public class TransitionStep : IHasItemNr, IHasValves { public virtual int Id { get; protected set; } public virtual int ItemNr { get; set; } /// Order of the preparation step public virtual int Duration { get; set; } /// Duration in seconds public virtual string ValvesOpen { get; set; } /// List of valves to be opened public virtual string ValvesClose { get; set; } /// List of valves to be closed public virtual string RegulValvesPct { get; set; } /// Positions of regulation valves in % separated by ';' public virtual string PumpWithFMPcts { get; set; } /// Power of FM controlled pumps in % separated by ';' public virtual TransitionSequence TransitionSequence { get; set; } /// ------------- Additional stuff not mapped into the database ------------- public TransitionStep() { Duration = 5; /// sec. } public TransitionStep(int itemNr, TransitionSequence sequence) : this() { ItemNr = itemNr; TransitionSequence = sequence; } public virtual TransitionStep Clone() { TransitionStep result = new TransitionStep(ItemNr, TransitionSequence); result.Duration = Duration; result.ValvesOpen = ValvesOpen; result.ValvesClose = ValvesClose; result.RegulValvesPct = RegulValvesPct; result.PumpWithFMPcts = PumpWithFMPcts; return result; } public virtual string ToString(string indent) { string result = ""; result += indent + "ItemNr = " + ItemNr.ToString() + ", "; result += indent + "Duration = " + Duration.ToString() + ", "; result += indent + "ValvesOpen = " + ValvesOpen.ToString() + ", "; result += indent + "ValvesClose = " + ValvesClose.ToString() + ", "; result += indent + "RegulValvesPct = " + RegulValvesPct.ToString() + ", "; result += indent + "PumpsWithFMPct = " + RegulValvesPct.ToString() + Environment.NewLine; return result; } } }