Esempio n. 1
0
        public virtual void CreateSyncCloudView()
        {
            if (_syncCloudView == null)
                _syncCloudView = Bootstrapper.GetContainer().Resolve<ISyncCloudView>();

            PushTabView(MobileNavigationTabType.More, _syncCloudView);
        }
Esempio n. 2
0
 public virtual void BindSyncCloudView(ISyncCloudView view)
 {
     _syncCloudView = view;
     _syncCloudView.OnViewDestroy = (view2) =>
     {
         _syncCloudPresenter.ViewDestroyed();
         _syncCloudPresenter = null;
         _syncCloudView = null;
     };
     _syncCloudPresenter = Bootstrapper.GetContainer().Resolve<ISyncCloudPresenter>();
     _syncCloudPresenter.BindView(view);
 }
Esempio n. 3
0
        public virtual ISyncCloudView CreateSyncCloudView()
        {
            // If the view is still visible, just make it the top level window
            if (_syncCloudView != null)
            {
                _syncCloudView.ShowView(true);
                return _syncCloudView;
            }

            // The view invokes the OnViewReady action when the view is ready. This means the presenter can be created and bound to the view.
            Action<IBaseView> onViewReady = (view) =>
            {
                _syncCloudPresenter = Bootstrapper.GetContainer().Resolve<ISyncCloudPresenter>();
                _syncCloudPresenter.BindView((ISyncCloudView)view);
            };

            // Create view and manage view destruction
            _syncCloudView = Bootstrapper.GetContainer().Resolve<ISyncCloudView>(new NamedParameterOverloads() { { "onViewReady", onViewReady } });
            _syncCloudView.OnViewDestroy = (view) =>
            {
                _syncCloudPresenter.ViewDestroyed();
                _syncCloudPresenter = null;
                _syncCloudView = null;
            };
            return _syncCloudView;
        }