Example #1
0
 /// <summary>
 /// Deregister from image callbacks
 /// </summary>
 /// <param name="c">ImagerBase to unregister</param>
 public void UnregisterForImages(ImagerBase c)
 {
     if (c != null)
     {
         c.OnImageUpdated -= ImageUpdateHandler;
         ImagerWidth       = 0;
         ImagerHeight      = 0;
         HasImageSource    = false;
         SubscribedImagers.Remove(c);
         c.Subscribers.Remove(this);
     }
 }
Example #2
0
 /// <summary>
 /// Register and unregister for image callbacks
 /// </summary>
 /// <param name="c">ImagerBase to register</param>
 public void RegisterForImages(ImagerBase c)
 {
     if (c != null)
     {
         c.OnImageUpdated -= ImageUpdateHandler;
         c.OnImageUpdated += ImageUpdateHandler;
         ImagerWidth       = c.Width;
         ImagerHeight      = c.Height;
         HasImageSource    = true;
         SubscribedImagers.Add(c);
         c.Subscribers.Add(this);
     }
 }