Esempio n. 1
0
 private void HandleBalloonStateUpdate(BalloonStateUpdateMessage bdm)
 {
     Balloon balloon = null;
     if (balloonCache.TryGetValue(bdm.BalloonID, out balloon))
     {
         balloon.OverlayType = bdm.OverlayType;
         balloon.BackgroundColor = bdm.BackgroundColor;
         balloon.Votes = bdm.Votes;
     }
 }
Esempio n. 2
0
 private bool HandleBalloonStateUpdate(BalloonStateUpdateMessage bdm)
 {
     bdm.UpdateState(GetBalloon(bdm.ObjectID));
     return true;
 }
Esempio n. 3
0
 public void OnBalloonStateUpdate(BalloonStateUpdateMessage bdm)
 {
     ClientBalloon balloon;
     if (balloons.TryGetValue(bdm.BalloonID, out balloon))
     {
         int oldVotes = balloon.Votes;
         balloon.OverlayType = bdm.OverlayType;
         balloon.BackgroundColor = bdm.BackgroundColor;
         balloon.Votes = bdm.Votes;
         // Generate the balloon's content again when the number of votes changes
         if (oldVotes != balloon.Votes)
         {
             contentBox.GenerateTextContent(balloon);
         }
     }
 }