Exemplo n.º 1
0
        public Field(Field prototype) : base(prototype)
        {
            this._name        = prototype.Name;
            this._fieldType   = prototype.FieldType;
            this._isNullable  = prototype.IsNullable;
            this._length      = prototype.Length;
            this._precision   = prototype.Precision;
            this._scale       = prototype.Scale;
            this._required    = prototype.Required;
            this._editable    = prototype.Editable;
            this._domainFixed = prototype.DomainFixed;
            if (prototype.GeometryDef != null)
            {
                this._geometryDef = (GeometryDef)prototype.GeometryDef.Clone();
            }
            this._aliasName    = prototype.AliasName;
            this._modelName    = prototype.ModelName;
            this._defaultValue = prototype.DefaultValue;
            this._domain       = prototype.Domain;
            if (prototype.RasterDef != null)
            {
                this._rasterDef = (RasterDef)prototype.RasterDef.Clone();
            }

            this.UpdateText();

            this.Image = new Crainiate.ERM4.Image("Resource.publicfield.gif", "Crainiate.ERM4.Component");
        }
Exemplo n.º 2
0
 public GeometryDef(GeometryDef prototype) : base(prototype)
 {
     this._avgNumPoints = prototype.AvgNumPoints;
     this._geometryType = prototype.GeometryType;
     this._hasM         = prototype.HasM;
     this._hasZ         = prototype.HasZ;
     if (prototype.SpatialReference != null)
     {
         this._spatialReference = prototype.SpatialReference.Clone() as SpatialReference;
     }
     this._gridSize0 = prototype.GridSize0;
     this._gridSize1 = prototype.GridSize1;
     this._gridSize2 = prototype.GridSize2;
 }
Exemplo n.º 3
0
        public Field(SerializationInfo info, StreamingContext context) : base(info, context)
        {
            this._name         = info.GetString("name");
            this._fieldType    = (esriFieldType)Enum.Parse(typeof(esriFieldType), info.GetString("fieldType"), true);
            this._isNullable   = info.GetBoolean("isNullable");
            this._length       = info.GetInt32("length");
            this._precision    = info.GetInt32("precision");
            this._scale        = info.GetInt32("scale");
            this._required     = info.GetBoolean("required");
            this._editable     = info.GetBoolean("editable");
            this._domainFixed  = info.GetBoolean("domainFixed");
            this._geometryDef  = (GeometryDef)info.GetValue("geometryDef", typeof(GeometryDef));
            this._aliasName    = info.GetString("aliasName");
            this._modelName    = info.GetString("modelName");
            this._defaultValue = info.GetString("defaultValue");
            this._domain       = info.GetString("domain");
            this._rasterDef    = (RasterDef)info.GetValue("rasterDef", typeof(RasterDef));

            this.UpdateText();

            this.Image = new Crainiate.ERM4.Image("Resource.publicfield.gif", "Crainiate.ERM4.Component");
        }
Exemplo n.º 4
0
 public GeometryDef(GeometryDef prototype) : base(prototype) {
     this._avgNumPoints = prototype.AvgNumPoints;
     this._geometryType = prototype.GeometryType;
     this._hasM = prototype.HasM;
     this._hasZ = prototype.HasZ;
     if (prototype.SpatialReference != null) {
         this._spatialReference = prototype.SpatialReference.Clone() as SpatialReference;
     }
     this._gridSize0 = prototype.GridSize0;
     this._gridSize1 = prototype.GridSize1;
     this._gridSize2 = prototype.GridSize2;
 }
