private void SortPropertyEnumeration()
{
TreeNode tn = this.treeView.SelectedNode;
DocPropertyEnumeration docEntity = (DocPropertyEnumeration)tn.Tag;
DocSchema docSchema = (DocSchema)this.treeView.SelectedNode.Parent.Parent.Tag;
int indexOld = docSchema.PropertyEnums.IndexOf(docEntity);
docSchema.SortPropertyEnums();
int indexNew = docSchema.PropertyEnums.IndexOf(docEntity);
if (indexNew != indexOld)
{
TreeNode tnParent = tn.Parent;
tn.Remove();
tnParent.Nodes.Insert(indexNew, tn);
this.treeView.SelectedNode = tn;
}
}