private void ShowSettingsDialog() { SettingsDlg dlg = new SettingsDlg(); dlg.Owner = this; dlg.LoadModel(_settings); PositionDialogBelowOrAboveWindow(dlg); SettingsModel oldSettings = (SettingsModel)_settings.Clone(); if (dlg.ShowDialog() == DialogResult.OK) { _settings = dlg.SaveModel(); saveSettings(); } else { _settings = oldSettings; } ApplySettings(); }
private void ShowSettingsDialog() { SettingsDlg dlg = new SettingsDlg(); dlg.Owner = this; dlg.LoadModel(_settings); PositionDialogBelowOrAboveWindow(dlg); SettingsModel oldSettings = (SettingsModel)_settings.Clone(); if (dlg.ShowDialog() == DialogResult.OK) { _settings = dlg.SaveModel(); saveSettings(); } else _settings = oldSettings; ApplySettings(); }