internal override 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)
{
Point1 = point;
HasPoint1 = true;
Point1Formatted = string.Empty;
AddGraphicToMap(Point1, new RgbColor() { Green = 255 } as IColor, true);
}
else if (!HasPoint2)
{
Point2 = point;
HasPoint2 = true;
if (feedback != null)
{
feedback.Stop();
feedback.Start(Point1);
}
}
else if (!HasPoint3)
{
if (MajorAxisDistance >= MinorAxisDistance)
{
ResetFeedback();
Point3 = point;
HasPoint3 = true;
}
}
if (HasPoint1 && HasPoint2 && HasPoint3)
{
CreateMapElement();
ResetPoints();
}
}