コード例 #1
0
        internal void FromIconFilter(IconFilter icf)
        {
            this.SetAllNull();

            this.IconSet = icf.IconSet.Value;
            if (icf.IconId != null) this.IconId = icf.IconId.Value;
        }
コード例 #2
0
        private void SetAllNull()
        {
            this.Descending = null;
            this.vSortBy    = SortByValues.Value;
            this.HasSortBy  = false;

            this.StartRowIndex    = 1;
            this.StartColumnIndex = 1;
            this.EndRowIndex      = 1;
            this.EndColumnIndex   = 1;

            this.CustomList = null;
            this.FormatId   = null;

            this.vIconSet   = IconSetValues.ThreeArrows;
            this.HasIconSet = false;

            this.IconId = null;
        }
コード例 #3
0
        private void SetAllNull()
        {
            this.Descending = null;
            this.vSortBy = SortByValues.Value;
            this.HasSortBy = false;

            this.StartRowIndex = 1;
            this.StartColumnIndex = 1;
            this.EndRowIndex = 1;
            this.EndColumnIndex = 1;

            this.CustomList = null;
            this.FormatId = null;

            this.vIconSet = IconSetValues.ThreeArrows;
            this.HasIconSet = false;

            this.IconId = null;
        }
コード例 #4
0
        private void SetAllNull()
        {
            Descending = null;
            vSortBy    = SortByValues.Value;
            HasSortBy  = false;

            StartRowIndex    = 1;
            StartColumnIndex = 1;
            EndRowIndex      = 1;
            EndColumnIndex   = 1;

            CustomList = null;
            FormatId   = null;

            vIconSet   = IconSetValues.ThreeArrows;
            HasIconSet = false;

            IconId = null;
        }
コード例 #5
0
 /// <summary>
 /// Set an icon set formatting with built-in types.
 /// </summary>
 /// <param name="IconSetType">A built-in icon set type.</param>
 public void SetIconSet(IconSetValues IconSetType)
 {
     switch (IconSetType)
     {
         case IconSetValues.FiveArrows:
             this.SetCustomIconSet(new SLFiveIconSetOptions(SLFiveIconSetValues.FiveArrows));
             break;
         case IconSetValues.FiveArrowsGray:
             this.SetCustomIconSet(new SLFiveIconSetOptions(SLFiveIconSetValues.FiveArrowsGray));
             break;
         case IconSetValues.FiveQuarters:
             this.SetCustomIconSet(new SLFiveIconSetOptions(SLFiveIconSetValues.FiveQuarters));
             break;
         case IconSetValues.FiveRating:
             this.SetCustomIconSet(new SLFiveIconSetOptions(SLFiveIconSetValues.FiveRating));
             break;
         case IconSetValues.FourArrows:
             this.SetCustomIconSet(new SLFourIconSetOptions(SLFourIconSetValues.FourArrows));
             break;
         case IconSetValues.FourArrowsGray:
             this.SetCustomIconSet(new SLFourIconSetOptions(SLFourIconSetValues.FourArrowsGray));
             break;
         case IconSetValues.FourRating:
             this.SetCustomIconSet(new SLFourIconSetOptions(SLFourIconSetValues.FourRating));
             break;
         case IconSetValues.FourRedToBlack:
             this.SetCustomIconSet(new SLFourIconSetOptions(SLFourIconSetValues.FourRedToBlack));
             break;
         case IconSetValues.FourTrafficLights:
             this.SetCustomIconSet(new SLFourIconSetOptions(SLFourIconSetValues.FourTrafficLights));
             break;
         case IconSetValues.ThreeArrows:
             this.SetCustomIconSet(new SLThreeIconSetOptions(SLThreeIconSetValues.ThreeArrows));
             break;
         case IconSetValues.ThreeArrowsGray:
             this.SetCustomIconSet(new SLThreeIconSetOptions(SLThreeIconSetValues.ThreeArrowsGray));
             break;
         case IconSetValues.ThreeFlags:
             this.SetCustomIconSet(new SLThreeIconSetOptions(SLThreeIconSetValues.ThreeFlags));
             break;
         case IconSetValues.ThreeSigns:
             this.SetCustomIconSet(new SLThreeIconSetOptions(SLThreeIconSetValues.ThreeSigns));
             break;
         case IconSetValues.ThreeSymbols:
             this.SetCustomIconSet(new SLThreeIconSetOptions(SLThreeIconSetValues.ThreeSymbols));
             break;
         case IconSetValues.ThreeSymbols2:
             this.SetCustomIconSet(new SLThreeIconSetOptions(SLThreeIconSetValues.ThreeSymbols2));
             break;
         case IconSetValues.ThreeTrafficLights1:
             this.SetCustomIconSet(new SLThreeIconSetOptions(SLThreeIconSetValues.ThreeTrafficLights1));
             break;
         case IconSetValues.ThreeTrafficLights2:
             this.SetCustomIconSet(new SLThreeIconSetOptions(SLThreeIconSetValues.ThreeTrafficLights2));
             break;
     }
 }
コード例 #6
0
 private void SetAllNull()
 {
     this.IconSet = IconSetValues.ThreeArrows;
     this.IconId = null;
 }
