Exemple #1
0
 public OverlayLeaderboardListItemModel(string htmlText, OverlayLeaderboardListItemTypeEnum leaderboardType, int totalToShow, string textFont, int width, int height, string borderColor,
                                        string backgroundColor, string textColor, OverlayListItemAlignmentTypeEnum alignment, OverlayItemEffectEntranceAnimationTypeEnum addEventAnimation,
                                        OverlayItemEffectExitAnimationTypeEnum removeEventAnimation, BitsLeaderboardPeriodEnum dateRange, CustomCommand newLeaderCommand)
     : this(htmlText, leaderboardType, totalToShow, textFont, width, height, borderColor, backgroundColor, textColor, alignment, addEventAnimation, removeEventAnimation, newLeaderCommand)
 {
     this.BitsLeaderboardDateRange = dateRange;
 }
Exemple #2
0
 public OverlayLeaderboardListItemModel(string htmlText, OverlayLeaderboardListItemTypeEnum leaderboardType, int totalToShow, string textFont, int width, int height, string borderColor,
                                        string backgroundColor, string textColor, OverlayListItemAlignmentTypeEnum alignment, OverlayItemEffectEntranceAnimationTypeEnum addEventAnimation,
                                        OverlayItemEffectExitAnimationTypeEnum removeEventAnimation, CurrencyModel currency, CommandModelBase leaderChangedCommand)
     : this(htmlText, leaderboardType, totalToShow, textFont, width, height, borderColor, backgroundColor, textColor, alignment, addEventAnimation, removeEventAnimation, leaderChangedCommand)
 {
     this.CurrencyID = currency.ID;
 }
Exemple #3
0
 public OverlayStreamClipItemViewModel(OverlayStreamClipItemModel item)
     : this()
 {
     this.width             = item.Width;
     this.height            = item.Height;
     this.Volume            = item.Volume;
     this.entranceAnimation = item.Effects.EntranceAnimation;
     this.exitAnimation     = item.Effects.ExitAnimation;
 }
Exemple #4
0
 public OverlayClipPlaybackItemViewModel(OverlayClipPlaybackItemModel item)
     : this()
 {
     this.width             = item.Width;
     this.height            = item.Height;
     this.Muted             = item.Muted;
     this.entranceAnimation = item.Effects.EntranceAnimation;
     this.exitAnimation     = item.Effects.ExitAnimation;
 }
        public OverlayListItemViewModelBase(int totalToShow, int fadeOut, int width, int height, string textFont, string textColor, string borderColor, string backgroundColor,
                                            OverlayListItemAlignmentTypeEnum alignment, OverlayItemEffectEntranceAnimationTypeEnum entranceAnimation, OverlayItemEffectExitAnimationTypeEnum exitAnimation, string htmlText)
            : this()
        {
            this.totalToShow = totalToShow;
            this.fadeOut     = fadeOut;
            this.width       = width;
            this.height      = height;
            this.Font        = textFont;

            this.TextColor       = ColorSchemes.GetColorName(textColor);
            this.BorderColor     = ColorSchemes.GetColorName(borderColor);
            this.BackgroundColor = ColorSchemes.GetColorName(backgroundColor);

            this.alignment         = alignment;
            this.entranceAnimation = entranceAnimation;
            this.exitAnimation     = exitAnimation;

            this.HTML = htmlText;
        }
