static Color GetSelectedColor(SortingArray array, int pos) { switch (style) { case DrawingStyle.Default: return(DefaultSelectedColor); case DrawingStyle.Rainbow: return(RainbowSelectedColor(array.Get(pos), array.Length - 1)); case DrawingStyle.DistanceBased: return(DistanceSelectedColor(array.DistanceToSortedPosition(pos), array.Length)); case DrawingStyle.Monochrome: return(Color.LightGray); case DrawingStyle.Custom: return(CustomSelectedColor); default: return(Color.LightGray); } }
static Color GetDefaultColor(SortingArray array, int pos) { switch (style) { case DrawingStyle.Default: return(DefaultDefaultColor); case DrawingStyle.Rainbow: return(RainbowDefaultColor(array.Get(pos), array.Length - 1)); case DrawingStyle.DistanceBased: return(DistanceDefaultColor(array.DistanceToSortedPosition(pos), array.Length)); case DrawingStyle.Monochrome: return(Color.LightSlateGray); case DrawingStyle.Custom: return(CustomDefaultColor); default: return(Color.WhiteSmoke); } }