Exemplo n.º 5
0
        public Field(IXPathNavigable path, EsriTable table) : base(path) {
            //
            this.SuspendEvents = true;

            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <Name></Name>
            XPathNavigator navigatorFieldName = navigator.SelectSingleNode("Name");
            if (navigatorFieldName != null) {
                this._name = navigatorFieldName.Value;
            }

            // <Type></Type>
            XPathNavigator navigatorFieldType = navigator.SelectSingleNode("Type");
            if (navigatorFieldType != null) {
                this._fieldType = (esriFieldType)Enum.Parse(typeof(esriFieldType), navigatorFieldType.Value, true);
            }

            // <IsNullable></IsNullable>
            XPathNavigator navigatorFieldIsNullable = navigator.SelectSingleNode("IsNullable");
            if (navigatorFieldIsNullable != null) {
                this._isNullable = navigatorFieldIsNullable.ValueAsBoolean;
            }

            // <Length></Length>
            XPathNavigator navigatorFieldLength = navigator.SelectSingleNode("Length");
            if (navigatorFieldLength != null) {
                this._length = navigatorFieldLength.ValueAsInt;
            }

            // <Precision></Precision>
            XPathNavigator navigatorFieldPrecision = navigator.SelectSingleNode("Precision");
            if (navigatorFieldPrecision != null) {
                this._precision = navigatorFieldPrecision.ValueAsInt;
            }

            // <Scale></Scale>
            XPathNavigator navigatorFieldScale = navigator.SelectSingleNode("Scale");
            if (navigatorFieldScale != null) {
                this._scale = navigatorFieldScale.ValueAsInt;
            }

            // <Required></Required>
            XPathNavigator navigatorFieldRequired = navigator.SelectSingleNode("Required");
            if (navigatorFieldRequired != null) {
                this._required = navigatorFieldRequired.ValueAsBoolean;
            }

            // <Editable></Editable>
            XPathNavigator navigatorFieldEditable = navigator.SelectSingleNode("Editable");
            if (navigatorFieldEditable != null) {
                this._editable = navigatorFieldEditable.ValueAsBoolean;
            }

            // <DomainFixed></DomainFixed>
            XPathNavigator navigatorFieldDomainFixed = navigator.SelectSingleNode("DomainFixed");
            if (navigatorFieldDomainFixed != null) {
                this._domainFixed = navigatorFieldDomainFixed.ValueAsBoolean;
            }

            // <AliasName></AliasName>
            XPathNavigator navigatorFieldAliasName = navigator.SelectSingleNode("AliasName");
            if (navigatorFieldAliasName != null) {
                this._aliasName = navigatorFieldAliasName.Value;
            }

            // <GeometryDef></GeometryDef>
            XPathNavigator navigatorGeometryDef = navigator.SelectSingleNode("GeometryDef");
            if (navigatorGeometryDef != null) {
                this._geometryDef = new GeometryDef(navigatorGeometryDef);
            }

            // <ModelName></ModelName>
            XPathNavigator navigatorFieldModelName = navigator.SelectSingleNode("ModelName");
            if (navigatorFieldModelName != null) {
                this._modelName = navigatorFieldModelName.Value;
            }

            // <DefaultValue></DefaultValue>
            XPathNavigator navigatorFieldDefaultValue = navigator.SelectSingleNode("DefaultValue");
            if (navigatorFieldDefaultValue != null) {
                this._defaultValue = navigatorFieldDefaultValue.Value;
            }

            // <Domain></Domain>
            XPathNavigator navigatorFieldDomain= navigator.SelectSingleNode("Domain/DomainName");
            if (navigatorFieldDomain != null) {
                this._domain = navigatorFieldDomain.Value;
            }

            // <RasterDef></RasterDef>
            XPathNavigator navigatorRasterDef = navigator.SelectSingleNode("RasterDef");
            if (navigatorRasterDef != null) {
                this._rasterDef = new RasterDef(navigatorRasterDef);
            }

            // Initialize Text
            this.UpdateText();

            // Set Element Properties
            this.Image = new Crainiate.ERM4.Image("Resource.publicfield.gif", "Crainiate.ERM4.Component");

            //
            this.SuspendEvents = false;
        }
Exemplo n.º 6
0
        public Field(Field prototype) : base(prototype) {
            this._name = prototype.Name;
            this._fieldType = prototype.FieldType;
            this._isNullable = prototype.IsNullable;
            this._length = prototype.Length;
            this._precision = prototype.Precision;
            this._scale = prototype.Scale;
            this._required = prototype.Required;
            this._editable = prototype.Editable;
            this._domainFixed = prototype.DomainFixed;
            if (prototype.GeometryDef != null) {
                this._geometryDef = (GeometryDef)prototype.GeometryDef.Clone();
            }
            this._aliasName = prototype.AliasName;
            this._modelName = prototype.ModelName;
            this._defaultValue = prototype.DefaultValue;
            this._domain = prototype.Domain;
            if (prototype.RasterDef != null) {
                this._rasterDef = (RasterDef)prototype.RasterDef.Clone();
            }
            
            this.UpdateText();

            this.Image = new Crainiate.ERM4.Image("Resource.publicfield.gif", "Crainiate.ERM4.Component");
        }
Exemplo n.º 7
0
        public Field(SerializationInfo info, StreamingContext context) : base(info, context) {
            this._name = info.GetString("name");
            this._fieldType = (esriFieldType)Enum.Parse(typeof(esriFieldType), info.GetString("fieldType"), true);
            this._isNullable = info.GetBoolean("isNullable");
            this._length = info.GetInt32("length");
            this._precision = info.GetInt32("precision");
            this._scale = info.GetInt32("scale");
            this._required = info.GetBoolean("required");
            this._editable = info.GetBoolean("editable");
            this._domainFixed = info.GetBoolean("domainFixed");
            this._geometryDef = (GeometryDef)info.GetValue("geometryDef", typeof(GeometryDef));
            this._aliasName = info.GetString("aliasName");
            this._modelName = info.GetString("modelName");
            this._defaultValue = info.GetString("defaultValue");
            this._domain = info.GetString("domain");
            this._rasterDef = (RasterDef)info.GetValue("rasterDef", typeof(RasterDef));
                        
            this.UpdateText();

            this.Image = new Crainiate.ERM4.Image("Resource.publicfield.gif", "Crainiate.ERM4.Component");
        }
