예제 #1
0
        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();
        }
예제 #2
0
        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();
        }