private void HandleBalloonContentUpdate(BalloonContentUpdateMessage bcm)
 {
     Balloon balloon = null;
     if (balloonCache.TryGetValue(bcm.BalloonID, out balloon))
     {
         balloon.Label = bcm.Label;
         balloon.Content = bcm.Content;
         balloon.Type = bcm.BalloonType;
         balloon.Url = bcm.Url;
         balloon.ImageUrl = bcm.ImageUrl;
     }
 }
Example #2
0
 private bool HandleBalloonContentUpdate(BalloonContentUpdateMessage bcm)
 {
     bcm.UpdateContent(GetBalloon(bcm.ObjectID));
     return true;
 }
        public void OnBalloonContentUpdate(BalloonContentUpdateMessage bcm)
        {
            ClientBalloon balloon;
            if (balloons.TryGetValue(bcm.BalloonID, out balloon))
            {
                string oldLabel = balloon.Label;
                balloon.Label = bcm.Label;
                balloon.Content = bcm.Content;
                balloon.Type = bcm.BalloonType;
                balloon.Url = bcm.Url;
                balloon.ImageUrl = bcm.ImageUrl;

                // Generate the balloon's caption again when it changes
                if (oldLabel != balloon.Label)
                {
                    contentBox.GenerateCaption(balloon);
                }
            }
        }