Exemplo n.º 1
0
        public void OnItemCommit(SequenceBaseObject sender)
        {
            foreach (var item in Items)
            {
                TimeSpan time = new TimeSpan(Items
                                             .Where(x => Items.IndexOf(x) < Items.IndexOf(item))
                                             .Sum(x => x.TimeShift.Ticks + x.Duration.Ticks));

                item.StartTime = time + item.TimeShift;
            }
        }
Exemplo n.º 2
0
        public async virtual void Add(SequenceBaseObject item)
        {
            Items.Add(item);
            item.Commit += OnItemCommit;

            item.Loaded += (sender) =>
            {
                AddItem?.Invoke(this, sender);
            };

            await item.Load();
        }