예제 #1
0
        /// <summary>
        /// Initializes an instance of SLFourIconSetOptions.
        /// </summary>
        /// <param name="IconSetType">The type of icon set.</param>
        public SLFourIconSetOptions(SLFourIconSetValues IconSetType)
        {
            this.IconSetType      = IconSetType;
            this.ReverseIconOrder = false;
            this.ShowIconOnly     = false;

            this.IsCustomIcon = false;

            this.GreaterThanOrEqual2 = true;
            this.GreaterThanOrEqual3 = true;
            this.GreaterThanOrEqual4 = true;

            switch (IconSetType)
            {
            case SLFourIconSetValues.FourArrows:
                this.vIcon1 = SLIconValues.RedDownArrow;
                this.vIcon2 = SLIconValues.YellowDownInclineArrow;
                this.vIcon3 = SLIconValues.YellowUpInclineArrow;
                this.vIcon4 = SLIconValues.GreenUpArrow;
                break;

            case SLFourIconSetValues.FourArrowsGray:
                this.vIcon1 = SLIconValues.GrayDownArrow;
                this.vIcon2 = SLIconValues.GrayDownInclineArrow;
                this.vIcon3 = SLIconValues.GrayUpInclineArrow;
                this.vIcon4 = SLIconValues.GrayUpArrow;
                break;

            case SLFourIconSetValues.FourRating:
                this.vIcon1 = SLIconValues.SignalMeterWithOneFilledBar;
                this.vIcon2 = SLIconValues.SignalMeterWithTwoFilledBars;
                this.vIcon3 = SLIconValues.SignalMeterWithThreeFilledBars;
                this.vIcon4 = SLIconValues.SignalMeterWithFourFilledBars;
                break;

            case SLFourIconSetValues.FourRedToBlack:
                this.vIcon1 = SLIconValues.BlackCircle;
                this.vIcon2 = SLIconValues.GrayCircle;
                this.vIcon3 = SLIconValues.PinkCircle;
                this.vIcon4 = SLIconValues.RedCircle;
                break;

            case SLFourIconSetValues.FourTrafficLights:
                this.vIcon1 = SLIconValues.BlackCircleWithBorder;
                this.vIcon2 = SLIconValues.RedCircleWithBorder;
                this.vIcon3 = SLIconValues.YellowCircle;
                this.vIcon4 = SLIconValues.GreenCircle;
                break;
            }

            this.Value2 = "25";
            this.Value3 = "50";
            this.Value4 = "75";

            this.Type2 = SLConditionalFormatRangeValues.Percent;
            this.Type3 = SLConditionalFormatRangeValues.Percent;
            this.Type4 = SLConditionalFormatRangeValues.Percent;
        }
        private void SetCustomColorScale(SLConditionalFormatMinMaxValues MinType, string MinValue, SLColor MinColor,
            bool HasMidPoint, SLConditionalFormatRangeValues MidPointType, string MidPointValue, SLColor MidPointColor,
            SLConditionalFormatMinMaxValues MaxType, string MaxValue, SLColor MaxColor)
        {
            SLConditionalFormattingRule cfr = new SLConditionalFormattingRule();
            cfr.Type = ConditionalFormatValues.ColorScale;

            SLConditionalFormatValueObject cfvo;

            cfvo = new SLConditionalFormatValueObject();
            switch (MinType)
            {
                case SLConditionalFormatMinMaxValues.Value:
                    cfvo.Type = ConditionalFormatValueObjectValues.Min;
                    break;
                case SLConditionalFormatMinMaxValues.Number:
                    cfvo.Type = ConditionalFormatValueObjectValues.Number;
                    break;
                case SLConditionalFormatMinMaxValues.Percent:
                    cfvo.Type = ConditionalFormatValueObjectValues.Percent;
                    break;
                case SLConditionalFormatMinMaxValues.Formula:
                    cfvo.Type = ConditionalFormatValueObjectValues.Formula;
                    break;
                case SLConditionalFormatMinMaxValues.Percentile:
                    cfvo.Type = ConditionalFormatValueObjectValues.Percentile;
                    break;
            }
            cfvo.Val = MinValue;
            cfr.ColorScale.Cfvos.Add(cfvo);
            cfr.ColorScale.Colors.Add(MinColor.Clone());

            if (HasMidPoint)
            {
                cfvo = new SLConditionalFormatValueObject();
                switch (MidPointType)
                {
                    case SLConditionalFormatRangeValues.Number:
                        cfvo.Type = ConditionalFormatValueObjectValues.Number;
                        break;
                    case SLConditionalFormatRangeValues.Percent:
                        cfvo.Type = ConditionalFormatValueObjectValues.Percent;
                        break;
                    case SLConditionalFormatRangeValues.Formula:
                        cfvo.Type = ConditionalFormatValueObjectValues.Formula;
                        break;
                    case SLConditionalFormatRangeValues.Percentile:
                        cfvo.Type = ConditionalFormatValueObjectValues.Percentile;
                        break;
                }
                cfvo.Val = MidPointValue;
                cfr.ColorScale.Cfvos.Add(cfvo);
                cfr.ColorScale.Colors.Add(MidPointColor.Clone());
            }

            cfvo = new SLConditionalFormatValueObject();
            switch (MaxType)
            {
                case SLConditionalFormatMinMaxValues.Value:
                    cfvo.Type = ConditionalFormatValueObjectValues.Max;
                    break;
                case SLConditionalFormatMinMaxValues.Number:
                    cfvo.Type = ConditionalFormatValueObjectValues.Number;
                    break;
                case SLConditionalFormatMinMaxValues.Percent:
                    cfvo.Type = ConditionalFormatValueObjectValues.Percent;
                    break;
                case SLConditionalFormatMinMaxValues.Formula:
                    cfvo.Type = ConditionalFormatValueObjectValues.Formula;
                    break;
                case SLConditionalFormatMinMaxValues.Percentile:
                    cfvo.Type = ConditionalFormatValueObjectValues.Percentile;
                    break;
            }
            cfvo.Val = MaxValue;
            cfr.ColorScale.Cfvos.Add(cfvo);
            cfr.ColorScale.Colors.Add(MaxColor.Clone());

            cfr.HasColorScale = true;

            this.AppendRule(cfr);
        }
 internal ConditionalFormatValueObjectValues TranslateRangeValues(SLConditionalFormatRangeValues RangeValue)
 {
     ConditionalFormatValueObjectValues cfvov = ConditionalFormatValueObjectValues.Number;
     switch (RangeValue)
     {
         case SLConditionalFormatRangeValues.Number:
             cfvov = ConditionalFormatValueObjectValues.Number;
             break;
         case SLConditionalFormatRangeValues.Percent:
             cfvov = ConditionalFormatValueObjectValues.Percent;
             break;
         case SLConditionalFormatRangeValues.Formula:
             cfvov = ConditionalFormatValueObjectValues.Formula;
             break;
         case SLConditionalFormatRangeValues.Percentile:
             cfvov = ConditionalFormatValueObjectValues.Percentile;
             break;
     }
     return cfvov;
 }
        /// <summary>
        /// Set a custom 5-icon set.
        /// </summary>
        /// <param name="IconSetType">The type of 5-icon set.</param>
        /// <param name="ReverseIconOrder">True to reverse the order of the icons. False to use the default order.</param>
        /// <param name="ShowIconOnly">True to show only icons. False to show both icon and value.</param>
        /// <param name="GreaterThanOrEqual2">True if values are to be greater than or equal to the 2nd range value. False if values are to be strictly greater than.</param>
        /// <param name="Value2">The 2nd range value.</param>
        /// <param name="Type2">The conditional format type for the 2nd range value.</param>
        /// <param name="GreaterThanOrEqual3">True if values are to be greater than or equal to the 3rd range value. False if values are to be strictly greater than.</param>
        /// <param name="Value3">The 3rd range value.</param>
        /// <param name="Type3">The conditional format type for the 3rd range value.</param>
        /// <param name="GreaterThanOrEqual4">True if values are to be greater than or equal to the 4th range value. False if values are to be strictly greater than.</param>
        /// <param name="Value4">The 4th range value.</param>
        /// <param name="Type4">The conditional format type for the 4th range value.</param>
        /// <param name="GreaterThanOrEqual5">True if values are to be greater than or equal to the 5th range value. False if values are to be strictly greater than.</param>
        /// <param name="Value5">The 5th range value.</param>
        /// <param name="Type5">The conditional format type for the 5th range value.</param>
        public void SetCustomIconSet(SLFiveIconSetValues IconSetType, bool ReverseIconOrder, bool ShowIconOnly,
            bool GreaterThanOrEqual2, string Value2, SLConditionalFormatRangeValues Type2,
            bool GreaterThanOrEqual3, string Value3, SLConditionalFormatRangeValues Type3,
            bool GreaterThanOrEqual4, string Value4, SLConditionalFormatRangeValues Type4,
            bool GreaterThanOrEqual5, string Value5, SLConditionalFormatRangeValues Type5)
        {
            SLFiveIconSetOptions Options = new SLFiveIconSetOptions(IconSetType);
            Options.ReverseIconOrder = ReverseIconOrder;
            Options.ShowIconOnly = ShowIconOnly;

            Options.GreaterThanOrEqual2 = GreaterThanOrEqual2;
            Options.Value2 = Value2;
            Options.Type2 = Type2;

            Options.GreaterThanOrEqual3 = GreaterThanOrEqual3;
            Options.Value3 = Value3;
            Options.Type3 = Type3;

            Options.GreaterThanOrEqual4 = GreaterThanOrEqual4;
            Options.Value4 = Value4;
            Options.Type4 = Type4;

            Options.GreaterThanOrEqual5 = GreaterThanOrEqual5;
            Options.Value5 = Value5;
            Options.Type5 = Type5;

            this.SetCustomIconSet(Options);
        }
        /// <summary>
        /// Set a custom 3-color scale.
        /// </summary>
        /// <param name="MinType">The conditional format type for the minimum.</param>
        /// <param name="MinValue">The value for the minimum. If <paramref name="MinType"/> is Value, you can just set this to "0".</param>
        /// <param name="MinColor">The theme color for the minimum.</param>
        /// <param name="MinColorTint">The tint applied to the theme color, ranging from -1.0 to 1.0. Negative tints darken the theme color and positive tints lighten the theme color.</param>
        /// <param name="MidPointType">The conditional format type for the midpoint.</param>
        /// <param name="MidPointValue">The value for the midpoint.</param>
        /// <param name="MidPointColor">The theme color for the midpoint.</param>
        /// <param name="MidPointColorTint">The tint applied to the theme color, ranging from -1.0 to 1.0. Negative tints darken the theme color and positive tints lighten the theme color.</param>
        /// <param name="MaxType">The conditional format type for the maximum.</param>
        /// <param name="MaxValue">The value for the maximum. If <paramref name="MaxType"/> is Value, you can just set this to "0".</param>
        /// <param name="MaxColor">The theme color for the maximum.</param>
        /// <param name="MaxColorTint">The tint applied to the theme color, ranging from -1.0 to 1.0. Negative tints darken the theme color and positive tints lighten the theme color.</param>
        public void SetCustom3ColorScale(SLConditionalFormatMinMaxValues MinType, string MinValue, SLThemeColorIndexValues MinColor, double MinColorTint,
            SLConditionalFormatRangeValues MidPointType, string MidPointValue, SLThemeColorIndexValues MidPointColor, double MidPointColorTint,
            SLConditionalFormatMinMaxValues MaxType, string MaxValue, SLThemeColorIndexValues MaxColor, double MaxColorTint)
        {
            List<System.Drawing.Color> listempty = new List<System.Drawing.Color>();
            SLColor minclr = new SLColor(listempty, listempty);
            if (MinColorTint == 0) minclr.SetThemeColor(MinColor);
            else minclr.SetThemeColor(MinColor, MinColorTint);
            SLColor maxclr = new SLColor(listempty, listempty);
            if (MaxColorTint == 0) maxclr.SetThemeColor(MaxColor);
            else maxclr.SetThemeColor(MaxColor, MaxColorTint);

            SLColor midclr = new SLColor(listempty, listempty);
            if (MidPointColorTint == 0) midclr.SetThemeColor(MidPointColor);
            else midclr.SetThemeColor(MidPointColor, MidPointColorTint);
            this.SetCustomColorScale(MinType, MinValue, minclr, true, MidPointType, MidPointValue, midclr, MaxType, MaxValue, maxclr);
        }
        /// <summary>
        /// Set a custom 3-color scale.
        /// </summary>
        /// <param name="MinType">The conditional format type for the minimum.</param>
        /// <param name="MinValue">The value for the minimum. If <paramref name="MinType"/> is Value, you can just set this to "0".</param>
        /// <param name="MinColor">The color for the minimum.</param>
        /// <param name="MidPointType">The conditional format type for the midpoint.</param>
        /// <param name="MidPointValue">The value for the midpoint.</param>
        /// <param name="MidPointColor">The color for the midpoint.</param>
        /// <param name="MaxType">The conditional format type for the maximum.</param>
        /// <param name="MaxValue">The value for the maximum. If <paramref name="MaxType"/> is Value, you can just set this to "0".</param>
        /// <param name="MaxColor">The color for the maximum.</param>
        public void SetCustom3ColorScale(SLConditionalFormatMinMaxValues MinType, string MinValue, System.Drawing.Color MinColor,
            SLConditionalFormatRangeValues MidPointType, string MidPointValue, System.Drawing.Color MidPointColor,
            SLConditionalFormatMinMaxValues MaxType, string MaxValue, System.Drawing.Color MaxColor)
        {
            List<System.Drawing.Color> listempty = new List<System.Drawing.Color>();
            SLColor minclr = new SLColor(listempty, listempty);
            minclr.Color = MinColor;
            SLColor maxclr = new SLColor(listempty, listempty);
            maxclr.Color = MaxColor;

            SLColor midclr = new SLColor(listempty, listempty);
            midclr.Color = MidPointColor;
            this.SetCustomColorScale(MinType, MinValue, minclr, true, MidPointType, MidPointValue, midclr, MaxType, MaxValue, maxclr);
        }
        /// <summary>
        /// Initializes an instance of SLThreeIconSetOptions.
        /// </summary>
        /// <param name="IconSetType">The type of icon set.</param>
        public SLThreeIconSetOptions(SLThreeIconSetValues IconSetType)
        {
            this.IconSetType      = IconSetType;
            this.ReverseIconOrder = false;
            this.ShowIconOnly     = false;

            this.IsCustomIcon = false;

            switch (IconSetType)
            {
            case SLThreeIconSetValues.ThreeArrows:
                this.vIcon1 = SLIconValues.RedDownArrow;
                this.vIcon2 = SLIconValues.YellowSideArrow;
                this.vIcon3 = SLIconValues.GreenUpArrow;
                break;

            case SLThreeIconSetValues.ThreeArrowsGray:
                this.vIcon1 = SLIconValues.GrayDownArrow;
                this.vIcon2 = SLIconValues.GraySideArrow;
                this.vIcon3 = SLIconValues.GrayUpArrow;
                break;

            case SLThreeIconSetValues.ThreeFlags:
                this.vIcon1 = SLIconValues.RedFlag;
                this.vIcon2 = SLIconValues.YellowFlag;
                this.vIcon3 = SLIconValues.GreenFlag;
                break;

            case SLThreeIconSetValues.ThreeSigns:
                this.vIcon1 = SLIconValues.RedDiamond;
                this.vIcon2 = SLIconValues.YellowTriangle;
                this.vIcon3 = SLIconValues.GreenCircle;
                break;

            case SLThreeIconSetValues.ThreeStars:
                this.vIcon1 = SLIconValues.SilverStar;
                this.vIcon2 = SLIconValues.HalfGoldStar;
                this.vIcon3 = SLIconValues.GoldStar;
                break;

            case SLThreeIconSetValues.ThreeSymbols:
                this.vIcon1 = SLIconValues.RedCrossSymbol;
                this.vIcon2 = SLIconValues.YellowExclamationSymbol;
                this.vIcon3 = SLIconValues.GreenCheckSymbol;
                break;

            case SLThreeIconSetValues.ThreeSymbols2:
                this.vIcon1 = SLIconValues.RedCross;
                this.vIcon2 = SLIconValues.YellowExclamation;
                this.vIcon3 = SLIconValues.GreenCheck;
                break;

            case SLThreeIconSetValues.ThreeTrafficLights1:
                this.vIcon1 = SLIconValues.RedCircleWithBorder;
                this.vIcon2 = SLIconValues.YellowCircle;
                this.vIcon3 = SLIconValues.GreenCircle;
                break;

            case SLThreeIconSetValues.ThreeTrafficLights2:
                this.vIcon1 = SLIconValues.RedTrafficLight;
                this.vIcon2 = SLIconValues.YellowTrafficLight;
                this.vIcon3 = SLIconValues.GreenTrafficLight;
                break;

            case SLThreeIconSetValues.ThreeTriangles:
                this.vIcon1 = SLIconValues.RedDownTriangle;
                this.vIcon2 = SLIconValues.YellowDash;
                this.vIcon3 = SLIconValues.GreenUpTriangle;
                break;
            }

            this.GreaterThanOrEqual2 = true;
            this.GreaterThanOrEqual3 = true;

            this.Value2 = "33";
            this.Value3 = "67";

            this.Type2 = SLConditionalFormatRangeValues.Percent;
            this.Type3 = SLConditionalFormatRangeValues.Percent;
        }
