private void toolStripMenuItemEditProperties_Click(object sender, EventArgs e)
{
DocObject docObject = this.treeView.SelectedNode.Tag as DocObject;
if (docObject != null)
{
// build path
List<DocObject> path = new List<DocObject>();
TreeNode tn = this.treeView.SelectedNode;
while (tn != null)
{
if (tn.Tag is DocObject)
{
path.Insert(0, (DocObject)tn.Tag);
}
tn = tn.Parent;
}
using (FormProperties form = new FormProperties(path.ToArray(), this.m_project))
{
form.Text = docObject.Name;
form.ShowDialog(this);
// update treenode name
if (docObject is DocConceptRoot)
{
// find model view name
foreach (DocModelView docView in this.m_project.ModelViews)
{
if (docView.ConceptRoots.Contains((DocConceptRoot)docObject))
{
this.treeView.SelectedNode.Text = docView.ToString();
break;
}
}
}
else
{
this.treeView.SelectedNode.Text = docObject.ToString();// Name;
}
// update view
this.SetContent(docObject, docObject.Documentation);
this.m_modified = true;
}
}
}