예제 #1
0
        private void AttachPointForm_Shown(object sender, EventArgs e)
        {
            // Load the entity combo box with a list for point features.
            m_PointType = entityTypeComboBox.Load(SpatialType.Point);

            // The option to make the selected type the default for
            // this command is ALWAYS set by default
            defaultCheckBox.Checked = true;

            // If there is a default entity for this command (on the
            // current editing layer), select that instead & disable
            // the corresponding checkbox
            int entId = ReadDefaultPointEntityTypeId();

            if (entId > 0)
            {
                IEntity ent = EnvironmentContainer.FindEntityById(entId);
                if (ent != null)
                {
                    entityTypeComboBox.SelectEntity(ent);
                    defaultCheckBox.Enabled = false;
                    m_PointType             = ent;
                }
            }

            // Check auto-repeat option (default is to repeat)
            int repeat = GlobalUserSetting.ReadInt(REPEAT_KEY, 1);

            m_Repeat = (repeat != 0);
            repeatCheckBox.Checked = m_Repeat;
        }
예제 #2
0
        /// <summary>
        /// Reads an entity type for a spatial feature.
        /// </summary>
        /// <param name="field">A tag associated with the value</param>
        /// <returns>The entity type that was read.</returns>
        internal IEntity ReadEntity(DataField field)
        {
            int id = m_Reader.ReadInt32(field.ToString());

            return(EnvironmentContainer.FindEntityById(id));
        }