Exemplo n.º 1
0
        /// <summary>
        /// Update middle colors of region layers.
        /// </summary>
        private void UpdateMiddleColors()
        {
            IEnumerable <int> colors;

            if (OperationProtocol.ColorCalculation.HueViaRed == ColorCalculation)
            {
                colors = ColorGeneration.CreateHueTransitionViaRed(ColorValueOfRegionFirst, ColorValueOfRegionLast, CountOfRegionLayers);
            }
            else if (OperationProtocol.ColorCalculation.Rgb == ColorCalculation)
            {
                colors = ColorGeneration.CreateRgbTransition(ColorValueOfRegionFirst, ColorValueOfRegionLast, CountOfRegionLayers);
            }
            else
            {
                colors = ColorGeneration.CreateHueTransition(ColorValueOfRegionFirst, ColorValueOfRegionLast, CountOfRegionLayers);
            }

            PaddingColors = colors;
        }
Exemplo n.º 2
0
        private void ApplyThemePalette()
        {
            ColorGeneration palette = (ColorGeneration)Enum.Parse(typeof(ColorGeneration), comboPalette.SelectedValue.ToString());

            c1Chart1.ColorGeneration = palette;
        }