예제 #1
0
        // Run when the form loads
        private void AdvancedAttributeForm_Load(object sender, EventArgs e)
        {
            string[] attributeParams = tdCng.getParams();
            foreach (string s in attributeParams)
            {
                cboxParameter.Items.Add(s);
            }
            cboxParameter.SelectedIndex = 0;

            // Manually call the parameterChangedListener so that changes work as expected
            parameterChangedListener(null, null);

            // Activate event listeners
            cboxParameter.SelectedIndexChanged += new EventHandler(parameterChangedListener);
            numParameterVal.ValueChanged       += new EventHandler(valueChangedListener);
        }
예제 #2
0
        // Run when the attribute type is changed
        private void cboxAttributeType_SelectedIndexChanged(object sender, EventArgs e)
        {
            int columnIndex = cboxCurrentAttribute.SelectedIndex;

            currentEditDef = SQLTypeDefFactory.getNew((SQLTypeDef.SQLTypeID)cboxAttributeType.SelectedIndex);

            if (currentEditDef.getParams().Length == 0)
            {
                btnAdvancedAttribute.Enabled = false;
            }
            else
            {
                btnAdvancedAttribute.Enabled = true;
            }
        }