public virtual IUpdateLibraryView CreateUpdateLibraryView() { if(_updateLibraryView == null) _updateLibraryView = Bootstrapper.GetContainer().Resolve<IUpdateLibraryView>(); return _updateLibraryView; }
public virtual void BindUpdateLibraryView(IUpdateLibraryView view) { _updateLibraryView = view; _updateLibraryPresenter = Bootstrapper.GetContainer().Resolve<IUpdateLibraryPresenter>(); _updateLibraryPresenter.BindView(view); _updateLibraryView.OnViewDestroy = (view2) => { _updateLibraryPresenter.ViewDestroyed(); _updateLibraryPresenter = null; _updateLibraryView = null; }; }
public virtual IUpdateLibraryView CreateUpdateLibraryView(List<string> filePaths, List<Folder> folderPaths) { if (_updateLibraryView != null) { _updateLibraryView.ShowView(true); return _updateLibraryView; } Action<IBaseView> onViewReady = (view) => { _updateLibraryPresenter = Bootstrapper.GetContainer().Resolve<IUpdateLibraryPresenter>(); _updateLibraryPresenter.BindView((IUpdateLibraryView)view); _updateLibraryPresenter.UpdateLibrary(filePaths, folderPaths); }; _updateLibraryView = Bootstrapper.GetContainer().Resolve<IUpdateLibraryView>(new NamedParameterOverloads() { { "onViewReady", onViewReady } }); _updateLibraryView.OnViewDestroy = (view) => { _updateLibraryPresenter.ViewDestroyed(); _updateLibraryPresenter = null; _updateLibraryView = null; }; return _updateLibraryView; }