Esempio n. 1
0
 public void DrawOverlayProxyHandler(DrawOverlayEventArgs args)
 {
     if (DrawOverlay != null)
     {
         DrawOverlay(args);
     }
 }
Esempio n. 2
0
        private void SafeInvokeDrawOverlay(DrawOverlayEventArgs drawOverlayEventArgs)
        {
            if (DrawOverlay == null)
            {
                return; //No Listeners
            }
            DrawOverlayEvent listener = null;
            var dels = DrawOverlay.GetInvocationList();

            foreach (var del in dels)
            {
                try
                {
                    listener = (DrawOverlayEvent)del;
                    listener.Invoke(drawOverlayEventArgs);
                }
                catch (Exception)
                {
                    //Could not reach the destination, so remove it
                    //from the list
                    DrawOverlay -= listener;
                }
            }
        }