예제 #1
0
        private void SetMixRun()
        {
            ConfigGroup mixRuns   = SiteConfigHelper.GetChamberMixRun();
            ConfigGroup lossInfos = SiteConfigHelper.GetChamberMixRunLoss();

            if (mixRuns == null)
            {
                return;
            }

            foreach (var item in mixRuns.Item.Values)
            {
                string[] steps = item.CodeValue.Split(',');
                if (steps.Length < 2)
                {
                    continue;
                }

                List <FabStdStep> list = new List <FabStdStep>();
                foreach (var stdStepID in steps)
                {
                    FabStdStep step = BopHelper.FindStdStep(Constants.ArrayShop, stdStepID);
                    if (step != null)
                    {
                        list.Add(step);
                    }
                }

                if (list.Count < 2)
                {
                    continue;
                }

                float lossValue = 1f;

                if (lossInfos != null)
                {
                    ConfigInfo loss;
                    lossInfos.Item.TryGetValue(item.CodeName, out loss);

                    if (loss != null)
                    {
                        if (float.TryParse(loss.CodeValue, out lossValue) == false)
                        {
                            lossValue = 1f;
                        }
                    }
                }


                foreach (var step in list)
                {
                    foreach (var otherStep in list)
                    {
                        if (step == otherStep)
                        {
                            continue;
                        }

                        if (step.MixRunPairSteps == null)
                        {
                            step.MixRunPairSteps = new List <FabStdStep>();
                        }

                        step.MixRunPairSteps.Add(otherStep);
                    }

                    step.IsMixRunStep = true;
                    step.MixCriteria  = lossValue;
                }
            }
        }