コード例 #1
0
        public virtual void CreateSyncMenuView(SyncDevice device)
        {
            if (_syncMenuView == null)
                _syncMenuView = Bootstrapper.GetContainer().Resolve<ISyncMenuView>(new NamedParameterOverloads() { { "device", device } });
            else
                BindSyncMenuView(_syncMenuView, device);

            PushTabView(MobileNavigationTabType.More, _syncMenuView);
        }
コード例 #2
0
 public virtual void BindSyncMenuView(ISyncMenuView view, SyncDevice device)
 {
     _syncMenuView = view;
     _syncMenuView.OnViewDestroy = (view2) =>
     {
         _syncMenuPresenter.ViewDestroyed();
         _syncMenuPresenter = null;
         _syncMenuView = null;
     };
     _syncMenuPresenter = Bootstrapper.GetContainer().Resolve<ISyncMenuPresenter>(new NamedParameterOverloads() { { "device", device } });
     _syncMenuPresenter.BindView(view);
 }
コード例 #3
0
ファイル: NavigationManager.cs プロジェクト: pascalfr/MPfm
        public virtual ISyncMenuView CreateSyncMenuView(SyncDevice device)
        {
            if(_syncMenuView != null)
            {
                _syncMenuView.ShowView(true);
                return _syncMenuView;
            }

            Action<IBaseView> onViewReady = (view) =>
            {                    
                _syncMenuPresenter = Bootstrapper.GetContainer().Resolve<ISyncMenuPresenter>();
                _syncMenuPresenter.BindView((ISyncMenuView)view);
            };

            _syncMenuView = Bootstrapper.GetContainer().Resolve<ISyncMenuView>(new NamedParameterOverloads() { { "onViewReady", onViewReady } });
            _syncMenuView.OnViewDestroy = (view) => {
                _syncMenuPresenter.ViewDestroyed();
                _syncMenuPresenter = null;
                _syncMenuView = null;
            };
            return _syncMenuView;
        }