예제 #1
0
        public virtual void Update(StickerSet set, bool reset = false)
        {
            _set = set;

            for (int i = 0; i < set.Stickers.Count; i++)
            {
                if (i < Stickers.Count)
                {
                    if (Stickers[i] is MoreStickerViewModel)
                    {
                        Stickers[i] = new StickerViewModel(_protoService, set.Stickers[i]);
                    }
                    else
                    {
                        Stickers[i].Update(set.Stickers[i]);
                    }
                }
                else
                {
                    Stickers.Add(new StickerViewModel(_protoService, set.Stickers[i]));
                }
            }

            if (reset)
            {
                Stickers.Reset();
            }
        }
예제 #2
0
        public void Update(StickerSet set, bool reset = false)
        {
            _set = set;

            for (int i = 0; i < set.Stickers.Count && i < Stickers.Count; i++)
            {
                Stickers[i].Update(set.Stickers[i]);
            }

            if (reset)
            {
                Stickers.Reset();
            }
        }