private void buttonAttributeInverse_Click(object sender, EventArgs e)
{
DocAttribute docAttr = (DocAttribute)this.m_target;
DocObject docEntity = null;
if (this.m_map.TryGetValue(docAttr.DefinedType, out docEntity) && docEntity is DocEntity)
{
using(FormSelectAttribute form = new FormSelectAttribute((DocEntity)docEntity, this.m_project, null, false))
{
if(form.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
{
if (form.SelectedAttribute != null)
{
docAttr.Inverse = form.SelectedAttribute.Name;
this.textBoxAttributeInverse.Text = docAttr.Inverse;
}
else
{
docAttr.Inverse = null;
this.textBoxAttributeInverse.Text = String.Empty;
}
}
}
}
}