コード例 #1
0
 public static void Restore(IDataStorage store)
 {
     _mainViewModel = store.Restore<MainViewModel>(typeof (MainViewModel).Name);
     _loginViewModel = store.Restore<LoginViewModel>(typeof (LoginViewModel).Name);
     _registrationViewModel = store.Restore<RegistrationViewModel>(typeof (RegistrationViewModel).Name);
 }
コード例 #2
0
        public void Restore(IDataStorage store)
        {
            // only want to restore if this is a tombstone scenario
            if (IoC.Get<IApp>().IsNewApp)
            {
                return;
            }

            _scheduleView = store.Restore(() => this.ScheduleView, MySchedule);
            _isMyScheduleView = store.Restore(() => this.IsMyScheduleView, true);
            _notFoundText = store.Restore(() => this.NotFoundText, _notFoundText);
            _sessionIds = store.Restore(() => this.SessionIds, null);
            _childViewModel = this.ChildViewModels[_scheduleView];
            WithCoreDataPresent(Resume);
        }
コード例 #3
0
        public void Restore(IDataStorage store)
        {
            this.SearchText = store.Restore(() => this.SearchText, DefaultSearchText);
            this.TweetItems = store.Restore(() => this.TweetItems, new ObservableCollection<TweetItemViewModel>());
            //this.WasRestored = (this.TweetItems.Any());

            // hmm we can't seem to show messagebox at any good point here as it's too early
            // consider
            // http://dotnet-redzone.blogspot.com/2010/10/windows-phone-7-tombstoning-and.html
        }
コード例 #4
0
 public void Restore(IDataStorage store)
 {
     this.SearchText = store.Restore(() => this.SearchText, string.Empty);
     this.Items = store.Restore(() => this.Items, new ObservableCollection<SearchItemViewModel>());
 }
コード例 #5
0
        public void Restore(IDataStorage store)
        {
            var src = store.Restore(() => this.InitialSource, null);

            if (null != src)
                this.InitialSource = src;
        }