private int GetPixelAtDirection(int pixel, Direction currDirection) { switch (currDirection) { case Direction.Top: return(_regionManipulator.Helper_GetPixelIndex_Top(pixel)); case Direction.Right: return(_regionManipulator.Helper_GetPixelIndex_Right(pixel)); case Direction.Left: return(_regionManipulator.Helper_GetPixelIndex_Left(pixel)); case Direction.Bottom: return(_regionManipulator.Helper_GetPixelIndex_Bottom(pixel)); } throw new NotSupportedException(); }