public static int GetColorInt(JartrekColors keyColor) { Color currentColor = Color.Silver; int colorInt = 1; switch (keyColor) { case JartrekColors.Red: currentColor = Color.Red; colorInt = 1; break; case JartrekColors.Green: currentColor = Color.Lime; colorInt = 2; break; case JartrekColors.Yellow: currentColor = Color.Yellow; colorInt = 3; break; case JartrekColors.Blue: currentColor = Color.Blue; colorInt = 4; break; case JartrekColors.Magenta: currentColor = Color.Fuchsia; colorInt = 5; break; case JartrekColors.Cyan: currentColor = Color.Aqua; colorInt = 6; break; case JartrekColors.White: currentColor = Color.White; colorInt = 7; break; case JartrekColors.Beige: currentColor = Color.Beige; colorInt = 8; break; case JartrekColors.Goldenrod: currentColor = Color.Goldenrod; colorInt = 9; break; case JartrekColors.Khaki: currentColor = Color.Khaki; colorInt = 10; break; case JartrekColors.Plum: currentColor = Color.Plum; colorInt = 11; break; case JartrekColors.Orange: currentColor = Color.Orange; colorInt = 12; break; case JartrekColors.PaleGreen: currentColor = Color.PaleGreen; colorInt = 13; break; case JartrekColors.Pink: currentColor = Color.Pink; colorInt = 14; break; case JartrekColors.Salmon: currentColor = Color.Salmon; colorInt = 15; break; case JartrekColors.Sienna: currentColor = Color.Sienna; colorInt = 16; break; case JartrekColors.Tan: currentColor = Color.Tan; colorInt = 17; break; default: return(colorInt); } return(colorInt); }
public static Color GetColor(JartrekColors keyColor) { Color currentColor = Color.Silver; switch (keyColor) { case JartrekColors.Red: currentColor = Color.Red; break; case JartrekColors.Green: currentColor = Color.Lime; break; case JartrekColors.Yellow: currentColor = Color.Yellow; break; case JartrekColors.Blue: currentColor = Color.Blue; break; case JartrekColors.Magenta: currentColor = Color.Fuchsia; break; case JartrekColors.Cyan: currentColor = Color.Aqua; break; case JartrekColors.White: currentColor = Color.White; break; case JartrekColors.Beige: currentColor = Color.Beige; break; case JartrekColors.Goldenrod: currentColor = Color.Goldenrod; break; case JartrekColors.Khaki: currentColor = Color.Khaki; break; case JartrekColors.Plum: currentColor = Color.Plum; break; case JartrekColors.Orange: currentColor = Color.Orange; break; case JartrekColors.PaleGreen: currentColor = Color.PaleGreen; break; case JartrekColors.Pink: currentColor = Color.Pink; break; case JartrekColors.Salmon: currentColor = Color.Salmon; break; case JartrekColors.Sienna: currentColor = Color.Sienna; break; case JartrekColors.Tan: currentColor = Color.Tan; break; default: return(currentColor); } return(currentColor); }