/// <summary> /// 获取涂鸦的颜色 /// </summary> /// <param name="color"></param> /// <returns></returns> private SolidColorBrush getBrushColor(DoodleEnumColor color) { SolidColorBrush result = Brushes.Black; switch (color) { case DoodleEnumColor.black: result = Brushes.Black; break; case DoodleEnumColor.blue: result = Brushes.Blue; break; case DoodleEnumColor.green: result = Brushes.Green; break; case DoodleEnumColor.orange: result = Brushes.Orange; break; case DoodleEnumColor.red: result = Brushes.Red; break; default: break; } return(result); }
public void SetDrawColor(DoodleEnumColor color) { lineColor = color; switch (lineColor) { case DoodleEnumColor.black: brushColor = Brushes.Black; break; case DoodleEnumColor.blue: brushColor = Brushes.Blue; break; case DoodleEnumColor.green: brushColor = Brushes.Green; break; case DoodleEnumColor.orange: brushColor = Brushes.Orange; break; case DoodleEnumColor.red: brushColor = Brushes.Red; break; default: break; } }
/// <summary> /// 获取涂鸦的颜色 /// </summary> /// <param name="color"></param> /// <returns></returns> private Color getColor(DoodleEnumColor color) { Color result = Colors.Black; switch (color) { case DoodleEnumColor.black: result = Colors.Black; break; case DoodleEnumColor.blue: result = Colors.Blue; break; case DoodleEnumColor.red: result = Colors.Red; break; case DoodleEnumColor.green: result = Colors.Green; break; case DoodleEnumColor.orange: result = Colors.Orange; break; case DoodleEnumColor.white: result = Colors.White; break; case DoodleEnumColor.yellow: result = Colors.Yellow; break; default: break; } return(result); }