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