Exemplo n.º 1
0
        public void LoadState(AddSprudelSuchePageState state)
        {
            SearchText     = state.SearchText;
            GeocodeResults = new ObservableCollection <GeocodeResult>(state.GeocodeResults);

            if (!String.IsNullOrWhiteSpace(state.SelectedGeocodeResultUniqueId))
            {
                SelectedGeocodeResult = GeocodeResults.FirstOrDefault(r => r.UniqueId == state.SelectedGeocodeResultUniqueId);
            }
        }
Exemplo n.º 2
0
        public AddSprudelSuchePageState SaveState()
        {
            var state = new AddSprudelSuchePageState()
            {
                SearchText     = this.SearchText,
                GeocodeResults = this.GeocodeResults.ToList(),
                SelectedGeocodeResultUniqueId = this.SelectedGeocodeResult != null ? this.SelectedGeocodeResult.UniqueId : ""
            };

            return(state);
        }