Example #1
0
        protected override void  OnMouseDown(ESRI.ArcGIS.Desktop.AddIns.Tool.MouseEventArgs arg)
        {
            try
            {
                dlg = gpExtension.elevationDlg;
                if (dlg == null)
                {
                    return;
                }

                IDisplayTransformation displayTransformation = view.ScreenDisplay.DisplayTransformation;
                //the clicked point in map crs:
                IPoint mapPoint = displayTransformation.ToMapPoint(arg.X, arg.Y);

                //Get the polyline object from the users mouse clicks
                polyline = geopuntHelper.GetPolylineFromMouseClicks(view);

                dlg.getData(polyline);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + " : " + ex.StackTrace);
            }
            finally
            {
                base.OnMouseDown(arg);
            }
        }
        protected override void OnMouseDown(ESRI.ArcGIS.Desktop.AddIns.Tool.MouseEventArgs arg)
        {
            try
            {
                dlg = gpExtension.elevationDlg;
                if (dlg == null) return;

                IDisplayTransformation displayTransformation = view.ScreenDisplay.DisplayTransformation;
                //the clicked point in map crs:
                IPoint mapPoint = displayTransformation.ToMapPoint(arg.X, arg.Y);

                //Get the polyline object from the users mouse clicks
                polyline = geopuntHelper.GetPolylineFromMouseClicks(view);

                dlg.getData(polyline);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + " : " + ex.StackTrace);
            }
            finally
            {
                base.OnMouseDown(arg);
            }
        }