예제 #1
0
 public Balloon(Balloon parent)
     : this(parent.ID)
 {
     // Copy properties from the parent
     this.BackgroundColor = parent.BackgroundColor;
     this.Content = parent.Content;
     this.Label = parent.Label;
     this.OverlayType = parent.OverlayType;
     this.Type = parent.Type;
     this.Url = parent.Url;
     this.Votes = parent.Votes;
     this.ImageUrl = parent.ImageUrl;
 }
예제 #2
0
 public ClientBalloon(Balloon parent)
     : base(parent)
 {
     this.Popped = false;
     this.IsLabelCached = false;
 }
예제 #3
0
 public BalloonContentUpdateMessage(Balloon balloon)
     : this(balloon.ID, balloon.Type, balloon.Label, balloon.Content, balloon.Url, balloon.ImageUrl)
 {
 }
예제 #4
0
 public void UpdateState(Balloon balloon)
 {
     if(balloon == null)
     {
         return;
     }
     balloon.OverlayType = OverlayType;
     balloon.BackgroundColor = BackgroundColor;
     balloon.Votes = Votes;
 }
예제 #5
0
 public BalloonStateUpdateMessage(Balloon balloon)
     : this(balloon.ID, balloon.OverlayType, balloon.BackgroundColor, balloon.Votes)
 {
 }
예제 #6
0
 public void UpdateContent(Balloon balloon)
 {
     if(balloon == null)
     {
         return;
     }
     balloon.Type = BalloonType;
     balloon.Label = Label;
     balloon.Content = Content;
     balloon.Url = Url;
     balloon.ImageUrl = ImageUrl;
 }
예제 #7
0
 public void UpdateBalloonState(Balloon balloon)
 {
     m_conn.SendMessage(new BalloonStateUpdateMessage(balloon.ID,
         balloon.OverlayType, balloon.BackgroundColor, balloon.Votes));
 }
예제 #8
0
 public void UpdateBalloonDetails(Balloon balloon)
 {
     Balloon cachedBalloon = null;
     if (!balloonCache.TryGetValue(balloon.ID, out cachedBalloon))
     {
         cachedBalloon = new Balloon(balloon);
         balloonCache.Add(balloon.ID, cachedBalloon);
     }
     cachedBalloon.OverlayType = balloon.OverlayType;
     cachedBalloon.BackgroundColor = balloon.BackgroundColor;
     cachedBalloon.Votes = balloon.Votes;
     m_conn.SendMessage(new BalloonStateUpdateMessage(balloon.ID,
         balloon.OverlayType, balloon.BackgroundColor, balloon.Votes));
 }