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); }
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); }
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 }
public void Restore(IDataStorage store) { this.SearchText = store.Restore(() => this.SearchText, string.Empty); this.Items = store.Restore(() => this.Items, new ObservableCollection<SearchItemViewModel>()); }
public void Restore(IDataStorage store) { var src = store.Restore(() => this.InitialSource, null); if (null != src) this.InitialSource = src; }