internal virtual void OnNewMapPointEvent(object obj)
{
if (!IsActiveTab)
return;
var mxdoc = ArcMap.Application.Document as IMxDocument;
var av = mxdoc.FocusMap as IActiveView;
var point = obj as IPoint;
if (point == null)
return;
if (!HasPoint1)
{
// clear temp graphics
ClearTempGraphics();
Point1 = point;
HasPoint1 = true;
Point1Formatted = string.Empty;
var color = new RgbColorClass() { Green = 255 } as IColor;
AddGraphicToMap(Point1, color, true);
// lets try feedback
CreateFeedback(point, av);
feedback.Start(point);
}
else if (!HasPoint2)
{
ResetFeedback();
Point2 = point;
HasPoint2 = true;
point2Formatted = string.Empty;
RaisePropertyChanged(() => Point2Formatted);
}
if (HasPoint1 && HasPoint2)
{
CreateMapElement();
ResetPoints();
}
}