/// <summary> /// Attach the cultivar model to the cultivar view /// </summary> /// <param name="model">The mode</param> /// <param name="view">The view</param> /// <param name="explorerPresenter">The parent explorer presenter</param> public void Attach(object model, object view, ExplorerPresenter explorerPresenter) { this.cultivar = model as Cultivar; this.view = view as ICultivarView; this.explorerPresenter = explorerPresenter; this.view.Aliases = this.cultivar.Aliases; this.view.Commands = this.cultivar.Commands; this.view.AliasesChanged += this.OnAliasesChanged; this.view.CommandsChanged += this.OnCommandsChanged; this.view.ContextItemsNeeded += this.OnContextItemsNeeded; this.explorerPresenter.CommandHistory.ModelChanged += this.OnModelChanged; }