Exemplo n.º 8
0
        public Field(IXPathNavigable path, EsriTable table) : base(path)
        {
            //
            this.SuspendEvents = true;

            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <Name></Name>
            XPathNavigator navigatorFieldName = navigator.SelectSingleNode("Name");

            if (navigatorFieldName != null)
            {
                this._name = navigatorFieldName.Value;
            }

            // <Type></Type>
            XPathNavigator navigatorFieldType = navigator.SelectSingleNode("Type");

            if (navigatorFieldType != null)
            {
                this._fieldType = (esriFieldType)Enum.Parse(typeof(esriFieldType), navigatorFieldType.Value, true);
            }

            // <IsNullable></IsNullable>
            XPathNavigator navigatorFieldIsNullable = navigator.SelectSingleNode("IsNullable");

            if (navigatorFieldIsNullable != null)
            {
                this._isNullable = navigatorFieldIsNullable.ValueAsBoolean;
            }

            // <Length></Length>
            XPathNavigator navigatorFieldLength = navigator.SelectSingleNode("Length");

            if (navigatorFieldLength != null)
            {
                this._length = navigatorFieldLength.ValueAsInt;
            }

            // <Precision></Precision>
            XPathNavigator navigatorFieldPrecision = navigator.SelectSingleNode("Precision");

            if (navigatorFieldPrecision != null)
            {
                this._precision = navigatorFieldPrecision.ValueAsInt;
            }

            // <Scale></Scale>
            XPathNavigator navigatorFieldScale = navigator.SelectSingleNode("Scale");

            if (navigatorFieldScale != null)
            {
                this._scale = navigatorFieldScale.ValueAsInt;
            }

            // <Required></Required>
            XPathNavigator navigatorFieldRequired = navigator.SelectSingleNode("Required");

            if (navigatorFieldRequired != null)
            {
                this._required = navigatorFieldRequired.ValueAsBoolean;
            }

            // <Editable></Editable>
            XPathNavigator navigatorFieldEditable = navigator.SelectSingleNode("Editable");

            if (navigatorFieldEditable != null)
            {
                this._editable = navigatorFieldEditable.ValueAsBoolean;
            }

            // <DomainFixed></DomainFixed>
            XPathNavigator navigatorFieldDomainFixed = navigator.SelectSingleNode("DomainFixed");

            if (navigatorFieldDomainFixed != null)
            {
                this._domainFixed = navigatorFieldDomainFixed.ValueAsBoolean;
            }

            // <AliasName></AliasName>
            XPathNavigator navigatorFieldAliasName = navigator.SelectSingleNode("AliasName");

            if (navigatorFieldAliasName != null)
            {
                this._aliasName = navigatorFieldAliasName.Value;
            }

            // <GeometryDef></GeometryDef>
            XPathNavigator navigatorGeometryDef = navigator.SelectSingleNode("GeometryDef");

            if (navigatorGeometryDef != null)
            {
                this._geometryDef = new GeometryDef(navigatorGeometryDef);
            }

            // <ModelName></ModelName>
            XPathNavigator navigatorFieldModelName = navigator.SelectSingleNode("ModelName");

            if (navigatorFieldModelName != null)
            {
                this._modelName = navigatorFieldModelName.Value;
            }

            // <DefaultValue></DefaultValue>
            XPathNavigator navigatorFieldDefaultValue = navigator.SelectSingleNode("DefaultValue");

            if (navigatorFieldDefaultValue != null)
            {
                this._defaultValue = navigatorFieldDefaultValue.Value;
            }

            // <Domain></Domain>
            XPathNavigator navigatorFieldDomain = navigator.SelectSingleNode("Domain/DomainName");

            if (navigatorFieldDomain != null)
            {
                this._domain = navigatorFieldDomain.Value;
            }

            // <RasterDef></RasterDef>
            XPathNavigator navigatorRasterDef = navigator.SelectSingleNode("RasterDef");

            if (navigatorRasterDef != null)
            {
                this._rasterDef = new RasterDef(navigatorRasterDef);
            }

            // Initialize Text
            this.UpdateText();

            // Set Element Properties
            this.Image = new Crainiate.ERM4.Image("Resource.publicfield.gif", "Crainiate.ERM4.Component");

            //
            this.SuspendEvents = false;
        }