public OverlayEndCreditsItemViewModel(OverlayEndCreditsItemModel item)
            : this()
        {
            this.speed            = item.Speed;
            this.BackgroundColor  = ColorSchemes.GetColorName(item.BackgroundColor);
            this.SectionTextFont  = item.SectionTextFont;
            this.SectionTextColor = ColorSchemes.GetColorName(item.SectionTextColor);
            this.sectionTextSize  = item.SectionTextSize;
            this.ItemTextFont     = item.ItemTextFont;
            this.ItemTextColor    = ColorSchemes.GetColorName(item.ItemTextColor);
            this.itemTextSize     = item.ItemTextSize;

            this.HTML = item.TitleTemplate;

            this.SectionItems.AddRange(item.SectionTemplates.Select(kvp => new OverlayEndCreditsSectionItemViewModel(this, kvp.Value)));
        }
 public OverlayEndCreditsItemModel(string titleTemplate, Dictionary <OverlayEndCreditsSectionTypeEnum, OverlayEndCreditsSectionModel> sectionTemplates, string backgroundColor,
                                   string sectionTextColor, string sectionTextFont, int sectionTextSize, string itemTextColor, string itemTextFont, int itemTextSize,
                                   OverlayEndCreditsSpeedEnum speed)
     : base(OverlayItemModelTypeEnum.EndCredits, string.Empty)
 {
     this.TitleTemplate    = titleTemplate;
     this.SectionTemplates = sectionTemplates;
     this.BackgroundColor  = backgroundColor;
     this.SectionTextColor = sectionTextColor;
     this.SectionTextFont  = sectionTextFont;
     this.SectionTextSize  = sectionTextSize;
     this.ItemTextColor    = itemTextColor;
     this.ItemTextFont     = itemTextFont;
     this.ItemTextSize     = itemTextSize;
     this.Speed            = speed;
 }
Ejemplo n.º 3
0
        public OverlayEndCreditsItemViewModel()
        {
            this.speed            = OverlayEndCreditsSpeedEnum.Medium;
            this.BackgroundColor  = Resources.Black;
            this.SectionTextFont  = "Arial";
            this.SectionTextColor = Resources.White;
            this.sectionTextSize  = 48;
            this.ItemTextFont     = "Arial";
            this.ItemTextColor    = Resources.White;
            this.itemTextSize     = 24;

            this.HTML = OverlayEndCreditsItemModel.TitleHTMLTemplate;

            this.AddItemCommand = this.CreateCommand(() =>
            {
                this.SectionItems.Add(new OverlayEndCreditsSectionItemViewModel(this, this.itemType));
                this.ItemType = OverlayEndCreditsSectionTypeEnum.Chatters; // The first
            });
        }
        public OverlayEndCreditsItemViewModel()
        {
            this.speed            = OverlayEndCreditsSpeedEnum.Medium;
            this.BackgroundColor  = "Black";
            this.SectionTextFont  = "Arial";
            this.SectionTextColor = "White";
            this.sectionTextSize  = 48;
            this.ItemTextFont     = "Arial";
            this.ItemTextColor    = "White";
            this.itemTextSize     = 24;

            this.HTML = OverlayEndCreditsItemModel.TitleHTMLTemplate;

            this.AddItemCommand = this.CreateCommand((parameter) =>
            {
                this.SectionItems.Add(new OverlayEndCreditsSectionItemViewModel(this, this.itemType));
                this.ItemTypeString = string.Empty;
                return(Task.FromResult(0));
            });
        }