Esempio n. 1
0
        private bool AreSettingsValid(Settings settings)
        {
            var settingsValid = ValidationHelper.AreSettingsValid(settings);

            if (!settingsValid.HasFlag(SettingsValidation.Valid))
            {
                var sb = new StringBuilder().AppendLine("The settings are not valid and/or missing information");

                if (settingsValid.HasFlag(SettingsValidation.SwiftyCliPathMissing))
                {
                    sb.AppendLine("* Path to swifty-cli.exe missing");
                }

                if (settingsValid.HasFlag(SettingsValidation.ModsFolderPathMissing))
                {
                    sb.AppendLine("* Path to Mods Folder missing");
                }

                if (settingsValid.HasFlag(SettingsValidation.RepoSourceFolderPathMissing))
                {
                    sb.AppendLine("* Path to Repo Source Folder missing");
                }

                MessageBox.Show(sb.ToString(), "Validation Error");
                return(false);
            }

            return(true);
        }