Exemple #1
0
        public AnimationDrawerViewModel(IProtoService protoService, ICacheService cacheService, ISettingsService settingsService, IEventAggregator aggregator) : base(protoService, cacheService, settingsService, aggregator)
        {
            SavedItems    = new AnimationsCollection();
            TrendingItems = new TrendingAnimationsCollection(protoService, aggregator);

            Sets = new List <AnimationsCollection>();
            Sets.Add(SavedItems);
            Sets.Add(TrendingItems);
            Sets.AddRange(cacheService.AnimationSearchEmojis.Select(x => new SearchAnimationsCollection(protoService, aggregator, x)));

            SelectedSet = Sets[0];

            Aggregator.Subscribe(this);
        }
Exemple #2
0
 /// <summary>
 /// Получить анимацию из коллекции
 /// </summary>
 /// <param name="parKey">Идентификатор-название анимации</param>
 /// <returns></returns>
 public SubassetDataAnimation GetAnimation(string parKey)
 {
     return(AnimationsCollection.TryGetValue(parKey, out SubassetDataAnimation retAnim) ? retAnim : null);
 }