private void OnNavigateToExtraSettingsCommand() { _settings.Load(); _interactionService.Interact(ApplicationInteractionProviders.ExtraSettingsInteractionProvider, viewModel => { viewModel.Title = "Дополнительные настройки"; viewModel.AcknowledgeEnabled = _settings.AcknowledgeEnabled; viewModel.FullTimeout = _settings.FullTimeoutPeriod; viewModel.PartialTimeout = _settings.PartialTimeoutPeriod; viewModel.QueryTimeout = _settings.QueryTimeoutPeriod; viewModel.MinuteRepeatInterval = _settings.MillisecondRepeatInterval / (60 * 1000); viewModel.NumberOfLightingCommandRepeat = _settings.NumberOfLightingCommandRepeat; }, viewModel => { if (viewModel.Result == MessageBoxResult.OK) { _settings.AcknowledgeEnabled = viewModel.AcknowledgeEnabled; _settings.FullTimeoutPeriod = viewModel.FullTimeout; _settings.PartialTimeoutPeriod = viewModel.PartialTimeout; _settings.QueryTimeoutPeriod = viewModel.QueryTimeout; _settings.NumberOfLightingCommandRepeat = viewModel.NumberOfLightingCommandRepeat; _settings.MillisecondRepeatInterval = viewModel.MinuteRepeatInterval * 60 * 1000; _settings.Save(); } }); }