Ejemplo n.º 1
0
 /// <summary>
 /// Handles the <see cref="IHistoryPanelPresenter"/> closure
 /// Gives back the focus to <see cref="IMainPresenter"/>
 /// </summary>
 /// <param name="sender">Not important</param>
 /// <param name="e">Emtpy</param>
 private void HistoryPanelClosedEventHandler(object sender, EventArgs e)
 {
     this.historyController = null;
     this.mainController.ShouldBeEnabled(true);
     this.mainController.UpdateFavorites();
     this.mainController.UpdateHistory();
 }
Ejemplo n.º 2
0
        /* ==================================
         * HISTORY PANEL CONTROLLER
         * ==================================*/

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

            this.historyController = new HistoryPanelPresenter(new FormHistoryPanel(), this.User.History);
            this.historyController.JumpAskedEvent      += this.JumpAskedEventHandler;
            this.historyController.ViewClosedEvent     += this.HistoryPanelClosedEventHandler;
            this.historyController.HistoryUpdatedEvent += this.UserDataUpdated;

            this.historyController.Show();
        }