Exemple #6
0
 public OverlayLeaderboardListItemModel(string htmlText, OverlayLeaderboardListItemTypeEnum leaderboardType, int totalToShow, string textFont, int width, int height, string borderColor,
                                        string backgroundColor, string textColor, OverlayListItemAlignmentTypeEnum alignment, OverlayItemEffectEntranceAnimationTypeEnum addEventAnimation, OverlayItemEffectExitAnimationTypeEnum removeEventAnimation, CustomCommand newLeaderCommand)
     : base(OverlayItemModelTypeEnum.Leaderboard, htmlText, totalToShow, 0, textFont, width, height, borderColor, backgroundColor, textColor, alignment, addEventAnimation, removeEventAnimation)
 {
     this.LeaderboardType  = leaderboardType;
     this.NewLeaderCommand = newLeaderCommand;
 }
 public OverlayEventListItemModel(string htmlText, IEnumerable <OverlayEventListItemTypeEnum> itemTypes, int totalToShow, int fadeOut, string textFont, int width, int height,
                                  string borderColor, string backgroundColor, string textColor, OverlayListItemAlignmentTypeEnum alignment, OverlayItemEffectEntranceAnimationTypeEnum addEventAnimation, OverlayItemEffectExitAnimationTypeEnum removeEventAnimation)
     : base(OverlayItemModelTypeEnum.EventList, htmlText, totalToShow, fadeOut, textFont, width, height, borderColor, backgroundColor, textColor, alignment, addEventAnimation, removeEventAnimation)
 {
     this.ItemTypes = new List <OverlayEventListItemTypeEnum>(itemTypes);
 }
Exemple #8
0
 public OverlayChatMessagesListItemModel(string htmlText, int totalToShow, int fadeOut, string textFont, int width, int height, string borderColor, string backgroundColor, string textColor,
                                         OverlayListItemAlignmentTypeEnum alignment, OverlayItemEffectEntranceAnimationTypeEnum addEventAnimation, OverlayItemEffectExitAnimationTypeEnum removeEventAnimation)
     : base(OverlayItemModelTypeEnum.ChatMessages, htmlText, totalToShow, fadeOut, textFont, width, height, borderColor, backgroundColor, textColor, alignment, addEventAnimation, removeEventAnimation)
 {
 }
        public override ActionBase GetAction()
        {
            string type = (string)this.TypeComboBox.SelectedItem;

            if (!string.IsNullOrEmpty(type))
            {
                if (type.Equals(ShowHideWidgetOption))
                {
                    if (this.WidgetNameComboBox.SelectedIndex >= 0)
                    {
                        OverlayWidgetModel widget = (OverlayWidgetModel)this.WidgetNameComboBox.SelectedItem;
                        return(new OverlayAction(widget.Item.ID, this.ShowHideWidgetCheckBox.IsChecked.GetValueOrDefault()));
                    }
                }
                else
                {
                    OverlayItemModelTypeEnum overlayType = EnumHelper.GetEnumValueFromString <OverlayItemModelTypeEnum>(type);

                    if (this.OverlayNameComboBox.SelectedIndex < 0)
                    {
                        return(null);
                    }
                    string overlayName = (string)this.OverlayNameComboBox.SelectedItem;

                    double duration;
                    if (double.TryParse(this.DurationTextBox.Text, out duration) && duration > 0 && this.EntranceAnimationComboBox.SelectedIndex >= 0 &&
                        this.VisibleAnimationComboBox.SelectedIndex >= 0 && this.ExitAnimationComboBox.SelectedIndex >= 0)
                    {
                        OverlayItemEffectEntranceAnimationTypeEnum entrance = EnumHelper.GetEnumValueFromString <OverlayItemEffectEntranceAnimationTypeEnum>((string)this.EntranceAnimationComboBox.SelectedItem);
                        OverlayItemEffectVisibleAnimationTypeEnum  visible  = EnumHelper.GetEnumValueFromString <OverlayItemEffectVisibleAnimationTypeEnum>((string)this.VisibleAnimationComboBox.SelectedItem);
                        OverlayItemEffectExitAnimationTypeEnum     exit     = EnumHelper.GetEnumValueFromString <OverlayItemEffectExitAnimationTypeEnum>((string)this.ExitAnimationComboBox.SelectedItem);

                        OverlayItemEffectsModel effects = new OverlayItemEffectsModel(entrance, visible, exit, duration);

                        OverlayItemPositionModel position = this.ItemPosition.GetPosition();

                        OverlayItemModelBase item = null;

                        if (overlayType == OverlayItemModelTypeEnum.Image)
                        {
                            item = this.ImageItem.GetItem();
                        }
                        else if (overlayType == OverlayItemModelTypeEnum.Text)
                        {
                            item = this.TextItem.GetItem();
                        }
                        else if (overlayType == OverlayItemModelTypeEnum.YouTube)
                        {
                            item = this.YouTubeItem.GetItem();
                        }
                        else if (overlayType == OverlayItemModelTypeEnum.Video)
                        {
                            item = this.VideoItem.GetItem();
                        }
                        else if (overlayType == OverlayItemModelTypeEnum.WebPage)
                        {
                            item = this.WebPageItem.GetItem();
                        }
                        else if (overlayType == OverlayItemModelTypeEnum.HTML)
                        {
                            item = this.HTMLItem.GetItem();
                        }

                        if (item != null)
                        {
                            item.Position = position;
                            item.Effects  = effects;

                            return(new OverlayAction(overlayName, item));
                        }
                    }
                }
            }
            return(null);
        }
