Пример #1
0
        /// <summary>
        /// Gets the background brush.
        /// </summary>
        /// <param name="data">The data.</param>
        /// <returns></returns>
        private Brush GetBackgroundBrush(SequenceConstraintsInfo data)
        {
            switch (data.Value)
            {
            case 0:
                return(Brushes.Black);

            case 7:
                return(Brushes.White);

            default:
                int v = data.Value;
                return(new SolidBrush(Color.FromArgb((byte)((v * 255) / 7), (byte)((v * 255) / 7), 255)));
            }
        }
Пример #2
0
 /// <summary>
 /// Gets the foreground brush.
 /// </summary>
 /// <param name="data">The data.</param>
 /// <returns></returns>
 private Brush GetForegroundBrush(SequenceConstraintsInfo data)
 {
     return(data.Value < 4 ? Brushes.White : Brushes.Black);
 }