예제 #8
0
        /// <summary>
        /// Initializes an instance of SLFiveIconSetOptions.
        /// </summary>
        /// <param name="IconSetType">The type of icon set.</param>
        public SLFiveIconSetOptions(SLFiveIconSetValues IconSetType)
        {
            this.IconSetType      = IconSetType;
            this.ReverseIconOrder = false;
            this.ShowIconOnly     = false;

            this.IsCustomIcon = false;

            this.GreaterThanOrEqual2 = true;
            this.GreaterThanOrEqual3 = true;
            this.GreaterThanOrEqual4 = true;
            this.GreaterThanOrEqual5 = true;

            switch (IconSetType)
            {
            case SLFiveIconSetValues.FiveArrows:
                this.vIcon1 = SLIconValues.RedDownArrow;
                this.vIcon2 = SLIconValues.YellowDownInclineArrow;
                this.vIcon3 = SLIconValues.YellowSideArrow;
                this.vIcon4 = SLIconValues.YellowUpInclineArrow;
                this.vIcon5 = SLIconValues.GreenUpArrow;
                break;

            case SLFiveIconSetValues.FiveArrowsGray:
                this.vIcon1 = SLIconValues.GrayDownArrow;
                this.vIcon2 = SLIconValues.GrayDownInclineArrow;
                this.vIcon3 = SLIconValues.GraySideArrow;
                this.vIcon4 = SLIconValues.GrayUpInclineArrow;
                this.vIcon5 = SLIconValues.GrayUpArrow;
                break;

            case SLFiveIconSetValues.FiveBoxes:
                this.vIcon1 = SLIconValues.ZeroFilledBoxes;
                this.vIcon2 = SLIconValues.OneFilledBox;
                this.vIcon3 = SLIconValues.TwoFilledBoxes;
                this.vIcon4 = SLIconValues.ThreeFilledBoxes;
                this.vIcon5 = SLIconValues.FourFilledBoxes;
                break;

            case SLFiveIconSetValues.FiveQuarters:
                this.vIcon1 = SLIconValues.WhiteCircleAllWhiteQuarters;
                this.vIcon2 = SLIconValues.CircleWithThreeWhiteQuarters;
                this.vIcon3 = SLIconValues.CircleWithTwoWhiteQuarters;
                this.vIcon4 = SLIconValues.CircleWithOneWhiteQuarter;
                this.vIcon5 = SLIconValues.BlackCircle;
                break;

            case SLFiveIconSetValues.FiveRating:
                this.vIcon1 = SLIconValues.SignalMeterWithNoFilledBars;
                this.vIcon2 = SLIconValues.SignalMeterWithOneFilledBar;
                this.vIcon3 = SLIconValues.SignalMeterWithTwoFilledBars;
                this.vIcon4 = SLIconValues.SignalMeterWithThreeFilledBars;
                this.vIcon5 = SLIconValues.SignalMeterWithFourFilledBars;
                break;
            }

            this.Value2 = "20";
            this.Value3 = "40";
            this.Value4 = "60";
            this.Value5 = "80";

            this.Type2 = SLConditionalFormatRangeValues.Percent;
            this.Type3 = SLConditionalFormatRangeValues.Percent;
            this.Type4 = SLConditionalFormatRangeValues.Percent;
            this.Type5 = SLConditionalFormatRangeValues.Percent;
        }
        /// <summary>
        /// Set a custom 5-icon set.
        /// </summary>
        /// <param name="IconSetType">The type of 3-icon set.</param>
        /// <param name="ReverseIconOrder">True to reverse the order of the icons. False to use the default order.</param>
        /// <param name="ShowIconOnly">True to show only icons. False to show both icon and value.</param>
        /// <param name="GreaterThanOrEqual2">True if values are to be greater than or equal to the 2nd range value. False if values are to be strictly greater than.</param>
        /// <param name="Value2">The 2nd range value.</param>
        /// <param name="Type2">The conditional format type for the 2nd range value.</param>
        /// <param name="GreaterThanOrEqual3">True if values are to be greater than or equal to the 3rd range value. False if values are to be strictly greater than.</param>
        /// <param name="Value3">The 3rd range value.</param>
        /// <param name="Type3">The conditional format type for the 3rd range value.</param>
        /// <param name="GreaterThanOrEqual4">True if values are to be greater than or equal to the 4th range value. False if values are to be strictly greater than.</param>
        /// <param name="Value4">The 4th range value.</param>
        /// <param name="Type4">The conditional format type for the 4th range value.</param>
        /// <param name="GreaterThanOrEqual5">True if values are to be greater than or equal to the 5th range value. False if values are to be strictly greater than.</param>
        /// <param name="Value5">The 5th range value.</param>
        /// <param name="Type5">The conditional format type for the 5th range value.</param>
        public void SetCustomIconSet(SLFiveIconSetValues IconSetType, bool ReverseIconOrder, bool ShowIconOnly,
            bool GreaterThanOrEqual2, string Value2, SLConditionalFormatRangeValues Type2,
            bool GreaterThanOrEqual3, string Value3, SLConditionalFormatRangeValues Type3,
            bool GreaterThanOrEqual4, string Value4, SLConditionalFormatRangeValues Type4,
            bool GreaterThanOrEqual5, string Value5, SLConditionalFormatRangeValues Type5)
        {
            SLConditionalFormattingRule cfr = new SLConditionalFormattingRule();
            cfr.Type = ConditionalFormatValues.IconSet;
            cfr.IconSet.Reverse = ReverseIconOrder;
            cfr.IconSet.ShowValue = !ShowIconOnly;

            switch (IconSetType)
            {
                case SLFiveIconSetValues.FiveArrows:
                    cfr.IconSet.IconSetValue = IconSetValues.FiveArrows;
                    break;
                case SLFiveIconSetValues.FiveArrowsGray:
                    cfr.IconSet.IconSetValue = IconSetValues.FiveArrowsGray;
                    break;
                case SLFiveIconSetValues.FiveQuarters:
                    cfr.IconSet.IconSetValue = IconSetValues.FiveQuarters;
                    break;
                case SLFiveIconSetValues.FiveRating:
                    cfr.IconSet.IconSetValue = IconSetValues.FiveRating;
                    break;
            }

            SLConditionalFormatValueObject cfvo;

            cfvo = new SLConditionalFormatValueObject();
            cfvo.Type = ConditionalFormatValueObjectValues.Percent;
            cfvo.Val = "0";
            cfr.IconSet.Cfvos.Add(cfvo);

            cfvo = new SLConditionalFormatValueObject();
            cfvo.Type = this.TranslateRangeValues(Type2);
            cfvo.Val = Value2;
            cfvo.GreaterThanOrEqual = GreaterThanOrEqual2;
            cfr.IconSet.Cfvos.Add(cfvo);

            cfvo = new SLConditionalFormatValueObject();
            cfvo.Type = this.TranslateRangeValues(Type3);
            cfvo.Val = Value3;
            cfvo.GreaterThanOrEqual = GreaterThanOrEqual3;
            cfr.IconSet.Cfvos.Add(cfvo);

            cfvo = new SLConditionalFormatValueObject();
            cfvo.Type = this.TranslateRangeValues(Type4);
            cfvo.Val = Value4;
            cfvo.GreaterThanOrEqual = GreaterThanOrEqual4;
            cfr.IconSet.Cfvos.Add(cfvo);

            cfvo = new SLConditionalFormatValueObject();
            cfvo.Type = this.TranslateRangeValues(Type5);
            cfvo.Val = Value5;
            cfvo.GreaterThanOrEqual = GreaterThanOrEqual5;
            cfr.IconSet.Cfvos.Add(cfvo);

            cfr.HasIconSet = true;

            this.AppendRule(cfr);
        }
