コード例 #1
0
ファイル: Field.cs プロジェクト: Bengan77753/RosReestrImpLib
        /// <summary>Конструктор</summary>
        /// <param name="layer">Слой</param>
        /// <param name="fieldName">Имя поля</param>
        /// <param name="fieldType">Тип поля</param>
        /// <param name="width">Ширина</param>
        /// <param name="precision">Точность</param>
        /// <param name="indexed"></param>
        /// <param name="unique"></param>
        protected internal Field(MiLayer layer, string fieldName, FieldType fieldType, int width, int precision,
                                 int indexed, int unique)
        {
            IntPtr fieldId = MiApi.mitab_c_add_field(layer.Handle,
                                                     fieldName, (int)fieldType, width, precision, indexed, unique);;

            this.Layer     = layer;
            this.Index     = fieldId.ToInt32();
            this.Name      = fieldName;
            this.Type      = fieldType;
            this.Precision = (short)precision;
            this.Width     = width;
        }