Exemple #1
0
        public int TotalValueOf(MagProbremKeyPosition position)
        {
            int total = 0;

            switch (position)
            {
            case MagProbremKeyPosition.UpperHolizontal:
                total = UpperLeftValue + UpperCenterValue + UpperRightValue; break;

            case MagProbremKeyPosition.MiddleHolizontal:
                total = MiddleLeftValue + MiddleCenterValue + MiddleRightValue; break;

            case MagProbremKeyPosition.LowerHolizontal:
                total = LowerLeftValue + LowerCenterValue + LowerRightValue; break;

            case MagProbremKeyPosition.LeftVartical:
                total = UpperLeftValue + MiddleLeftValue + LowerLeftValue; break;

            case MagProbremKeyPosition.CenterVartical:
                total = UpperCenterValue + MiddleCenterValue + LowerCenterValue; break;

            case MagProbremKeyPosition.RightVartical:
                total = UpperRightValue + MiddleRightValue + LowerRightValue; break;
            }

            return(total);
        }
Exemple #2
0
 public int KeyValueOf(MagProbremKeyPosition position)
 {
     return(TotalValueOf(position) % 10);
 }