상속: System.Windows.Forms.Form
예제 #1
0
        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);
        }
예제 #2
0
        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;
        }