Exemplo n.º 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;
 }
Exemplo n.º 2
0
 public ClientBalloon(Balloon parent)
     : base(parent)
 {
     this.Popped = false;
     this.IsLabelCached = false;
 }
Exemplo n.º 3
0
 public BalloonContentUpdateMessage(Balloon balloon)
     : this(balloon.ID, balloon.Type, balloon.Label, balloon.Content, balloon.Url, balloon.ImageUrl)
 {
 }
Exemplo n.º 4
0
 public void UpdateState(Balloon balloon)
 {
     if(balloon == null)
     {
         return;
     }
     balloon.OverlayType = OverlayType;
     balloon.BackgroundColor = BackgroundColor;
     balloon.Votes = Votes;
 }
Exemplo n.º 5
0
 public BalloonStateUpdateMessage(Balloon balloon)
     : this(balloon.ID, balloon.OverlayType, balloon.BackgroundColor, balloon.Votes)
 {
 }
Exemplo n.º 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;
 }
Exemplo n.º 7
0
 public void UpdateBalloonState(Balloon balloon)
 {
     m_conn.SendMessage(new BalloonStateUpdateMessage(balloon.ID,
         balloon.OverlayType, balloon.BackgroundColor, balloon.Votes));
 }
Exemplo n.º 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));
 }