public OverlayLeaderboard(string htmlText, LeaderboardTypeEnum leaderboardType, int totalToShow, string borderColor, string backgroundColor, string textColor, string textFont, int width, int height, OverlayEffectEntranceAnimationTypeEnum addEvent, OverlayEffectExitAnimationTypeEnum removeEvent) : base(LeaderboardItemType, htmlText) { this.LeaderboardType = leaderboardType; this.TotalToShow = totalToShow; this.BorderColor = borderColor; this.BackgroundColor = backgroundColor; this.TextColor = textColor; this.TextFont = textFont; this.Width = width; this.Height = height; this.AddEventAnimation = addEvent; this.RemoveEventAnimation = removeEvent; }
private void LeaderboardTypeComboBox_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) { this.DonationLeaderboardInfoTextBlock.Visibility = Visibility.Collapsed; this.CurrencyRankComboBox.Visibility = Visibility.Collapsed; if (this.LeaderboardTypeComboBox.SelectedIndex >= 0) { LeaderboardTypeEnum leaderboardType = EnumHelper.GetEnumValueFromString <LeaderboardTypeEnum>((string)this.LeaderboardTypeComboBox.SelectedItem); if (leaderboardType == LeaderboardTypeEnum.Donations) { this.DonationLeaderboardInfoTextBlock.Visibility = Visibility.Visible; } if (leaderboardType == LeaderboardTypeEnum.CurrencyRank) { this.CurrencyRankComboBox.Visibility = Visibility.Visible; } } }
public OverlayLeaderboard(string htmlText, LeaderboardTypeEnum leaderboardType, int totalToShow, string borderColor, string backgroundColor, string textColor, string textFont, int width, int height, OverlayEffectEntranceAnimationTypeEnum addEvent, OverlayEffectExitAnimationTypeEnum removeEvent, UserCurrencyViewModel currency) : this(htmlText, leaderboardType, totalToShow, borderColor, backgroundColor, textColor, textFont, width, height, addEvent, removeEvent) { this.CurrencyID = currency.ID; }
public OverlayLeaderboard(string htmlText, LeaderboardTypeEnum leaderboardType, int totalToShow, string borderColor, string backgroundColor, string textColor, string textFont, int width, int height, OverlayEffectEntranceAnimationTypeEnum addEvent, OverlayEffectExitAnimationTypeEnum removeEvent, LeaderboardSparksEmbersDateEnum date) : this(htmlText, leaderboardType, totalToShow, borderColor, backgroundColor, textColor, textFont, width, height, addEvent, removeEvent) { this.DateRange = date; }
public override OverlayItemBase GetItem() { if (this.LeaderboardTypeComboBox.SelectedIndex < 0) { return(null); } LeaderboardTypeEnum leaderboardType = EnumHelper.GetEnumValueFromString <LeaderboardTypeEnum>((string)this.LeaderboardTypeComboBox.SelectedItem); if (string.IsNullOrEmpty(this.TotalToShowTextBox.Text) || !int.TryParse(this.TotalToShowTextBox.Text, out int totalToShow) || totalToShow <= 0) { return(null); } string borderColor = this.BorderColorComboBox.Text; if (ColorSchemes.HTMLColorSchemeDictionary.ContainsKey(borderColor)) { borderColor = ColorSchemes.HTMLColorSchemeDictionary[borderColor]; } string backgroundColor = this.BackgroundColorComboBox.Text; if (ColorSchemes.HTMLColorSchemeDictionary.ContainsKey(backgroundColor)) { backgroundColor = ColorSchemes.HTMLColorSchemeDictionary[backgroundColor]; } string textColor = this.TextColorComboBox.Text; if (ColorSchemes.HTMLColorSchemeDictionary.ContainsKey(textColor)) { textColor = ColorSchemes.HTMLColorSchemeDictionary[textColor]; } if (string.IsNullOrEmpty(this.TextFontComboBox.Text)) { return(null); } if (string.IsNullOrEmpty(this.WidthTextBox.Text) || !int.TryParse(this.WidthTextBox.Text, out int width) || string.IsNullOrEmpty(this.HeightTextBox.Text) || !int.TryParse(this.HeightTextBox.Text, out int height)) { return(null); } OverlayEffectEntranceAnimationTypeEnum addEventAnimation = EnumHelper.GetEnumValueFromString <OverlayEffectEntranceAnimationTypeEnum>((string)this.AddEventAnimationComboBox.SelectedItem); OverlayEffectExitAnimationTypeEnum removeEventAnimation = EnumHelper.GetEnumValueFromString <OverlayEffectExitAnimationTypeEnum>((string)this.RemoveEventAnimationComboBox.SelectedItem); if (string.IsNullOrEmpty(this.HTMLText.Text)) { return(null); } if (leaderboardType == LeaderboardTypeEnum.CurrencyRank) { if (this.CurrencyRankComboBox.SelectedIndex < 0) { return(null); } return(new OverlayLeaderboard(this.HTMLText.Text, leaderboardType, totalToShow, borderColor, backgroundColor, textColor, this.TextFontComboBox.Text, width, height, addEventAnimation, removeEventAnimation, (UserCurrencyViewModel)this.CurrencyRankComboBox.SelectedItem)); } else if (leaderboardType == LeaderboardTypeEnum.Sparks || leaderboardType == LeaderboardTypeEnum.Embers) { if (this.SparkEmberDateComboBox.SelectedIndex < 0) { return(null); } return(new OverlayLeaderboard(this.HTMLText.Text, leaderboardType, totalToShow, borderColor, backgroundColor, textColor, this.TextFontComboBox.Text, width, height, addEventAnimation, removeEventAnimation, EnumHelper.GetEnumValueFromString <LeaderboardSparksEmbersDateEnum>(this.SparkEmberDateComboBox.SelectedItem as string))); } else { return(new OverlayLeaderboard(this.HTMLText.Text, leaderboardType, totalToShow, borderColor, backgroundColor, textColor, this.TextFontComboBox.Text, width, height, addEventAnimation, removeEventAnimation)); } }