internal Style(Font font, Pen pen, SolidBrush brush, SolidBrush textBrush, StringFormat format, RectangleMode rectMode, ImageMode imageMode, LineCap strokeMode, DBColorMode colorMode, bool fill) { Font = new Font(font.FontFamily, font.Size); Pen = new Pen(pen.Color, pen.Width); Brush = new SolidBrush(brush.Color); TextBrush = new SolidBrush(textBrush.Color); Format = new StringFormat(); Format.LineAlignment = format.LineAlignment; Format.Alignment = format.Alignment; RectMode = rectMode; ImageMode = imageMode; StrokeMode = strokeMode; ColorMode = colorMode; Fill = fill; }
public ColorModeValueRangeException(string component, int value, int maxValue, DBColorMode colorMode) : base(WriteErrorMessage(component, value, maxValue, colorMode)) { }
private static string WriteErrorMessage(string component, int value, int maxValue, DBColorMode colorMode) { return($"\nError, the value of {component} should be between 0 and {maxValue} " + $"in {colorMode} color mode\n" + $"\t{component} = {value}\n"); }