Exemple #1
0
        private async void _settingVM_Deactivated(object sender, DeactivationEventArgs e)
        {
            _settingVM.Deactivated -= _settingVM_Deactivated;
            bool ok = _settingVM.DialogResult;

            if (ok)
            {
                var config = await JsonHelper.JsonDeserializeFromFileAsync <SettingObject>(AppManager.SettingPath);

                await AppManager.ApplySetting(config);

                await _eventAggregator.PublishOnUIThreadAsync(new SettingSaved());
            }
            _settingVM = null;
        }