private void EnableEditTextBox()
{
MDIChild mc = this.ActiveMdiChild as MDIChild;
bool bEnable = false;
if (this.ctlEditTextbox == null || mc == null ||
mc.DesignTab != DesignTabs.Design || mc.DrawCtl.SelectedCount != 1)
{ }
else
{
XmlNode tn = mc.DrawCtl.SelectedList[0] as XmlNode;
if (tn != null && tn.Name == "Textbox")
{
ctlEditTextbox.Text = mc.DrawCtl.GetElementValue(tn, "Value", "");
bEnable = true;
}
}
if (ctlEditTextbox != null)
{
if (!bEnable)
ctlEditTextbox.Text = "";
ctlEditTextbox.Enabled = bEnable;
fxToolStripLabel1.Enabled = bEnable;
}
}