/// <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; }
/// <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; }
/// <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; }
internal static SLIconValues TranslateIconSetType(X14.IconSetTypeValues IconSetType, uint IconId) { SLIconValues result = SLIconValues.NoIcon; switch (IconSetType) { case X14.IconSetTypeValues.FiveArrows: if (IconId == 0) { result = SLIconValues.RedDownArrow; } else if (IconId == 1) { result = SLIconValues.YellowDownInclineArrow; } else if (IconId == 2) { result = SLIconValues.YellowSideArrow; } else if (IconId == 3) { result = SLIconValues.YellowUpInclineArrow; } else if (IconId == 4) { result = SLIconValues.GreenUpArrow; } break; case X14.IconSetTypeValues.FiveArrowsGray: if (IconId == 0) { result = SLIconValues.GrayDownArrow; } else if (IconId == 1) { result = SLIconValues.GrayDownInclineArrow; } else if (IconId == 2) { result = SLIconValues.GraySideArrow; } else if (IconId == 3) { result = SLIconValues.GrayUpInclineArrow; } else if (IconId == 4) { result = SLIconValues.GrayUpArrow; } break; case X14.IconSetTypeValues.FiveBoxes: if (IconId == 0) { result = SLIconValues.ZeroFilledBoxes; } else if (IconId == 1) { result = SLIconValues.OneFilledBox; } else if (IconId == 2) { result = SLIconValues.TwoFilledBoxes; } else if (IconId == 3) { result = SLIconValues.ThreeFilledBoxes; } else if (IconId == 4) { result = SLIconValues.FourFilledBoxes; } break; case X14.IconSetTypeValues.FiveQuarters: if (IconId == 0) { result = SLIconValues.WhiteCircleAllWhiteQuarters; } else if (IconId == 1) { result = SLIconValues.CircleWithThreeWhiteQuarters; } else if (IconId == 2) { result = SLIconValues.CircleWithTwoWhiteQuarters; } else if (IconId == 3) { result = SLIconValues.CircleWithOneWhiteQuarter; } else if (IconId == 4) { result = SLIconValues.BlackCircle; } break; case X14.IconSetTypeValues.FiveRating: if (IconId == 0) { result = SLIconValues.SignalMeterWithNoFilledBars; } else if (IconId == 1) { result = SLIconValues.SignalMeterWithOneFilledBar; } else if (IconId == 2) { result = SLIconValues.SignalMeterWithTwoFilledBars; } else if (IconId == 3) { result = SLIconValues.SignalMeterWithThreeFilledBars; } else if (IconId == 4) { result = SLIconValues.SignalMeterWithFourFilledBars; } break; case X14.IconSetTypeValues.FourArrows: if (IconId == 0) { result = SLIconValues.RedDownArrow; } else if (IconId == 1) { result = SLIconValues.YellowDownInclineArrow; } else if (IconId == 2) { result = SLIconValues.YellowUpInclineArrow; } else if (IconId == 3) { result = SLIconValues.GreenUpArrow; } break; case X14.IconSetTypeValues.FourArrowsGray: if (IconId == 0) { result = SLIconValues.GrayDownArrow; } else if (IconId == 1) { result = SLIconValues.GrayDownInclineArrow; } else if (IconId == 2) { result = SLIconValues.GrayUpInclineArrow; } else if (IconId == 3) { result = SLIconValues.GrayUpArrow; } break; case X14.IconSetTypeValues.FourRating: if (IconId == 0) { result = SLIconValues.SignalMeterWithOneFilledBar; } else if (IconId == 1) { result = SLIconValues.SignalMeterWithTwoFilledBars; } else if (IconId == 2) { result = SLIconValues.SignalMeterWithThreeFilledBars; } else if (IconId == 3) { result = SLIconValues.SignalMeterWithFourFilledBars; } break; case X14.IconSetTypeValues.FourRedToBlack: if (IconId == 0) { result = SLIconValues.BlackCircle; } else if (IconId == 1) { result = SLIconValues.GrayCircle; } else if (IconId == 2) { result = SLIconValues.PinkCircle; } else if (IconId == 3) { result = SLIconValues.RedCircle; } break; case X14.IconSetTypeValues.FourTrafficLights: if (IconId == 0) { result = SLIconValues.BlackCircleWithBorder; } else if (IconId == 1) { result = SLIconValues.RedCircleWithBorder; } else if (IconId == 2) { result = SLIconValues.YellowCircle; } else if (IconId == 3) { result = SLIconValues.GreenCircle; } break; case X14.IconSetTypeValues.NoIcons: result = SLIconValues.NoIcon; break; case X14.IconSetTypeValues.ThreeArrows: if (IconId == 0) { result = SLIconValues.RedDownArrow; } else if (IconId == 1) { result = SLIconValues.YellowSideArrow; } else if (IconId == 2) { result = SLIconValues.GreenUpArrow; } break; case X14.IconSetTypeValues.ThreeArrowsGray: if (IconId == 0) { result = SLIconValues.GrayDownArrow; } else if (IconId == 1) { result = SLIconValues.GraySideArrow; } else if (IconId == 2) { result = SLIconValues.GrayUpArrow; } break; case X14.IconSetTypeValues.ThreeFlags: if (IconId == 0) { result = SLIconValues.RedFlag; } else if (IconId == 1) { result = SLIconValues.YellowFlag; } else if (IconId == 2) { result = SLIconValues.GreenFlag; } break; case X14.IconSetTypeValues.ThreeSigns: if (IconId == 0) { result = SLIconValues.RedDiamond; } else if (IconId == 1) { result = SLIconValues.YellowTriangle; } else if (IconId == 2) { result = SLIconValues.GreenCircle; } break; case X14.IconSetTypeValues.ThreeStars: if (IconId == 0) { result = SLIconValues.SilverStar; } else if (IconId == 1) { result = SLIconValues.HalfGoldStar; } else if (IconId == 2) { result = SLIconValues.GoldStar; } break; case X14.IconSetTypeValues.ThreeSymbols: if (IconId == 0) { result = SLIconValues.RedCrossSymbol; } else if (IconId == 1) { result = SLIconValues.YellowExclamationSymbol; } else if (IconId == 2) { result = SLIconValues.GreenCheckSymbol; } break; case X14.IconSetTypeValues.ThreeSymbols2: if (IconId == 0) { result = SLIconValues.RedCross; } else if (IconId == 1) { result = SLIconValues.YellowExclamation; } else if (IconId == 2) { result = SLIconValues.GreenCheck; } break; case X14.IconSetTypeValues.ThreeTrafficLights1: if (IconId == 0) { result = SLIconValues.RedCircleWithBorder; } else if (IconId == 1) { result = SLIconValues.YellowCircle; } else if (IconId == 2) { result = SLIconValues.GreenCircle; } break; case X14.IconSetTypeValues.ThreeTrafficLights2: if (IconId == 0) { result = SLIconValues.RedTrafficLight; } else if (IconId == 1) { result = SLIconValues.YellowTrafficLight; } else if (IconId == 2) { result = SLIconValues.GreenTrafficLight; } break; case X14.IconSetTypeValues.ThreeTriangles: if (IconId == 0) { result = SLIconValues.RedDownArrow; } else if (IconId == 1) { result = SLIconValues.YellowDash; } else if (IconId == 2) { result = SLIconValues.GreenUpArrow; } break; } return(result); }
internal static void TranslateCustomIcon(SLIconValues Icon, out X14.IconSetTypeValues IconSetType, out uint IconId) { IconSetType = X14.IconSetTypeValues.ThreeTrafficLights1; IconId = 0; switch (Icon) { case SLIconValues.NoIcon: IconSetType = X14.IconSetTypeValues.NoIcons; IconId = 0; break; case SLIconValues.GreenUpArrow: IconSetType = X14.IconSetTypeValues.ThreeArrows; IconId = 2; break; case SLIconValues.YellowSideArrow: IconSetType = X14.IconSetTypeValues.ThreeArrows; IconId = 1; break; case SLIconValues.RedDownArrow: IconSetType = X14.IconSetTypeValues.ThreeArrows; IconId = 0; break; case SLIconValues.GrayUpArrow: IconSetType = X14.IconSetTypeValues.ThreeArrowsGray; IconId = 2; break; case SLIconValues.GraySideArrow: IconSetType = X14.IconSetTypeValues.ThreeArrowsGray; IconId = 1; break; case SLIconValues.GrayDownArrow: IconSetType = X14.IconSetTypeValues.ThreeArrowsGray; IconId = 0; break; case SLIconValues.GreenFlag: IconSetType = X14.IconSetTypeValues.ThreeFlags; IconId = 2; break; case SLIconValues.YellowFlag: IconSetType = X14.IconSetTypeValues.ThreeFlags; IconId = 1; break; case SLIconValues.RedFlag: IconSetType = X14.IconSetTypeValues.ThreeFlags; IconId = 0; break; case SLIconValues.GreenCircle: IconSetType = X14.IconSetTypeValues.ThreeTrafficLights1; IconId = 2; break; case SLIconValues.YellowCircle: IconSetType = X14.IconSetTypeValues.ThreeTrafficLights1; IconId = 1; break; case SLIconValues.RedCircleWithBorder: IconSetType = X14.IconSetTypeValues.ThreeTrafficLights1; IconId = 0; break; case SLIconValues.BlackCircleWithBorder: IconSetType = X14.IconSetTypeValues.FourTrafficLights; IconId = 0; break; case SLIconValues.GreenTrafficLight: IconSetType = X14.IconSetTypeValues.ThreeTrafficLights2; IconId = 2; break; case SLIconValues.YellowTrafficLight: IconSetType = X14.IconSetTypeValues.ThreeTrafficLights2; IconId = 1; break; case SLIconValues.RedTrafficLight: IconSetType = X14.IconSetTypeValues.ThreeTrafficLights2; IconId = 0; break; case SLIconValues.YellowTriangle: IconSetType = X14.IconSetTypeValues.ThreeSigns; IconId = 1; break; case SLIconValues.RedDiamond: IconSetType = X14.IconSetTypeValues.ThreeSigns; IconId = 0; break; case SLIconValues.GreenCheckSymbol: IconSetType = X14.IconSetTypeValues.ThreeSymbols; IconId = 2; break; case SLIconValues.YellowExclamationSymbol: IconSetType = X14.IconSetTypeValues.ThreeSymbols; IconId = 1; break; case SLIconValues.RedCrossSymbol: IconSetType = X14.IconSetTypeValues.ThreeSymbols; IconId = 0; break; case SLIconValues.GreenCheck: IconSetType = X14.IconSetTypeValues.ThreeSymbols2; IconId = 2; break; case SLIconValues.YellowExclamation: IconSetType = X14.IconSetTypeValues.ThreeSymbols2; IconId = 1; break; case SLIconValues.RedCross: IconSetType = X14.IconSetTypeValues.ThreeSymbols2; IconId = 0; break; case SLIconValues.YellowUpInclineArrow: IconSetType = X14.IconSetTypeValues.FourArrows; IconId = 2; break; case SLIconValues.YellowDownInclineArrow: IconSetType = X14.IconSetTypeValues.FourArrows; IconId = 1; break; case SLIconValues.GrayUpInclineArrow: IconSetType = X14.IconSetTypeValues.FourArrowsGray; IconId = 2; break; case SLIconValues.GrayDownInclineArrow: IconSetType = X14.IconSetTypeValues.FourArrowsGray; IconId = 1; break; case SLIconValues.RedCircle: IconSetType = X14.IconSetTypeValues.FourRedToBlack; IconId = 3; break; case SLIconValues.PinkCircle: IconSetType = X14.IconSetTypeValues.FourRedToBlack; IconId = 2; break; case SLIconValues.GrayCircle: IconSetType = X14.IconSetTypeValues.FourRedToBlack; IconId = 1; break; case SLIconValues.BlackCircle: IconSetType = X14.IconSetTypeValues.FourRedToBlack; IconId = 0; break; case SLIconValues.CircleWithOneWhiteQuarter: IconSetType = X14.IconSetTypeValues.FiveQuarters; IconId = 3; break; case SLIconValues.CircleWithTwoWhiteQuarters: IconSetType = X14.IconSetTypeValues.FiveQuarters; IconId = 2; break; case SLIconValues.CircleWithThreeWhiteQuarters: IconSetType = X14.IconSetTypeValues.FiveQuarters; IconId = 1; break; case SLIconValues.WhiteCircleAllWhiteQuarters: IconSetType = X14.IconSetTypeValues.FiveQuarters; IconId = 0; break; case SLIconValues.SignalMeterWithNoFilledBars: IconSetType = X14.IconSetTypeValues.FiveRating; IconId = 0; break; case SLIconValues.SignalMeterWithOneFilledBar: IconSetType = X14.IconSetTypeValues.FiveRating; IconId = 1; break; case SLIconValues.SignalMeterWithTwoFilledBars: IconSetType = X14.IconSetTypeValues.FiveRating; IconId = 2; break; case SLIconValues.SignalMeterWithThreeFilledBars: IconSetType = X14.IconSetTypeValues.FiveRating; IconId = 3; break; case SLIconValues.SignalMeterWithFourFilledBars: IconSetType = X14.IconSetTypeValues.FiveRating; IconId = 4; break; case SLIconValues.GoldStar: IconSetType = X14.IconSetTypeValues.ThreeStars; IconId = 2; break; case SLIconValues.HalfGoldStar: IconSetType = X14.IconSetTypeValues.ThreeStars; IconId = 1; break; case SLIconValues.SilverStar: IconSetType = X14.IconSetTypeValues.ThreeStars; IconId = 0; break; case SLIconValues.GreenUpTriangle: IconSetType = X14.IconSetTypeValues.ThreeTriangles; IconId = 2; break; case SLIconValues.YellowDash: IconSetType = X14.IconSetTypeValues.ThreeTriangles; IconId = 1; break; case SLIconValues.RedDownTriangle: IconSetType = X14.IconSetTypeValues.ThreeTriangles; IconId = 0; break; case SLIconValues.FourFilledBoxes: IconSetType = X14.IconSetTypeValues.FiveBoxes; IconId = 4; break; case SLIconValues.ThreeFilledBoxes: IconSetType = X14.IconSetTypeValues.FiveBoxes; IconId = 3; break; case SLIconValues.TwoFilledBoxes: IconSetType = X14.IconSetTypeValues.FiveBoxes; IconId = 2; break; case SLIconValues.OneFilledBox: IconSetType = X14.IconSetTypeValues.FiveBoxes; IconId = 1; break; case SLIconValues.ZeroFilledBoxes: IconSetType = X14.IconSetTypeValues.FiveBoxes; IconId = 0; break; } }