public static string GetSectionName(string name) { SectionName form = new SectionName(); form.SelectedName = name; if (form.ShowDialog() == DialogResult.Cancel) return string.Empty; else return form.SelectedName; }
private void RenameSection() { string name = SectionName.GetSectionName(CurrentSection.Name); if (name != string.Empty) { CurrentSection.Name = name; UpdateDisplayedProject(); } }
private void AddSection() { string name = SectionName.GetSectionName(); if (name != string.Empty) { Section s = new Section(mProject, name); mProject.Sections.Add(s); UpdateDisplayedProject(); CurrentSection = s; } }
public static string GetSectionName(string name) { SectionName form = new SectionName(); form.SelectedName = name; if (form.ShowDialog() == DialogResult.Cancel) { return(string.Empty); } else { return(form.SelectedName); } }
private void DuplicateSection() { string name = SectionName.GetSectionName(); if (name != string.Empty) { Section s = CurrentSection.Clone(); s.Name = name; mProject.Sections.Add(s); UpdateDisplayedProject(); CurrentSection = s; } }