private void buttonEntityBaseClear_Click(object sender, EventArgs e)
{
DocEntity docEntity = (DocEntity)this.m_target;
if (docEntity.BaseDefinition != null)
{
DocObject docBase = null;
this.m_map.TryGetValue(docEntity.BaseDefinition, out docBase);
if (docBase is DocEntity)
{
DocEntity docEntBase = (DocEntity)docBase;
foreach (DocSubtype docSub in docEntBase.Subtypes)
{
if (docSub.DefinedType == docEntity.Name)
{
docSub.Delete();
docEntBase.Subtypes.Remove(docSub);
break;
}
}
foreach (DocLine docLine in docEntBase.Tree)
{
if (docLine.Definition == docEntity)
{
docLine.Delete();
docEntBase.Tree.Remove(docLine);
break;
}
}
}
docEntity.BaseDefinition = null;
}
}