예제 #1
0
 public void SetEndTime(string paramText, string endTime, Whirlpool whirlpool, Brew brew)
 {
     if (paramText.Equals("Wort Cooling - Finish"))
     {
         WhirlpoolProcessParameters paramToCheck  = WhirlpoolProcessParameters.RestingEndTime;
         WhirlpoolProcessParameters paramToChange = WhirlpoolProcessParameters.CoolingEndTime;
         IWhirlpoolState            newState      = whirlpool.TrubRemovalState;
         SetProcessStepEndTime(endTime, whirlpool, brew, paramToCheck, paramToChange, newState);
     }
 }
예제 #2
0
        public void StartCasting(string paramText, string startTime, Whirlpool whirlpool, Brew brew)
        {
            string brewNumber                = brew.BrewNumber;
            string brandName                 = brew.BrandName;
            string whirlpoolBrewNumber       = whirlpool.Brew.BrewNumber;
            WhirlpoolProcessParameters param = WhirlpoolProcessParameters.CastingStartTime;
            string paramName                 = param.ToString();

            //Start Mashing In
            if (brandName.Length > 0 &&
                brewNumber.Length > 0 &&
                brewNumber == whirlpoolBrewNumber &&
                paramText.Equals("Start Casting - Finish"))
            {
                whirlpool.Brew.SetProcessParameterValue(ProcessEquipment.Whirlpool, paramName, startTime);

                //Set new state
                whirlpool.SetState(whirlpool.CastingState);
            }
        }
예제 #3
0
        protected void SetProcessStepEndTime(string endTime, Whirlpool wortCopper, Brew brew,
                                             WhirlpoolProcessParameters paramToCheck,
                                             WhirlpoolProcessParameters paramToChange,
                                             IWhirlpoolState newState)
        {
            string brandName         = brew.BrandName;
            string paramToCheckValue = brew.GetProcessParameterValue(ProcessEquipment.Whirlpool,
                                                                     paramToCheck.ToString());

            //Complete process step
            if (brandName.Length > 0 &&
                paramToCheckValue.Length > 0)
            {
                Brew   nBrew     = wortCopper.Brew;
                string paramName = paramToChange.ToString();
                nBrew.SetProcessParameterValue(ProcessEquipment.Whirlpool, paramName, endTime);

                //Set new state
                //string newStateString =
                wortCopper.SetState(newState);
                //Console.WriteLine("New state is: " + newStateString);
            }
        }