Exemplo n.º 1
0
 void ConnectionPropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     if (e.Is("IsConnected"))
     {
         var now = Connection.IsConnected;
         if (!_isConnectedLast && now)
         {
             // Connected - construct model container
             _modelContainer = new SpringContainer();
             _modelContainer.Add <IStorage>(Connection.Storage);
             _modelContainer.Add <PageViewModelCache, PageViewModelCache>();
             PageViewModel.Subscribe(Storage);
             _currentPage = PageViewModelCache.Get(RootPage, null);
             OnPropertyChanged(null);
         }
         else if (_isConnectedLast && !now)
         {
             // Disconnected
             _modelContainer = null;
             OnPropertyChanged(null);
         }
         _isConnectedLast = now;
     }
 }
Exemplo n.º 2
0
 public static PageViewModel Get(PageViewModelCache cache, IPage page, PageViewModel parent)
 {
 }