Ejemplo n.º 1
0
        private void LoadFiltersData(FilteringViewModel filteringViewModel)
        {
            FilteringModel.FilteringState savedFilters = null;

            try
            {
                savedFilters = Serializer.LoadObjectFromFile(savedFiltersPath) as FilteringModel.FilteringState;
            }
            catch (SerializationException)
            {
                WindowHelper.ShowError("Failed to restore previous data. Corrupted files will be overwritten.");
            }

            if (savedFilters != null)
            {
                filteringViewModel.SetState(savedFilters);
            }
        }
 internal void SetState(FilteringModel.FilteringState state)
 {
     state.SetState(_model);
 }