Example #1
0
 public override void SetFlow(int x)
 {
     this.Flow = x;
     if (OutputA != null)
     {
         OutputA.SetFlow(Flow);
     }
 }
Example #2
0
 public override void SetFlow(int x)
 {
     this.Flow = x;
     if (OutputA != null)
     {
         OutputA.SetFlow(Ratio * Flow);
     }
     if (OutputB != null)
     {
         OutputB.SetFlow((100 - Ratio) * Flow);
     }
 }
Example #3
0
        public void ChangeRatio(int ratio)
        {
            Ratio = ratio;

            if (OutputA != null)
            {
                OutputA.SetFlow(Ratio * Flow);
            }
            if (OutputB != null)
            {
                OutputB.SetFlow((100 - Ratio) * Flow);
            }
        }
Example #4
0
        /// <summary>
        /// sets the safety limit to the given value
        /// </summary>
        /// <param name="limit"></param>
        public override void SetSafetyLimit(int limit)
        {
            this.SafetyLimit = limit;

            if (OutputA is Pipe)
            {
                Pipe temp = (Pipe)OutputA;
                if (temp.GetSafetyLimit() != limit)
                {
                    OutputA.SetSafetyLimit(limit);
                }
            }

            if (InputA is Pipe)
            {
                Pipe temp = (Pipe)InputA;
                if (temp.GetSafetyLimit() != limit)
                {
                    InputA.SetSafetyLimit(limit);
                }
            }
        }