/// <summary> /// Attach this presenter with a view. /// </summary> /// <param name="view">The view to attach</param> public void Attach(object view) { this.view = view as ITabbedExplorerView; this.view.PopulateStartPage += this.OnPopulateStartPage; this.view.MruFileClick += this.OnMruApsimOpenFile; this.view.TabClosing += this.OnTabClosing; this.Presenters = new List<ExplorerPresenter>(); }
/// <summary> /// Attach this presenter with a view. /// </summary> /// <param name="view">The view to attach</param> public void Attach(object view) { this.view = view as ITabbedExplorerView; this.view.PopulateStartPage += this.OnPopulateStartPage; this.view.MruFileClick += this.OnMruApsimOpenFile; this.view.TabClosing += this.OnTabClosing; this.Presenters = new List <ExplorerPresenter>(); }
/// <summary> /// Detach this presenter from the view. /// </summary> /// <param name="view">The view used for this object</param> public void Detach(object view) { this.view.PopulateStartPage -= this.OnPopulateStartPage; this.view.MruFileClick -= this.OnMruApsimOpenFile; this.view.TabClosing -= this.OnTabClosing; this.view = null; this.Presenters = null; }