private void App_Suspending(object sender, SuspendingEventArgs e)
        {
            AppSettingsService.AddToSettings <string>("WorkingDataset", _viewModel.Dataset.Name);
            ApplicationDataCompositeValue datasetLastSavedStates =
                AppSettingsService.RetrieveFromSettings <ApplicationDataCompositeValue>(
                    "DatasetLastSavedStates", new ApplicationDataCompositeValue()
                    );

            datasetLastSavedStates[_viewModel.Dataset.Name] = JsonConvert.SerializeObject(new DatasetViewSavedState
            {
                Day          = _viewModel.CurrentDate,
                EventInView  = dataListView.SelectedIndex,
                EventTimeTag = (_viewModel.SelectedSensorEvent != null) ?
                               _viewModel.SelectedSensorEvent.TimeTag : _viewModel.CurrentDate,
                Filter = _viewModel.EventViewFilter
            });
            AppSettingsService.AddToSettings <ApplicationDataCompositeValue>("DatasetLastSavedStates", datasetLastSavedStates);
        }