public virtual void BindAudioPreferencesView(IAudioPreferencesView view)
 {
     _audioPreferencesView = view;
     _audioPreferencesPresenter = Bootstrapper.GetContainer().Resolve<IAudioPreferencesPresenter>();
     _audioPreferencesPresenter.BindView(view);
     _audioPreferencesView.OnViewDestroy = (view2) =>
     {
         _audioPreferencesPresenter.ViewDestroyed();
         _audioPreferencesPresenter = null;
         _audioPreferencesView = null;
     };            
 }
Beispiel #2
0
 public virtual IDesktopPreferencesView CreatePreferencesView()
 {
     if(_preferencesView != null)
     {
         _preferencesView.ShowView(true);
         return _preferencesView;
     }
     
     Action<IBaseView> onViewReady = (view) => {                    
         _audioPreferencesPresenter = Bootstrapper.GetContainer().Resolve<IAudioPreferencesPresenter>();
         _audioPreferencesPresenter.BindView((IAudioPreferencesView)view);
         _cloudPreferencesPresenter = Bootstrapper.GetContainer().Resolve<ICloudPreferencesPresenter>();
         _cloudPreferencesPresenter.BindView((ICloudPreferencesView)view);
         _generalPreferencesPresenter = Bootstrapper.GetContainer().Resolve<IGeneralPreferencesPresenter>();
         _generalPreferencesPresenter.BindView((IGeneralPreferencesView)view);
         _libraryPreferencesPresenter = Bootstrapper.GetContainer().Resolve<ILibraryPreferencesPresenter>();
         _libraryPreferencesPresenter.BindView((ILibraryPreferencesView)view);
     };
     
     _preferencesView = Bootstrapper.GetContainer().Resolve<IDesktopPreferencesView>(new NamedParameterOverloads() { { "onViewReady", onViewReady } });
     _preferencesView.OnViewDestroy = (view) => {
         _preferencesView = null;
         _audioPreferencesPresenter.ViewDestroyed();
         _audioPreferencesPresenter = null;
         _cloudPreferencesPresenter.ViewDestroyed();
         _cloudPreferencesPresenter = null;
         _generalPreferencesPresenter.ViewDestroyed();
         _generalPreferencesPresenter = null;
         _libraryBrowserPresenter.ViewDestroyed();
         _libraryPreferencesPresenter = null;
     };
     return _preferencesView;
 }