Example #1
0
 /// <summary>
 /// Handles the <see cref="IFavoritesPanelPresenter"/> closure
 /// Gives back the focus to <see cref="IMainPresenter"/>
 /// </summary>
 /// <param name="sender">Not important</param>
 /// <param name="e">Emtpy</param>
 private void FavoritesPanelClosedEventHandler(object sender, EventArgs e)
 {
     this.favoritesController = null;
     this.mainController.ShouldBeEnabled(true);
     this.mainController.UpdateHistory();
     this.mainController.UpdateFavorites();
 }
Example #2
0
        /* ==================================
         * FAVORITES PANEL CONTROLLER
         * ==================================*/

        /// <summary>
        /// Creates a new <see cref="IFavoritesPanelPresenter"/> to answer the demand
        /// </summary>
        /// <param name="sender">Not important</param>
        /// <param name="e">Emtpy</param>
        private void FavoritesPanelAskedEventHandler(object sender, EventArgs e)
        {
            this.mainController.ShouldBeEnabled(false);

            this.favoritesController = new FavoritesPanelPresenter(new FormFavoritesPanel(), this.User.Favorites);
            this.favoritesController.ViewClosedEvent       += this.FavoritesPanelClosedEventHandler;
            this.favoritesController.JumpAskedEvent        += this.JumpAskedEventHandler;
            this.favoritesController.FavoriteModifiedEvent += this.FavModifAskedEventHandler;
            this.favoritesController.FavoritesUpdatedEvent += this.UserDataUpdated;

            this.favoritesController.Show();
        }