Esempio n. 1
0
        private void pointTypeComboBox_SelectedValueChanged(object sender, EventArgs e)
        {
            // Get the new point type (it might be null while the control is loading)
            IEntity ent = pointTypeComboBox.SelectedEntityType;

            if (ent == null)
            {
                return;
            }

            // If the current ID does not apply to the new point type,
            // reload the ID combo (reserving a different ID).
            if (!m_PointId.IsValidFor(ent))
            {
                IdHelper.LoadIdCombo(idComboBox, ent, m_PointId);
            }
            else
            {
                m_PointId.Entity = ent;
            }
        }
Esempio n. 2
0
        private void pointTypeComboBox_SelectedValueChanged(object sender, EventArgs e)
        {
            // Just return if the ID combo is disabled (means we're doing an update)
            if (!pointIdComboBox.Enabled)
            {
                return;
            }

            // Get the new point type.
            IEntity ent = pointTypeComboBox.SelectedEntityType;

            // If the current ID does not apply to the new point type,
            // reload the ID combo (reserving a different ID).
            if (!m_PointId.IsValidFor(ent))
            {
                IdHelper.LoadIdCombo(pointIdComboBox, ent, m_PointId);
            }
            else
            {
                m_PointId.Entity = ent;
            }
        }