// <copyright file="SearchModule.cs" company="GoalBook"> // Copyright © 2009 Mark Brownsword. All rights reserved. // This source code and supporting files are licensed under The Code Project // Open License (CPOL) as detailed at http://www.codeproject.com/info/cpol10.aspx. // </copyright> namespace GoalBook.Shell.Modules { #region Using Statements using System; using System.Reflection; using System.Windows.Input; using GoalBook.Infrastructure; using GoalBook.Infrastructure.Constants; using GoalBook.Infrastructure.Enums; using GoalBook.Infrastructure.Interfaces; using GoalBook.Shell.Views; using Microsoft.Practices.Composite.Modularity; using Microsoft.Practices.Composite.Presentation.Commands; using Microsoft.Practices.Unity; #endregion /// <summary> /// Search Module. /// </summary> [Module(ModuleName = "Search")] public class SearchModule : IModule { #region Constants and Enums #endregion #region Instance and Shared Fields /// <summary> /// Declaration for INavigationService. /// </summary> private readonly INavigationService navigation; /// <summary> /// Declaration for IUnityContainer. /// </summary> private readonly IUnityContainer container; /// <summary> /// Declaration for ILoggerService. /// </summary> private readonly ILoggerService logger; /// <summary> /// Declaration for ISettingsService. /// </summary> private readonly ISettingsService settingsService; /// <summary> /// Declaration for SearchViewPresenter. /// </summary> private SearchViewPresenter searchViewPresenter; #endregion #region Constructors /// <summary> /// Initializes a new instance of the TasksModule class. /// </summary> /// <param name="navigation">navigation parameter</param> /// <param name="container">container parameter</param> /// <param name="logger">logger parameter</param> /// <param name="settingsService">settingsService parameter</param> public SearchModule(INavigationService navigation, IUnityContainer container, ILoggerService logger, ISettingsService settingsService) { this.navigation = navigation; this.container = container; this.logger = logger; this.settingsService = settingsService; // Initialise TasksViewPresenter. this.searchViewPresenter = this.container.Resolve<SearchViewPresenter>(); this.searchViewPresenter.View = this.container.Resolve<SearchView>(); this.searchViewPresenter.InitView(); } #endregion #region Delegates and Events #endregion #region Properties #endregion #region Public and internal Methods /// <summary> /// Initialize the module. /// </summary> public void Initialize() { if (this.navigation.LoadSearchView(this.searchViewPresenter.View)) { this.searchViewPresenter.View.Activate(); } } #endregion #region Base Class Overrides #endregion #region Private and Protected Methods #endregion #region Event Handlers #endregion } }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)