private void SetSymbolRuleMarkers(PredefinedSymbolCollection customSymbols) { int bucketCount = base.GetBucketCount(); MapMarkerRule mapMarkerRule = (MapMarkerRule)base.m_mapRule; MapMarkerCollection mapMarkers = mapMarkerRule.MapMarkers; int count = mapMarkers.Count; MapBucketCollection mapBuckets = base.m_mapRule.MapBuckets; bool flag = base.GetDistributionType() == MapRuleDistributionType.Custom; for (int i = 0; i < bucketCount; i++) { PredefinedSymbol predefinedSymbol = new PredefinedSymbol(); if (i < count) { this.RenderMarker(predefinedSymbol, ((ReportElementCollectionBase <MapMarker>)mapMarkers)[i]); } else { predefinedSymbol.MarkerStyle = MarkerStyle.None; } if (flag) { MapBucket bucket = ((ReportElementCollectionBase <MapBucket>)mapBuckets)[i]; predefinedSymbol.FromValue = base.GetFromValue(bucket); predefinedSymbol.ToValue = base.GetToValue(bucket); } customSymbols.Add(predefinedSymbol); } }
private void SetSymbolRuleSizes(PredefinedSymbolCollection customSymbols) { int bucketCount = base.GetBucketCount(); if (bucketCount != 0) { double startSize = this.GetStartSize(); double num = (this.GetEndSize() - startSize) / (double)bucketCount; MapBucketCollection mapBuckets = base.m_mapRule.MapBuckets; bool flag = base.GetDistributionType() == MapRuleDistributionType.Custom; for (int i = 0; i < bucketCount; i++) { PredefinedSymbol predefinedSymbol = new PredefinedSymbol(); PredefinedSymbol predefinedSymbol2 = predefinedSymbol; PredefinedSymbol predefinedSymbol3 = predefinedSymbol; float num4 = predefinedSymbol2.Width = (predefinedSymbol3.Height = (float)(int)Math.Round(startSize + (double)i * num)); if (flag) { MapBucket bucket = ((ReportElementCollectionBase <MapBucket>)mapBuckets)[i]; predefinedSymbol.FromValue = base.GetFromValue(bucket); predefinedSymbol.ToValue = base.GetToValue(bucket); } customSymbols.Add(predefinedSymbol); } } }
private void SetSymbolRuleColors(Color[] colorRange, PredefinedSymbolCollection customSymbols) { MapBucketCollection mapBuckets = base.m_mapRule.MapBuckets; bool flag = base.GetDistributionType() == MapRuleDistributionType.Custom; int bucketCount = base.GetBucketCount(); for (int i = 0; i < bucketCount; i++) { PredefinedSymbol predefinedSymbol = new PredefinedSymbol(); if (i < colorRange.Length) { predefinedSymbol.Color = colorRange[i]; } else { predefinedSymbol.Color = Color.Empty; } if (flag) { MapBucket bucket = ((ReportElementCollectionBase <MapBucket>)mapBuckets)[i]; predefinedSymbol.FromValue = base.GetFromValue(bucket); predefinedSymbol.ToValue = base.GetToValue(bucket); } customSymbols.Add(predefinedSymbol); } }
private void SetRuleColors(Color[] colorRange, CustomColorCollection customColors) { MapBucketCollection mapBuckets = base.m_mapRule.MapBuckets; bool flag = base.GetDistributionType() == MapRuleDistributionType.Custom; int bucketCount = base.GetBucketCount(); for (int i = 0; i < bucketCount; i++) { CustomColor customColor = new CustomColor(); if (i < colorRange.Length) { customColor.Color = colorRange[i]; } else { customColor.Color = Color.Empty; } if (flag) { MapBucket bucket = ((ReportElementCollectionBase <MapBucket>)mapBuckets)[i]; customColor.FromValue = base.GetFromValue(bucket); customColor.ToValue = base.GetToValue(bucket); } customColors.Add(customColor); } }
protected string GetToValue(MapBucket bucket) { ReportVariantProperty endValue = bucket.EndValue; if (endValue != null) { if (!endValue.IsExpression) { return(this.ConvertBucketValueToString(endValue.Value)); } return(this.ConvertBucketValueToString(bucket.Instance.EndValue)); } return(""); }
protected string GetFromValue(MapBucket bucket) { ReportVariantProperty startValue = bucket.StartValue; if (startValue != null) { if (!startValue.IsExpression) { return(this.ConvertBucketValueToString(startValue.Value)); } return(this.ConvertBucketValueToString(bucket.Instance.StartValue)); } return(""); }
private void SetPathRuleSizes(CustomWidthCollection customWidths) { int bucketCount = base.GetBucketCount(); if (bucketCount != 0) { double startSize = this.GetStartSize(); double num = (this.GetEndSize() - startSize) / (double)bucketCount; MapBucketCollection mapBuckets = base.m_mapRule.MapBuckets; bool flag = base.GetDistributionType() == MapRuleDistributionType.Custom; for (int i = 0; i < bucketCount; i++) { CustomWidth customWidth = new CustomWidth(); customWidth.Width = (float)(int)Math.Round(startSize + (double)i * num); if (flag) { MapBucket bucket = ((ReportElementCollectionBase <MapBucket>)mapBuckets)[i]; customWidth.FromValue = base.GetFromValue(bucket); customWidth.ToValue = base.GetToValue(bucket); } customWidths.Add(customWidth); } } }