Esempio n. 1
0
        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;
        }
Esempio n. 2
0
 public ColorModeValueRangeException(string component, int value, int maxValue, DBColorMode colorMode)
     : base(WriteErrorMessage(component, value, maxValue, colorMode))
 {
 }
Esempio n. 3
0
 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");
 }