private void okButton1_Click(object sender, EventArgs e) { bool restartRequired = false; foreach (XtraTabPage tabPage in xtraTabControl1.TabPages) { IOptionsControl optionsControl = (IOptionsControl)tabPage.Controls[0]; optionsControl.Save(); if (optionsControl.RestartRequired) { restartRequired = true; } } UserContext.Settings.GuiState.Save(); if (restartRequired) { FMMessageBox.ShowInfo(ApplicationStrings.OptionsRestartRequiredMsg); } }
private void btnOK_Click(object sender, RoutedEventArgs e) { bool restartRequired = false; foreach (ImageSourceListItem <IOptionsControl> tabPage in xtraTabControl1.Items) { IOptionsControl optionsControl = tabPage.Value; optionsControl.Save(); if (optionsControl.RestartRequired) { restartRequired = true; } } UserContext.Current.Settings.GuiState.Save(); if (restartRequired) { BAMessageBox.ShowInfo(Strings.OptionsRestartRequiredMsg); } DialogResult = true; Close(); }