コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ProductCatalogPresenter"/> class.
        /// </summary>
        /// <param name="view">The product catalog view.</param>
        public ProductCatalogPresenter(IProductCatalogView view)
            : base(view)
        {
            this.View = view;
              this.View.Save += this.Save;
              this.View.Search += this.Search;
              this.View.SelectedProductsGridRowDoubleClick += this.SelectedProductsGridRowDoubleClick;
              this.View.AddButtonClick += this.AddButtonClick;

              this.ProductCatalog = new ProductCatalog
              {
            ItemUri = view.CatalogUri,
            Database = Database.GetDatabase(this.View.CurrentItemUri.DatabaseName),
            Language = this.View.CurrentItemUri.Language
              };

              this.CatalogSettings = new ProductCatalogSettings { ItemUri = this.View.CurrentItemUri };
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ProductCatalogPresenter"/> class.
        /// </summary>
        /// <param name="view">The product catalog view.</param>
        public ProductCatalogPresenter(IProductCatalogView view)
            : base(view)
        {
            this.View         = view;
            this.View.Save   += this.Save;
            this.View.Search += this.Search;
            this.View.SelectedProductsGridRowDoubleClick += this.SelectedProductsGridRowDoubleClick;
            this.View.AddButtonClick += this.AddButtonClick;

            this.ProductCatalog = new ProductCatalog
            {
                ItemUri  = view.CatalogUri,
                Database = Database.GetDatabase(this.View.CurrentItemUri.DatabaseName),
                Language = this.View.CurrentItemUri.Language
            };

            this.CatalogSettings = new ProductCatalogSettings {
                ItemUri = this.View.CurrentItemUri
            };
        }