Exemple #10
0
 public OverlayListItemModelBase(OverlayItemModelTypeEnum type, string htmlText, int totalToShow, int fadeOut, string textFont, int width, int height, string borderColor,
                                 string backgroundColor, string textColor, OverlayListItemAlignmentTypeEnum alignment, OverlayItemEffectEntranceAnimationTypeEnum addEventAnimation, OverlayItemEffectExitAnimationTypeEnum removeEventAnimation)
     : base(type, htmlText)
 {
     this.TotalToShow     = totalToShow;
     this.FadeOut         = fadeOut;
     this.TextFont        = textFont;
     this.Width           = width;
     this.Height          = height;
     this.BorderColor     = borderColor;
     this.BackgroundColor = backgroundColor;
     this.TextColor       = textColor;
     this.Alignment       = alignment;
     this.Effects         = new OverlayItemEffectsModel(addEventAnimation, OverlayItemEffectVisibleAnimationTypeEnum.None, removeEventAnimation, 0);
 }
 public OverlayItemEffectsModel(OverlayItemEffectEntranceAnimationTypeEnum entrance, OverlayItemEffectVisibleAnimationTypeEnum visible, OverlayItemEffectExitAnimationTypeEnum exit, double duration)
 {
     this.EntranceAnimation = entrance;
     this.VisibleAnimation  = visible;
     this.ExitAnimation     = exit;
     this.Duration          = duration;
 }
 public OverlayClipPlaybackItemModel(int width, int height, bool muted, OverlayItemEffectEntranceAnimationTypeEnum entranceAnimation, OverlayItemEffectExitAnimationTypeEnum exitAnimation)
     : base(OverlayItemModelTypeEnum.ClipPlayback, string.Empty, width, height)
 {
     this.Width   = width;
     this.Height  = height;
     this.Muted   = muted;
     this.Effects = new OverlayItemEffectsModel(entranceAnimation, OverlayItemEffectVisibleAnimationTypeEnum.None, exitAnimation, 0);
 }
Exemple #13
0
 public OverlayStreamClipItemModel(int width, int height, int volume, OverlayItemEffectEntranceAnimationTypeEnum entranceAnimation, OverlayItemEffectExitAnimationTypeEnum exitAnimation)
     : base(OverlayItemModelTypeEnum.StreamClip, string.Empty, width, height)
 {
     this.Width   = width;
     this.Height  = height;
     this.Volume  = volume;
     this.Effects = new OverlayItemEffectsModel(entranceAnimation, OverlayItemEffectVisibleAnimationTypeEnum.None, exitAnimation, 0);
 }
Exemple #14
0
 public OverlayStreamClipItemModel(int width, int height, int volume, OverlayItemEffectEntranceAnimationTypeEnum entranceAnimation, OverlayItemEffectExitAnimationTypeEnum exitAnimation)
 {
 }
 public OverlaySongRequestsListItemModel(string htmlText, int totalToShow, string textFont, int width, int height, string borderColor, string backgroundColor, string textColor,
                                         bool includeCurrentSong, OverlayListItemAlignmentTypeEnum alignment, OverlayItemEffectEntranceAnimationTypeEnum addEventAnimation, OverlayItemEffectExitAnimationTypeEnum removeEventAnimation)
     : base(OverlayItemModelTypeEnum.SongRequests, htmlText, totalToShow, 0, textFont, width, height, borderColor, backgroundColor, textColor, alignment, addEventAnimation, removeEventAnimation)
 {
     this.IncludeCurrentSong = includeCurrentSong;
 }