using System; namespace CoordinateSharp { /// /// Coordinate formatting options for a Coordinate object. /// [Serializable] public class CoordinateFormatOptions { /// /// Set default values with the constructor. /// public CoordinateFormatOptions() { this.Format = CoordinateFormatType.Degree_Minutes_Seconds; this.Round = 3; this.Display_Leading_Zeros = false; this.Display_Trailing_Zeros = false; this.Display_Symbols = true; this.Display_Degree_Symbol = true; this.Display_Minute_Symbol = true; this.Display_Seconds_Symbol = true; this.Display_Hyphens = false; this.Position_First = true; } /// /// Coordinate format type. /// public CoordinateFormatType Format { get; set; } /// /// Rounds Coordinates to the set value. /// public Int32 Round { get; set; } /// /// Displays leading zeros. /// public Boolean Display_Leading_Zeros { get; set; } /// /// Display trailing zeros. /// public Boolean Display_Trailing_Zeros { get; set; } /// /// Allow symbols to display. /// public Boolean Display_Symbols { get; set; } /// /// Display degree symbols. /// public Boolean Display_Degree_Symbol { get; set; } /// /// Display minute symbols. /// public Boolean Display_Minute_Symbol { get; set; } /// /// Display secons symbol. /// public Boolean Display_Seconds_Symbol { get; set; } /// /// Display hyphens between values. /// public Boolean Display_Hyphens { get; set; } /// /// Show coordinate position first. /// Will show last if set 'false'. /// public Boolean Position_First { get; set; } } /// /// Coordinate Format Types. /// [Serializable] public enum CoordinateFormatType { /// /// Decimal Degree Format /// /// /// Example: N 40.456 W 75.456 /// Decimal_Degree, /// /// Decimal Degree Minutes Format /// /// /// Example: N 40º 34.552' W 70º 45.408' /// Degree_Decimal_Minutes, /// /// Decimal Degree Minutes Format /// /// /// Example: N 40º 34" 36.552' W 70º 45" 24.408' /// Degree_Minutes_Seconds, /// /// Decimal Format /// /// /// Example: 40.57674 -70.46574 /// Decimal } }