コード例 #7
0
        internal static IconSetValues TranslateInternalSetToIconSet(SLIconSetValues isv)
        {
            IconSetValues result = IconSetValues.ThreeTrafficLights1;

            switch (isv)
            {
            case SLIconSetValues.FiveArrows:
                result = IconSetValues.FiveArrows;
                break;

            case SLIconSetValues.FiveArrowsGray:
                result = IconSetValues.FiveArrowsGray;
                break;

            case SLIconSetValues.FiveQuarters:
                result = IconSetValues.FiveQuarters;
                break;

            case SLIconSetValues.FiveRating:
                result = IconSetValues.FiveRating;
                break;

            case SLIconSetValues.FourArrows:
                result = IconSetValues.FourArrows;
                break;

            case SLIconSetValues.FourArrowsGray:
                result = IconSetValues.FourArrowsGray;
                break;

            case SLIconSetValues.FourRating:
                result = IconSetValues.FourRating;
                break;

            case SLIconSetValues.FourRedToBlack:
                result = IconSetValues.FourRedToBlack;
                break;

            case SLIconSetValues.FourTrafficLights:
                result = IconSetValues.FourTrafficLights;
                break;

            case SLIconSetValues.ThreeArrows:
                result = IconSetValues.ThreeArrows;
                break;

            case SLIconSetValues.ThreeArrowsGray:
                result = IconSetValues.ThreeArrowsGray;
                break;

            case SLIconSetValues.ThreeFlags:
                result = IconSetValues.ThreeFlags;
                break;

            case SLIconSetValues.ThreeSigns:
                result = IconSetValues.ThreeSigns;
                break;

            case SLIconSetValues.ThreeSymbols:
                result = IconSetValues.ThreeSymbols;
                break;

            case SLIconSetValues.ThreeSymbols2:
                result = IconSetValues.ThreeSymbols2;
                break;

            case SLIconSetValues.ThreeTrafficLights1:
                result = IconSetValues.ThreeTrafficLights1;
                break;

            case SLIconSetValues.ThreeTrafficLights2:
                result = IconSetValues.ThreeTrafficLights2;
                break;
            }

            return(result);
        }
コード例 #8
0
        /// <summary>
        /// Set an icon set formatting with built-in types.
        /// </summary>
        /// <param name="IconSetType">A built-in icon set type.</param>
        public void SetIconSet(IconSetValues IconSetType)
        {
            SLConditionalFormattingRule cfr = new SLConditionalFormattingRule();
            cfr.Type = ConditionalFormatValues.IconSet;
            cfr.IconSet.IconSetValue = IconSetType;

            switch (IconSetType)
            {
                case IconSetValues.FiveArrows:
                case IconSetValues.FiveArrowsGray:
                case IconSetValues.FiveQuarters:
                case IconSetValues.FiveRating:
                    cfr.IconSet.Cfvos.Add(new SLConditionalFormatValueObject() { Type = ConditionalFormatValueObjectValues.Percent, Val = "0" });
                    cfr.IconSet.Cfvos.Add(new SLConditionalFormatValueObject() { Type = ConditionalFormatValueObjectValues.Percent, Val = "20" });
                    cfr.IconSet.Cfvos.Add(new SLConditionalFormatValueObject() { Type = ConditionalFormatValueObjectValues.Percent, Val = "40" });
                    cfr.IconSet.Cfvos.Add(new SLConditionalFormatValueObject() { Type = ConditionalFormatValueObjectValues.Percent, Val = "60" });
                    cfr.IconSet.Cfvos.Add(new SLConditionalFormatValueObject() { Type = ConditionalFormatValueObjectValues.Percent, Val = "80" });
                    break;
                case IconSetValues.FourArrows:
                case IconSetValues.FourArrowsGray:
                case IconSetValues.FourRating:
                case IconSetValues.FourRedToBlack:
                case IconSetValues.FourTrafficLights:
                    cfr.IconSet.Cfvos.Add(new SLConditionalFormatValueObject() { Type = ConditionalFormatValueObjectValues.Percent, Val = "0" });
                    cfr.IconSet.Cfvos.Add(new SLConditionalFormatValueObject() { Type = ConditionalFormatValueObjectValues.Percent, Val = "25" });
                    cfr.IconSet.Cfvos.Add(new SLConditionalFormatValueObject() { Type = ConditionalFormatValueObjectValues.Percent, Val = "50" });
                    cfr.IconSet.Cfvos.Add(new SLConditionalFormatValueObject() { Type = ConditionalFormatValueObjectValues.Percent, Val = "75" });
                    break;
                case IconSetValues.ThreeArrows:
                case IconSetValues.ThreeArrowsGray:
                case IconSetValues.ThreeFlags:
                case IconSetValues.ThreeSigns:
                case IconSetValues.ThreeSymbols:
                case IconSetValues.ThreeSymbols2:
                case IconSetValues.ThreeTrafficLights1:
                case IconSetValues.ThreeTrafficLights2:
                    cfr.IconSet.Cfvos.Add(new SLConditionalFormatValueObject() { Type = ConditionalFormatValueObjectValues.Percent, Val = "0" });
                    cfr.IconSet.Cfvos.Add(new SLConditionalFormatValueObject() { Type = ConditionalFormatValueObjectValues.Percent, Val = "33" });
                    cfr.IconSet.Cfvos.Add(new SLConditionalFormatValueObject() { Type = ConditionalFormatValueObjectValues.Percent, Val = "67" });
                    break;
            }

            cfr.HasIconSet = true;

            this.AppendRule(cfr);
        }