Exemple #1
0
        private bool TrySaveSettings()
        {
            DisplayMode selectedMode = resolutionDD.SelectedItemData as DisplayMode;

            if (selectedMode == null)
            {
                resolutionDD.Flash();
                return(false);
            }

            settings.GraphicsWidth  = selectedMode.Width;
            settings.GraphicsHeight = selectedMode.Height;
            settings.SaveNewPlayerConfig();

            return(true);
        }
Exemple #2
-1
        private bool TrySaveSettings(string filePath)
        {
            DisplayMode selectedMode = resolutionDD.SelectedItemData as DisplayMode;

            if (selectedMode == null)
            {
                resolutionDD.Flash();
                return(false);
            }

            ContentPackage selectedPackage = contentPackageDD.SelectedItemData as ContentPackage;

            if (selectedPackage == null)
            {
                contentPackageDD.Flash();
                return(false);
            }

            settings.GraphicsWidth          = selectedMode.Width;
            settings.GraphicsHeight         = selectedMode.Height;
            settings.SelectedContentPackage = selectedPackage;
            settings.Save(configPath);

            return(true);
        }