protected override void OnMouseDown(MouseEventArgs arg) { try { IDisplayTransformation displayTransformation = view.ScreenDisplay.DisplayTransformation; IPoint mapPoint = displayTransformation.ToMapPoint(arg.X, arg.Y); IPoint lam72Point = geopuntHelper.Transform2Lam72(mapPoint) as IPoint; if (resultForm != null) { if (resultForm.IsDisposed) { resultForm = null; } else { if (!resultForm.Visible) { resultForm.Show(); } resultForm.WindowState = FormWindowState.Normal; resultForm.Focus(); resultForm.reverseGeocode(lam72Point); return; } } resultForm = new reverseZoekForm(); gpExtension.reverseDlg = resultForm; resultForm.Show(); resultForm.WindowState = FormWindowState.Normal; resultForm.Focus(); resultForm.reverseGeocode(lam72Point); } catch (Exception ex) { MessageBox.Show(ex.Message + " : " + ex.StackTrace); } finally { base.OnMouseDown(arg); } }
protected override void OnMouseDown(MouseEventArgs arg) { try { IDisplayTransformation displayTransformation = view.ScreenDisplay.DisplayTransformation; IPoint mapPoint = displayTransformation.ToMapPoint(arg.X, arg.Y); IPoint lam72Point = geopuntHelper.Transform2Lam72(mapPoint) as IPoint; if (resultForm != null) { if (resultForm.IsDisposed) { resultForm = null; } else { if (!resultForm.Visible) resultForm.Show(); resultForm.WindowState = FormWindowState.Normal; resultForm.Focus(); resultForm.reverseGeocode(lam72Point); return; } } resultForm = new reverseZoekForm(); gpExtension.reverseDlg = resultForm; resultForm.Show(); resultForm.WindowState = FormWindowState.Normal; resultForm.Focus(); resultForm.reverseGeocode(lam72Point); } catch (Exception ex) { MessageBox.Show(ex.Message + " : " + ex.StackTrace); } finally { base.OnMouseDown(arg); } }