internal override void OnNewMapPointEvent(object obj)
{
// only if we are the active tab
if (!IsActiveTab)
return;
var point = obj as IPoint;
if (point == null)
return;
if (!IsInteractive)
{
Point1 = point;
HasPoint1 = true;
ClearTempGraphics();
var color = new RgbColorClass() { Green = 255 } as IColor;
AddGraphicToMap(Point1, color, true);
// Reset formatted string
Point1Formatted = string.Empty;
}
else
{
// we are in interactive mode
if (!HasPoint1)
{
Point1 = point;
HasPoint1 = true;
ClearTempGraphics();
var color = new RgbColorClass() { Green = 255 } as IColor;
AddGraphicToMap(Point1, color, true);
// Reset formatted string
Point1Formatted = string.Empty;
}
else
{
// update Distance
var polyline = GetGeoPolylineFromPoints(Point1, point);
UpdateDistance(polyline);
// draw a geo ring
ConstructGeoCircle();
}
}
}