/************************************************
         * Constructors
         ***********************************************/
        /// <summary>
        /// Initializes a new <see cref="BrowserViewPresenter"/> instance.
        /// </summary>
        /// <param name="view">
        /// The view the presenter will control.
        /// </param>
        /// <param name="regionManager">
        /// The region manager that can be used to place views.
        /// </param>
        /// <param name="searchEngine">
        /// The search engine that will provide results.
        /// </param>
        public CriteriaViewPresenter(ICriteriaView view, IRegionManagerService regionManager, ISearchEngine searchEngine)
        {
            // Store locally
            this.view = view;
            this.regionManager = regionManager;
            this.searchEngine = searchEngine;

            // Subscribe to events from the view
            view.SearchRequested += new EventHandler(view_SearchRequested);
        }
        /************************************************
         * Constructors
         ***********************************************/
        /// <summary>
        /// Initializes a new <see cref="BrowserViewPresenter"/> instance.
        /// </summary>
        /// <param name="view">
        /// The view the presenter will control.
        /// </param>
        /// <param name="regionManager">
        /// The region manager that can be used to place views.
        /// </param>
        /// <param name="searchEngine">
        /// The search engine that will provide results.
        /// </param>
        public ResultDetailsViewPresenter(IResultDetailsView view, IRegionManagerService regionManager, IResultSelectionService resultSelector)
        {
            // Store locally
            this.view = view;
            this.regionManager = regionManager;
            this.resultSelector = resultSelector;

            // Subscribe to selection change notifications
            resultSelector.SelectedResultChanged += new EventHandler(resultSelector_SelectedResultChanged);
        }
        /************************************************
         * Constructors
         ***********************************************/
        /// <summary>
        /// Initializes a new <see cref="BrowserViewPresenter"/> instance.
        /// </summary>
        /// <param name="view">
        /// The view the presenter will control.
        /// </param>
        /// <param name="regionManager">
        /// The region manager that can be used to place views.
        /// </param>
        /// <param name="searchEngine">
        /// The search engine that will provide results.
        /// </param>
        public BrowserViewPresenter(IBrowserView view, IRegionManagerService regionManager, ISearchEngine searchEngine)
        {
            // Store locally
            this.view = view;
            this.regionManager = regionManager;
            this.searchEngine = searchEngine;

            // Subscribe to selection events from the view to bubble up
            view.SelectedResultChanged += new EventHandler(view_SelectedResultChanged);

            // Subscribe to search result notifications
            searchEngine.SearchComplete += new EventHandler<SearchCompleteEventArgs>(searchEngine_SearchComplete);
        }
Exemplo n.º 4
0
 /// <summary>
 /// Notifies the module that it has be initialized.
 /// </summary>
 /// <param name="regionManager">The region manager.</param>
 protected override void RegisterViews(IRegionManagerService regionManager)
 {
     regionManager.RegisterViewWithRegion(RegionNames.BrowserRegion, () => Container.Resolve <BrowserView>());
 }
Exemplo n.º 5
0
        /// <summary>
        /// Registers the views.
        /// <para>
        /// This is the third method called in the initialization process (Called AFTER RegisterTypes)
        /// </para>
        /// </summary>
        /// <param name="regionManager">The region manager.</param>
        protected override void RegisterViews(IRegionManagerService regionManager)
        {
            var menuService = Container.Resolve <IMenuService>();

            menuService.Register(new CallbackMenuItem(null, "Tools", new CallbackMenuItem(OpenSettingsCallback, "Settings")));
        }
Exemplo n.º 6
0
 protected override void RegisterViews(IRegionManagerService regionManagerService)
 {
     callOrder.Add("RegisterViews");
 }
Exemplo n.º 7
0
 /// <summary>
 /// Registers the views.
 /// <para>
 /// This is the third method called in the initialization process (Called AFTER RegisterTypes)
 /// </para>
 /// </summary>
 /// <param name="regionManager">The region manager.</param>
 protected override void RegisterViews(IRegionManagerService regionManager)
 {
     regionManager.RegisterViewWithRegion(RegionNames.VisualizationRegion, () => Container.Resolve <VisualizationView>());
 }
Exemplo n.º 8
0
 /// <summary>
 /// Registers the views.
 /// <para>
 /// This is the third method called in the initialization process (Called AFTER RegisterTypes)
 /// </para>
 /// </summary>
 /// <param name="regionManager">The region manager.</param>
 protected override void RegisterViews(IRegionManagerService regionManager)
 {
     regionManager.RegisterViewWithRegion(RegionNames.ControlsRegion, () => Container.Resolve <PlayerControlsView>());
     regionManager.RegisterViewWithRegion(RegionNames.CollapsedPlayerControlsRegion, () => Container.Resolve <CollapsedPlayerControls>());
 }
Exemplo n.º 9
0
 /// <summary>
 /// Registers the views.
 /// <para>
 /// This is the third method called in the initialization process (Called AFTER RegisterTypes)
 /// </para>
 /// </summary>
 /// <param name="regionManager">The region manager.</param>
 protected override void RegisterViews(IRegionManagerService regionManager)
 {
     regionManager.RegisterViewWithRegion(RegionNames.HeaderRegion, () => Container.Resolve <MainMenuView>());
     regionManager.RegisterViewWithRegion(RegionNames.StatusRegion, () => Container.Resolve <StatusView>());
 }
Exemplo n.º 10
0
 /// <summary>
 /// Registers the views.
 /// <para>
 /// This is the third method called in the initialization process (Called AFTER RegisterTypes)
 /// </para>
 /// </summary>
 /// <param name="regionManagerService">The region manager service.</param>
 protected virtual void RegisterViews(IRegionManagerService regionManagerService)
 {
 }