コード例 #1
0
 /// <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>();
 }
コード例 #2
0
 /// <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>();
 }
コード例 #3
0
 /// <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;
 }