private string Unit2String(GeoUnits unit) { switch (unit) { case GeoUnits.Unknown: return(unit.ToString()); case GeoUnits.Inches: return(unit.ToString()); case GeoUnits.Feet: return(unit.ToString()); case GeoUnits.Yards: return(unit.ToString()); case GeoUnits.Miles: return(unit.ToString()); case GeoUnits.NauticalMiles: return("Nautic Miles"); case GeoUnits.Millimeters: return(unit.ToString()); case GeoUnits.Centimeters: return(unit.ToString()); case GeoUnits.Decimeters: return(unit.ToString()); case GeoUnits.Meters: return(unit.ToString()); case GeoUnits.Kilometers: return(unit.ToString()); case GeoUnits.DecimalDegrees: return("Decimal Degrees"); case GeoUnits.DegreesMinutesSeconds: return("Degrees Minutes Seconds"); } return("???"); }
public void SetSegmentLength(double length, GeoUnits unit) { if (txtSegmentLength.InvokeRequired) { SetSegmentLengthCallback d = new SetSegmentLengthCallback(SetSegmentLength); this.Invoke(d, new object[] { length, unit }); } else { txtSegmentLength.Text = length.ToString(); lblSegmentLenghtUnit.Text = unit.ToString(); } }
public void SetTotalArea(double length, GeoUnits unit) { if (txtTotalArea.InvokeRequired) { SetTotalAreaCallback d = new SetTotalAreaCallback(SetTotalArea); this.Invoke(d, new object[] { length, unit }); } else { txtTotalArea.Text = length.ToString(); lblTotalAreaUnit.Text = ((unit != GeoUnits.Unknown) ? "Square " : "") + unit.ToString(); } }