Inheritance: System.MarshalByRefObject
Exemplo n.º 1
0
        private void SafeInvokeAddOrUpdateOverlay(AddOrUpdateOverlayEventArgs addOrUpdateOverlayEventArgs)
        {
            if (AddOrUpdateOverylay == null)
            {
                return;
            }

            AddOrUpdateOverlayEvent listener = null;
            var invocationList = AddOrUpdateOverylay.GetInvocationList();

            foreach (var @delegate in invocationList)
            {
                try
                {
                    listener = (AddOrUpdateOverlayEvent) @delegate;
                    listener.Invoke(addOrUpdateOverlayEventArgs);
                }
                catch (Exception)
                {
                    AddOrUpdateOverylay -= listener;
                }
            }
        }
Exemplo n.º 2
0
 private void OverlayInterfaceProxy_AddOrUpdateOverylay(AddOrUpdateOverlayEventArgs args)
 {
     try
     {
         var imageElement = new ImageElement
         {
             Alpha = args.Alpha,
             ImageStream = args.ImageStream,
             Location = args.Location
         };
         RenderEngine.Overlays[1].Elements.AddOrUpdate(args.OverlayID, imageElement, (k, v) => imageElement);
     }
     catch (Exception ex)
     {
     }
 }
 public void AddOrUpdateOverlayProxyHandler(AddOrUpdateOverlayEventArgs args)
 {
     AddOrUpdateOverylay?.Invoke(args);
 }