private void treeView_BeforeLabelEdit(object sender, NodeLabelEditEventArgs e)
{
object target = e.Node.Tag;
if (target is DocSection)
{
int iSection = this.m_project.Sections.IndexOf((DocSection)target);
e.CancelEdit = (iSection < 4 || iSection > 7);
}
else if (target is DocObject)
{
e.CancelEdit = false;
}
else
{
e.CancelEdit = true;
}
}