Exemple #1
0
        private static List <CalculationMethodRules> GenerateCalculationMethodRulesFakeGap()
        {
            List <CalculationMethodRules> list = new List <CalculationMethodRules>();
            var item = new CalculationMethodRules();

            item.UpperSymbolID  = 1;
            item.UpperTestValue = 1;
            list.Add(item);

            item = new CalculationMethodRules();
            item.LowerSymbolID  = 3;
            item.LowerTestValue = 2;
            item.UpperSymbolID  = 1;
            item.UpperTestValue = 2;
            list.Add(item);

            item = new CalculationMethodRules();
            item.LowerSymbolID  = 3;
            item.LowerTestValue = 2;
            item.UpperSymbolID  = 1;
            item.UpperTestValue = 3;
            list.Add(item);

            item = new CalculationMethodRules();
            item.LowerSymbolID  = 3;
            item.LowerTestValue = 3;
            item.UpperSymbolID  = 1;
            item.UpperTestValue = 4;
            list.Add(item);

            item = new CalculationMethodRules();
            item.LowerSymbolID  = 3;
            item.LowerTestValue = 4;
            list.Add(item);

            return(list);
        }
Exemple #2
0
        private static CalculationMethodRules GenerateCalculationMethodRules(int likelihoodBand)
        {
            var obj = new CalculationMethodRules();

            switch (likelihoodBand)
            {
            case (int)LikelihoodBands.One:
                Console.Write("Upper Symbol (< 1, <= 2, >= 3, > 4 ): ");
                obj.UpperSymbolID = Convert.ToInt32(Console.ReadLine());
                Console.Write("Upper Test Value: ");
                obj.UpperTestValue = Convert.ToInt32(Console.ReadLine());
                break;

            case (int)LikelihoodBands.Two:
            case (int)LikelihoodBands.Three:
            case (int)LikelihoodBands.Four:
                Console.Write("Upper Symbol (< 1, <= 2, >= 3, > 4 ): ");
                obj.UpperSymbolID = Convert.ToInt32(Console.ReadLine());
                Console.Write("Upper Test Value: ");
                obj.UpperTestValue = Convert.ToInt32(Console.ReadLine());
                Console.Write("Lower Symbol (< 1, <= 2, >= 3, > 4 ): ");
                obj.LowerSymbolID = Convert.ToInt32(Console.ReadLine());
                Console.Write("Lower Test Value: ");
                obj.LowerTestValue = Convert.ToInt32(Console.ReadLine());
                break;

            case (int)LikelihoodBands.Five:
                Console.Write("Lower Symbol (< 1, <= 2, >= 3, > 4 ): ");
                obj.LowerSymbolID = Convert.ToInt32(Console.ReadLine());
                Console.Write("Lower Test Value: ");
                obj.LowerTestValue = Convert.ToInt32(Console.ReadLine());
                break;
            }

            return(obj);
        }