/// <summary> /// Applies the minimum and maximum in order to create the filter expression. This will also /// count the members that match the specified criteria. /// </summary> /// <param name="settings">Settings that are used to apply the minimum and maximum.</param> public override void ApplyMinMax(EditorSettings settings) { base.ApplyMinMax(settings); if (settings is not FeatureEditorSettings fs) return; string field = "[" + fs.FieldName.ToUpper() + "]"; if (!string.IsNullOrEmpty(fs.NormField)) field += "/[" + fs.NormField.ToUpper() + "]"; IntervalSnapMethod method = settings.IntervalSnapMethod; int digits = settings.IntervalRoundingDigits; LegendText = Range.ToString(method, digits); _filterExpression = Range.ToExpression(field); }
/// <summary> /// Returns this Number as a string. This uses the DotSpatial.Globalization.CulturePreferences and /// Controls the number type using the NumberFormat enumeration plus the DecimalCount to create /// a number format. /// </summary> /// <returns>The string created using the specified number format and precision.</returns> public override string ToString() { return(_range.ToString()); }
/// <summary> /// Since rasters are numeric and not relying on an SQL expression, this allows /// this only sets the legend text using the method and digits to help with /// formatting. /// </summary> /// <param name="settings">An EditorSettings from either a feature scheme or color scheme.</param> public virtual void ApplyMinMax(EditorSettings settings) { LegendText = Range.ToString(settings.IntervalSnapMethod, settings.IntervalRoundingDigits); }
/// <summary> /// Returns this Number as a string. /// </summary> /// <param name="method">Specifies how the numbers are modified so that the numeric text can be cleaned up.</param> /// <param name="digits">An integer clarifying digits for rounding or significant figure situations.</param> /// <returns>A string with the formatted number.</returns> public virtual string ToString(IntervalSnapMethod method, int digits) { return(Range.ToString(method, digits)); }