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); }
public int KeyValueOf(MagProbremKeyPosition position) { return(TotalValueOf(position) % 10); }