Exemple #1
0
            private StringBuilder GetSettingsWithoutMods()
            {
                var settings      = new StringBuilder();
                var settingsLines = _sf.ReadLines();
                var started       = false;
                var ended         = false;

                foreach (var l in settingsLines)
                {
                    if (!started)
                    {
                        if (!l.StartsWith(ModStart))
                        {
                            settings.AppendLine(l);
                        }
                        else
                        {
                            started = true;
                        }
                    }
                    else if (ended)
                    {
                        settings.AppendLine(l);
                    }
                    else if (l == ModEnd)
                    {
                        ended = true;
                    }
                }
                return(settings);
            }