/// <summary> /// Initializes a new instance of the <see cref="CommentsBarPresenter"/> class. /// </summary> /// <param name="view">Instance of the <see cref="ICommentsBarView"/> interface.</param> /// <param name="eventAggregator">Instance of the <see cref="IEventAggregator"/> interface.</param> /// <param name="timelineModel">Instance of the <see cref="ITimelineModel"/> interface.</param> public CommentsBarPresenter(ICommentsBarView view, IEventAggregator eventAggregator, ITimelineModel timelineModel, ITimelineBarRegistry timelineBarRegistry) { this.eventAggregator = eventAggregator; this.timelineModel = timelineModel; this.timelineModel.PropertyChanged += (s, e) => { if (e.PropertyName == "Duration") { this.View.SetDuration(this.timelineModel.Duration); } }; this.timelineBarRegistry = timelineBarRegistry; this.View = view; this.timelineBarElements = new List <ITimelineBarElementModel>(); this.Options = new List <string>(); this.OptionSelectedCommand = new DelegateCommand <string>(this.AddSelectedOption); this.CloseCommand = new DelegateCommand <object>(this.CloseOptionsMenu); this.View.SetDuration(this.timelineModel.Duration); this.eventAggregator.GetEvent <PositionDoubleClickedEvent>().Subscribe(this.AddPreview, true); this.eventAggregator.GetEvent <RefreshElementsEvent>().Subscribe(this.RefreshPreviews, true); this.eventAggregator.GetEvent <AddPreviewEvent>().Subscribe(this.AddPreview, true); this.View.Model = this; }
/// <summary> /// Initializes a new instance of the <see cref="BaseCommentsBarPresenter"/> class. /// </summary> /// <param name="view">Instance of the <see cref="ICommentsBarView"/> interface.</param> /// <param name="eventAggregator">Instance of the <see cref="IEventAggregator"/> interface.</param> /// <param name="sequenceRegistry">Instance of the <see cref="ISequenceRegistry"/> interface.</param> /// /// <param name="timelineBarRegistry">Instance of the <see cref="ITimelineBarRegistry"/> interface.</param> protected BaseCommentsBarPresenter(ICommentsBarView view, IEventAggregator eventAggregator, ISequenceRegistry sequenceRegistry, ITimelineBarRegistry timelineBarRegistry) { this.eventAggregator = eventAggregator; this.sequenceRegistry = sequenceRegistry; this.sequenceRegistry.CurrentSequenceChanged += this.HandleCurrentSequenceChanged; this.timelineBarRegistry = timelineBarRegistry; this.View = view; if (this.sequenceRegistry.CurrentSequenceModel != null) { this.sequenceRegistry.CurrentSequenceModel.PropertyChanged += this.OnCurrentSequenceOnPropertyChanged; this.View.SetDuration(this.sequenceRegistry.CurrentSequenceModel.Duration); } this.timelineBarElements = new List <ITimelineBarElementModel>(); this.Options = new List <string>(); this.OptionSelectedCommand = new DelegateCommand <string>(this.AddSelectedOption); this.CloseCommand = new DelegateCommand <object>(this.CloseOptionsMenu); this.eventAggregator.GetEvent <PositionDoubleClickedEvent>().Subscribe(this.AddPreview, ThreadOption.PublisherThread, true, this.FilterPositionDoubleClickedEvent); this.eventAggregator.GetEvent <RefreshElementsEvent>().Subscribe(this.RefreshPreviews, ThreadOption.PublisherThread, true, this.FilterRefreshElements); this.eventAggregator.GetEvent <AddPreviewEvent>().Subscribe( this.AddPreview, ThreadOption.UIThread, true, this.FilterAddPreviewEvent); this.eventAggregator.GetEvent <RemovePreviewEvent>().Subscribe(this.RemovePreview, ThreadOption.UIThread, true, this.FilterRemovePreviewEvent); this.eventAggregator.GetEvent <DeleteAllPreviewsEvent>().Subscribe(this.DeleteAllPreviews, ThreadOption.PublisherThread, true, this.FilterDeleteAllPreviewsEvent); this.View.Model = this; }
/// <summary> /// Initializes the PlayByPlayModule instance. /// </summary> public void Initialize() { this.RegisterViewsAndServices(); ITimelineBarRegistry registry = this.container.Resolve <ITimelineBarRegistry>(); registry.RegisterTimelineBarElement("PlayByPlay", () => this.container.Resolve <IPlayByPlayBoxesPresentationModel>()); }
/// <summary> /// Initializes the CommentsBarModule instance. /// </summary> public void Initialize() { this.RegisterViewsAndServices(); ITimelineBarRegistry registry = this.container.Resolve <ITimelineBarRegistry>(); registry.RegisterTimelineBarElement("Marker", () => this.container.Resolve <IMarkerEditBoxPresentationModel>()); }
/// <summary> /// Initializes the CommentsBarModule instance. /// </summary> public void Initialize() { this.RegisterViewsAndServices(); this.regionViewRegistry.RegisterViewWithRegion("MarkersBrowserRegion", () => this.container.Resolve <IMarkersListViewModel>().View); ITimelineBarRegistry registry = this.container.Resolve <ITimelineBarRegistry>(); registry.RegisterTimelineBarElement("Marker", () => this.container.Resolve <IMarkerEditBoxPresentationModel>()); }
/// <summary> /// Registers the view and models in the container. Inserts the view in the tools region. /// </summary> public void Initialize() { this.RegisterViewsAndServices(); ICommentViewPresentationModel presentationModel = this.container.Resolve <ICommentViewPresentationModel>(); this.regionManager.RegisterViewWithRegionInIndex(RegionNames.ToolsRegion, presentationModel.View, 2); ITimelineBarRegistry registry = this.container.Resolve <ITimelineBarRegistry>(); registry.RegisterTimelineBarElement("Comment", () => this.container.Resolve <ICommentEditBoxPresentationModel>()); }
/// <summary> /// Initializes a new instance of the <see cref="CommentsBarPresenter"/> class. /// </summary> /// <param name="view">Instance of the <see cref="ICommentsBarView"/> interface.</param> /// <param name="eventAggregator">Instance of the <see cref="IEventAggregator"/> interface.</param> /// <param name="timelineModel">Instance of the <see cref="ISequenceModel"/> interface.</param> public CommentsBarPresenter(ICommentsBarView view, IEventAggregator eventAggregator, ISequenceRegistry sequenceRegistry, ITimelineBarRegistry timelineBarRegistry) { this.eventAggregator = eventAggregator; this.sequenceRegistry = sequenceRegistry; this.sequenceRegistry.CurrentSequenceChanged += this.HandleCurrentSequenceChanged; this.sequenceRegistry.CurrentSequenceModel.PropertyChanged += this.OnCurrentSequenceOnPropertyChanged; this.timelineBarRegistry = timelineBarRegistry; this.View = view; this.View.SetDuration(this.sequenceRegistry.CurrentSequenceModel.Duration); this.timelineBarElements = new List <ITimelineBarElementModel>(); this.Options = new List <string>(); this.OptionSelectedCommand = new DelegateCommand <string>(this.AddSelectedOption); this.CloseCommand = new DelegateCommand <object>(this.CloseOptionsMenu); this.eventAggregator.GetEvent <PositionDoubleClickedEvent>().Subscribe(this.AddPreview, true); this.eventAggregator.GetEvent <RefreshElementsEvent>().Subscribe(this.RefreshPreviews, true); this.eventAggregator.GetEvent <AddPreviewEvent>().Subscribe(this.AddPreview, true); this.View.Model = this; }
public TimelineCommentsBarPresenter(ICommentsBarView view, IEventAggregator eventAggregator, ISequenceRegistry sequenceRegistry, ITimelineBarRegistry timelineBarRegistry) : base(view, eventAggregator, sequenceRegistry, timelineBarRegistry) { }
public SubClipCommentsBarPresenter(ICommentsBarView view, IEventAggregator eventAggregator, ISequenceRegistry sequenceRegistry, ITimelineBarRegistry timelineBarRegistry) : base(view, eventAggregator, sequenceRegistry, timelineBarRegistry) { eventAggregator.GetEvent <DurationChangedEvent>().Subscribe(this.OnDurationChanged, ThreadOption.PublisherThread, false); this.View.SetEditBoxMargins(0, -93, 0, 0); this.View.SetEditBoxZeeIndex(1000); }
public AdsModule(IUnityContainer container, ITimelineBarRegistry registry, IRegionViewRegistry regionViewRegistry) { this.container = container; this.registry = registry; this.regionViewRegistry = regionViewRegistry; }