public SyncContent(ISyncView syncView, Action dispose) { this.syncView = syncView; this.dispose = dispose; }
public SyncModel(ISyncView view) { this.view = view; this.semaphoreSlim = new SemaphoreSlim(1); }
public virtual void CreateSyncView() { if (_syncView == null) _syncView = Bootstrapper.GetContainer().Resolve<ISyncView>(); PushTabView(MobileNavigationTabType.More, _syncView); }
public virtual void BindSyncView(ISyncView view) { _syncView = view; _syncView.OnViewDestroy = (view2) => { _syncPresenter.ViewDestroyed(); _syncPresenter = null; _syncView = null; }; _syncPresenter = Bootstrapper.GetContainer().Resolve<ISyncPresenter>(); _syncPresenter.BindView(view); }
public virtual ISyncView CreateSyncView() { // If the view is still visible, just make it the top level window if(_syncView != null) { _syncView.ShowView(true); return _syncView; } // 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) => { _syncPresenter = Bootstrapper.GetContainer().Resolve<ISyncPresenter>(); _syncPresenter.BindView((ISyncView)view); }; // Create view and manage view destruction _syncView = Bootstrapper.GetContainer().Resolve<ISyncView>(new NamedParameterOverloads() { { "onViewReady", onViewReady } }); _syncView.OnViewDestroy = (view) => { _syncPresenter.ViewDestroyed(); _syncPresenter = null; _syncView = null; }; return _syncView; }