コード例 #1
0
 public virtual void BindEqualizerPresetsView(IBaseView sourceView, IEqualizerPresetsView view)
 {
     _equalizerPresetsView = view;
     _equalizerPresetsView.OnViewDestroy = (view2) =>
     {
         _equalizerPresetsPresenter.ViewDestroyed();
         _equalizerPresetsPresenter = null;
         _equalizerPresetsView = null;
     };
     _equalizerPresetsPresenter = Bootstrapper.GetContainer().Resolve<IEqualizerPresetsPresenter>();
     _equalizerPresetsPresenter.BindView(view);
 }
コード例 #2
0
ファイル: NavigationManager.cs プロジェクト: pascalfr/MPfm
        public virtual IDesktopEffectsView CreateEffectsView()
        {
            if(_effectsView != null)
            {
                _effectsView.ShowView(true);
                return _effectsView;
            }

            Action<IBaseView> onViewReady = (view) => {                    
                _equalizerPresetsPresenter = Bootstrapper.GetContainer().Resolve<IEqualizerPresetsPresenter>();
                _equalizerPresetsPresenter.BindView((IEqualizerPresetsView)view);
                _equalizerPresetDetailsPresenter = Bootstrapper.GetContainer().Resolve<IEqualizerPresetDetailsPresenter>(new NamedParameterOverloads() { { "presetId", Guid.Empty } });
                _equalizerPresetDetailsPresenter.BindView((IEqualizerPresetDetailsView)view);
            };

            _effectsView = Bootstrapper.GetContainer().Resolve<IDesktopEffectsView>(new NamedParameterOverloads() { { "onViewReady", onViewReady } });
            _effectsView.OnViewDestroy = (view) => {
                _effectsView = null;
                _equalizerPresetsPresenter.ViewDestroyed();
                _equalizerPresetsPresenter = null;
                _equalizerPresetDetailsPresenter.ViewDestroyed();
                _equalizerPresetDetailsPresenter = null;
            };
            return _effectsView;
        }