Пример #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));
 }