public override Section GetSection(string name) { if (!Options.CaseSensitive) { name = name.ToLowerInvariant(); } // the wanted section might not be completely parsed yet if (CurrentSection.Equals(name, StringComparison)) { ParseCurrentSection(); return(Sections[name]); } if (Sections.TryGetValue(name, out var section)) { return(section); } if (!ParseSection(name)) { throw new ArgumentException($"section not found: {name}", nameof(name)); } return(Sections[name]); }
private void SectionChecker() { if (SelectedSection == null) { SaveSection(); } else { if (CurrentSection.Equals(SelectedSection)) { MessageBox.Show("Updated"); } else { UpdateSection(); } } SelectedSection = null; CurrentSection = null; SecView.Close(); }