示例#1
0
 public SyncContent(ISyncView syncView, Action dispose)
 {
     this.syncView = syncView;
     this.dispose  = dispose;
 }
示例#2
0
 public SyncModel(ISyncView view)
 {
     this.view          = view;
     this.semaphoreSlim = new SemaphoreSlim(1);
 }
示例#3
0
        public virtual void CreateSyncView()
        {
            if (_syncView == null)
                _syncView = Bootstrapper.GetContainer().Resolve<ISyncView>();

            PushTabView(MobileNavigationTabType.More, _syncView);
        }
示例#4
0
 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);
 }
示例#5
0
 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;
 }