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