private bool OpenPreferenceWindow(bool isRequired = false) { using (PreferencesForm preferences = new PreferencesForm()) { string oldDir = Settings.Default.GameDirectory; if (preferences.ShowDialog() == System.Windows.Forms.DialogResult.OK) { // Only load the base xml if the directory is changed if (!String.Equals(oldDir, Settings.Default.GameDirectory)) { Directory.SetCurrentDirectory(Settings.Default.GameDirectory); LoadCharaData(); } } else { if (isRequired) { Application.Exit(); return(false); } } } return(true); }
private bool OpenPreferenceWindow(bool isRequired = false) { using (PreferencesForm preferences = new PreferencesForm()) { string oldDir = Settings.Default.GameDirectory; if (preferences.ShowDialog() == System.Windows.Forms.DialogResult.OK) { // Only load the base xml if the directory is changed if (!String.Equals(oldDir, Settings.Default.GameDirectory)) { Directory.SetCurrentDirectory(Settings.Default.GameDirectory); LoadCharaData(); } } else { if (isRequired) { Application.Exit(); return false; } } } return true; }