void fxExpr_Click(object sender, EventArgs e)
{
MDIChild mc = this.ActiveMdiChild as MDIChild;
if (mc == null ||
mc.DesignTab != DesignTabs.Design || mc.DrawCtl.SelectedCount != 1 ||
mc.Editor == null)
return;
XmlNode tn = mc.DrawCtl.SelectedList[0];
using (DialogExprEditor de = new DialogExprEditor(mc.DrawCtl, ctlEditTextbox.Text, tn))
{
// Display the UI editor dialog
if (de.ShowDialog(this) == DialogResult.OK)
{
ctlEditTextbox.Text = de.Expression;
mc.Editor.SetSelectedText(de.Expression);
SetProperties(mc);
}
}
}