예제 #10
0
        /// <summary>
        /// Set a custom 3-icon set.
        /// </summary>
        /// <param name="IconSetType">The type of 3-icon set.</param>
        /// <param name="ReverseIconOrder">True to reverse the order of the icons. False to use the default order.</param>
        /// <param name="ShowIconOnly">True to show only icons. False to show both icon and value.</param>
        /// <param name="GreaterThanOrEqual2">True if values are to be greater than or equal to the 2nd range value. False if values are to be strictly greater than.</param>
        /// <param name="Value2">The 2nd range value.</param>
        /// <param name="Type2">The conditional format type for the 2nd range value.</param>
        /// <param name="GreaterThanOrEqual3">True if values are to be greater than or equal to the 3rd range value. False if values are to be strictly greater than.</param>
        /// <param name="Value3">The 3rd range value.</param>
        /// <param name="Type3">The conditional format type for the 3rd range value.</param>
        public void SetCustomIconSet(SLThreeIconSetValues IconSetType, bool ReverseIconOrder, bool ShowIconOnly,
            bool GreaterThanOrEqual2, string Value2, SLConditionalFormatRangeValues Type2,
            bool GreaterThanOrEqual3, string Value3, SLConditionalFormatRangeValues Type3)
        {
            SLConditionalFormattingRule cfr = new SLConditionalFormattingRule();
            cfr.Type = ConditionalFormatValues.IconSet;
            cfr.IconSet.Reverse = ReverseIconOrder;
            cfr.IconSet.ShowValue = !ShowIconOnly;

            switch (IconSetType)
            {
                case SLThreeIconSetValues.ThreeArrows:
                    cfr.IconSet.IconSetValue = IconSetValues.ThreeArrows;
                    break;
                case SLThreeIconSetValues.ThreeArrowsGray:
                    cfr.IconSet.IconSetValue = IconSetValues.ThreeArrowsGray;
                    break;
                case SLThreeIconSetValues.ThreeFlags:
                    cfr.IconSet.IconSetValue = IconSetValues.ThreeFlags;
                    break;
                case SLThreeIconSetValues.ThreeSigns:
                    cfr.IconSet.IconSetValue = IconSetValues.ThreeSigns;
                    break;
                case SLThreeIconSetValues.ThreeSymbols:
                    cfr.IconSet.IconSetValue = IconSetValues.ThreeSymbols;
                    break;
                case SLThreeIconSetValues.ThreeSymbols2:
                    cfr.IconSet.IconSetValue = IconSetValues.ThreeSymbols2;
                    break;
                case SLThreeIconSetValues.ThreeTrafficLights1:
                    cfr.IconSet.IconSetValue = IconSetValues.ThreeTrafficLights1;
                    break;
                case SLThreeIconSetValues.ThreeTrafficLights2:
                    cfr.IconSet.IconSetValue = IconSetValues.ThreeTrafficLights2;
                    break;
            }

            SLConditionalFormatValueObject cfvo;

            cfvo = new SLConditionalFormatValueObject();
            cfvo.Type = ConditionalFormatValueObjectValues.Percent;
            cfvo.Val = "0";
            cfr.IconSet.Cfvos.Add(cfvo);

            cfvo = new SLConditionalFormatValueObject();
            cfvo.Type = this.TranslateRangeValues(Type2);
            cfvo.Val = Value2;
            cfvo.GreaterThanOrEqual = GreaterThanOrEqual2;
            cfr.IconSet.Cfvos.Add(cfvo);

            cfvo = new SLConditionalFormatValueObject();
            cfvo.Type = this.TranslateRangeValues(Type3);
            cfvo.Val = Value3;
            cfvo.GreaterThanOrEqual = GreaterThanOrEqual3;
            cfr.IconSet.Cfvos.Add(cfvo);

            cfr.HasIconSet = true;

            this.AppendRule(cfr);
        }