Inheritance: System.Windows.Forms.Form
Esempio n. 1
0
        private void mnuMapConstant_Click(object sender, EventArgs e)
        {
            dlgConstant theDlg = new dlgConstant();

            AttributeMappingData theItem = (AttributeMappingData)lstAttMappings.SelectedItem;
            theDlg.lblInsertHere.Text = theItem.destFC + " --- " + theItem.destAtt;
            theDlg.lblDataType.Text = MiscProcs.UnBuildDataType(theItem.destDT, theItem.destLen);
            theDlg.lblLength.Text = theItem.destLen.ToString();
            theDlg.forNulls.Text = "T";

            if (theItem.destEnum != "")
            {
                theDlg.lblEnum.Text = theItem.destEnum;
            }

            if (theItem.constant != "")
            {
            }

            DialogResult theRes = theDlg.ShowDialog(this);

            if (theRes == DialogResult.OK)
            {
                theItem.constant = theDlg.txtConst.Text;
            }
        }
Esempio n. 2
0
        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;
            }
        }