示例#1
0
        public void StartFilling(string paramText, string startTime, HoldingVessel holdingVessel, Brew brew)
        {
            string brewNumber = brew.BrewNumber;
            string brandName  = brew.BrandName;
            string holdingVesselBrewNumber       = holdingVessel.Brew.BrewNumber;
            HoldingVesselProcessParameters param = HoldingVesselProcessParameters.FillingStartTime;
            string paramName = param.ToString();

            //Start Mashing In
            if (brandName.Length > 0 &&
                brewNumber.Length > 0 &&
                brewNumber == holdingVesselBrewNumber &&
                paramText.Equals("Start Filling - Finish"))
            {
                holdingVessel.Brew.SetProcessParameterValue(ProcessEquipment.HoldingVessel, paramName, startTime);

                //Set new state
                holdingVessel.SetState(holdingVessel.FillingState);
            }
        }
示例#2
0
        protected void SetProcessStepEndTime(string endTime, HoldingVessel holdingVessel, Brew brew,
                                             HoldingVesselProcessParameters paramToCheck,
                                             HoldingVesselProcessParameters paramToChange,
                                             IHoldingVesselState newState)
        {
            string brandName         = brew.BrandName;
            string paramToCheckValue = brew.GetProcessParameterValue(ProcessEquipment.HoldingVessel,
                                                                     paramToCheck.ToString());

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

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