private void mnuInsertConstant_Click(object sender, EventArgs e)
{
dlgConstant theDlg = new dlgConstant();
AttributeData theItem = (AttributeData)lbDestAttributes.SelectedItem;
theDlg.lblInsertHere.Text = theMap.destFC + " --- " + theItem.Name;
theDlg.lblDataType.Text = MiscProcs.UnBuildDataType(theItem.dataType, theItem.charLength);
theDlg.lblLength.Text = theItem.charLength.ToString();
theDlg.forNulls.Text = "F";
if (theItem.enumName != "")
{
theDlg.lblEnum.Text = theItem.enumName;
}
if (theItem.usesConstant)
{
}
DialogResult theRes = theDlg.ShowDialog(this);
if (theRes == DialogResult.OK)
{
AttributeData EmptyAttribute = new AttributeData(theMap.srcFC, null, 0);
theAMap = new AttributeMappingData(theMap, EmptyAttribute, theItem);
theAMap.constant = theDlg.txtConst.Text;
lstAttMappings.Items.Add(theAMap);
theAMap.transform = 20;
theMap.AddTransform(theAMap);
theItem.numMappings += 1;
theItem.usesConstant = true;
}
}