Example #1
0
        private void HandleCurrentSequenceChanged(object sender, Infrastructure.DataEventArgs <ISequenceModel> a)
        {
            if (a.Data != null)
            {
                a.Data.PropertyChanged -= this.OnCurrentSequenceOnPropertyChanged;

                foreach (ITimelineBarElementModel model in this.timelineBarElements)
                {
                    this.RemovePreview(model);
                }

                this.timelineBarElements.Clear();
            }

            this.sequenceRegistry.CurrentSequenceModel.PropertyChanged += this.OnCurrentSequenceOnPropertyChanged;

            // collection is modified
            List <Comment> comments = new List <Comment>(this.sequenceRegistry.CurrentSequenceModel.CommentElements);

            foreach (Comment comment in comments)
            {
                this.AddPreview("Comment", comment);
            }

            this.View.SetDuration(this.sequenceRegistry.CurrentSequenceModel.Duration);
        }
        private void HandleCurrentSequenceChanged(object o, Infrastructure.DataEventArgs <ISequenceModel> eventArgs)
        {
            if (eventArgs != null && eventArgs.Data != null)
            {
                this.sequenceRegistry.CurrentSequence.CommentElements.CollectionChanged -= this.CommentElements_CollectionChanged;
                eventArgs.Data.ElementRemoved -= this.OnCurrentSequenceOnElementRemoved;

                if (this.comments == null)
                {
                    this.comments = new ObservableCollection <Comment>();
                }
                else
                {
                    this.comments.Clear();
                }

                foreach (var comment in this.sequenceRegistry.CurrentSequence.CommentElements)
                {
                    this.comments.Add(comment);
                }
            }

            this.sequenceRegistry.CurrentSequence.CommentElements.CollectionChanged += this.CommentElements_CollectionChanged;
            this.sequenceRegistry.CurrentSequenceModel.ElementRemoved += this.OnCurrentSequenceOnElementRemoved;
        }
 private void OnLoadAssetsCompleted(object sender, Infrastructure.DataEventArgs <List <Asset> > e)
 {
     this.CanSearch = true;
     this.eventAggregator.GetEvent <AssetsAvailableEvent>().Publish(e);
 }
 private void CurrentSequenceChanged(object sender, Infrastructure.DataEventArgs <ISequenceModel> e)
 {
     this.RegisterSequencePropertyChangedHandlers();
     this.OnPropertyChanged("Duration");
     this.OnPropertyChanged("Thumbnail");
 }
Example #5
0
 private void EventDataAdded(object sender, Infrastructure.DataEventArgs <EventData> e)
 {
     this.AddEvent(e.Data);
 }
Example #6
0
 private void EventDataRemoved(object sender, Infrastructure.DataEventArgs <EventData> e)
 {
     this.RemoveEvent(e.Data);
 }
Example #7
0
 private void DataServiceFacade_LoadAssetsCompleted(object sender, Infrastructure.DataEventArgs <List <Asset> > e)
 {
     this.eventAggregator.GetEvent <AssetsAvailableEvent>().Publish(e);
 }