Beispiel #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;
            }
        }
Beispiel #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();
        }